diff --git a/renderdoc/driver/gl/gl_driver.cpp b/renderdoc/driver/gl/gl_driver.cpp index faca07bb8..2e25685ac 100644 --- a/renderdoc/driver/gl/gl_driver.cpp +++ b/renderdoc/driver/gl/gl_driver.cpp @@ -813,7 +813,7 @@ void WrappedOpenGL::glDebugMessageControl(GLenum source, GLenum type, GLenum sev bool WrappedOpenGL::Serialise_glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf) { - wstring name = name_ ? widen(string(buf, buf+length)) : L""; + wstring name = buf ? widen(string(buf, buf+length)) : L""; m_pSerialiser->Serialise("Name", name); diff --git a/renderdoc/hooks/gl_linux_hooks.cpp b/renderdoc/hooks/gl_linux_hooks.cpp index 084fe2e3e..325f8c866 100644 --- a/renderdoc/hooks/gl_linux_hooks.cpp +++ b/renderdoc/hooks/gl_linux_hooks.cpp @@ -87,6 +87,15 @@ typedef void (*PFNGLXSWAPBUFFERSPROC)(Display *dpy, GLXDrawable drawable); */ +// don't want these definitions, the only place we'll use these is as parameter/variable names +#ifdef near +#undef near +#endif + +#ifdef far +#undef far +#endif + #define HookWrapper0(ret, function) \ typedef ret (*CONCAT(function, _hooktype)) (); \ extern "C" __attribute__ ((visibility ("default"))) \ diff --git a/renderdoc/hooks/gl_win32_hooks.cpp b/renderdoc/hooks/gl_win32_hooks.cpp index 1b50d611f..52ad9c895 100644 --- a/renderdoc/hooks/gl_win32_hooks.cpp +++ b/renderdoc/hooks/gl_win32_hooks.cpp @@ -84,6 +84,15 @@ */ +// don't want these definitions, the only place we'll use these is as parameter/variable names +#ifdef near +#undef near +#endif + +#ifdef far +#undef far +#endif + #define HookWrapper0(ret, function) \ Hook CONCAT(function, _hook); \ typedef ret (WINAPI *CONCAT(function, _hooktype)) (); \