Browse Source

GL: sigh, windows.h.

pull/442/head
Vladimír Vondruš 6 years ago
parent
commit
a27802e67c
  1. 11
      src/Magnum/GL/Renderer.cpp
  2. 4
      src/Magnum/GL/Renderer.h

11
src/Magnum/GL/Renderer.cpp

@ -368,6 +368,17 @@ void Renderer::setLogicOperation(const LogicOperation operation) {
} }
#endif #endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/* https://docs.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-memorybarrier
Sigh. Our glMemoryBarrier is actually flextGL.MemoryBarrier and then
windows.h comes around and sets things on fire. Unless I'm doing something
very wrong, windows.h should not be dragged into this file, so no #undef
should be necessary. */
void Renderer::setMemoryBarrier(MemoryBarriers barriers) {
glMemoryBarrier(GLbitfield(barriers));
}
#endif
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() { Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES

4
src/Magnum/GL/Renderer.h

@ -1930,9 +1930,7 @@ class MAGNUM_GL_EXPORT Renderer {
* @requires_gles31 Shader load/store is not available in OpenGL ES 3.0 and older. * @requires_gles31 Shader load/store is not available in OpenGL ES 3.0 and older.
* @requires_gles Shader load/store is not available in WebGL. * @requires_gles Shader load/store is not available in WebGL.
*/ */
static void setMemoryBarrier(MemoryBarriers barriers) { static void setMemoryBarrier(MemoryBarriers barriers);
glMemoryBarrier(GLbitfield(barriers));
}
/** /**
* @brief Set memory barrier by region * @brief Set memory barrier by region

Loading…
Cancel
Save