diff --git a/renderdoc/driver/gl/gl_common.cpp b/renderdoc/driver/gl/gl_common.cpp index 38739c726..bc5db9056 100644 --- a/renderdoc/driver/gl/gl_common.cpp +++ b/renderdoc/driver/gl/gl_common.cpp @@ -42,6 +42,12 @@ int GLCoreVersion = 0; bool GLIsCore = false; bool IsGLES = false; +template <> +bool CheckConstParam(bool t) +{ + return t; +} + bool CheckReplayContext(PFNGLGETSTRINGPROC getStr, PFNGLGETINTEGERVPROC getInt, PFNGLGETSTRINGIPROC getStri) { diff --git a/renderdoc/driver/gl/gl_common.h b/renderdoc/driver/gl/gl_common.h index 71902ba13..77777c6e8 100644 --- a/renderdoc/driver/gl/gl_common.h +++ b/renderdoc/driver/gl/gl_common.h @@ -221,6 +221,11 @@ typedef BOOL(APIENTRYP *PFNWGLDXUNLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count #include "api/replay/renderdoc_replay.h" +// bit of a hack, to work around C4127: conditional expression is constant +// on template parameters +template +T CheckConstParam(T t); + // define this if you e.g. haven't compiled the D3D modules and want to disable // interop capture support. #define RENDERDOC_DX_GL_INTEROP OPTION_ON diff --git a/renderdoc/driver/gl/gl_program_iterate.cpp b/renderdoc/driver/gl/gl_program_iterate.cpp index 0d10eb925..2ad84da38 100644 --- a/renderdoc/driver/gl/gl_program_iterate.cpp +++ b/renderdoc/driver/gl/gl_program_iterate.cpp @@ -294,16 +294,6 @@ void DoSerialise(SerialiserType &ser, ProgramUniforms &el) SERIALISE_MEMBER(SSBOBindings); } -// bit of a hack, to work around C4127: conditional expression is constant -// on template parameters -template -T CheckConstParam(T t); -template <> -bool CheckConstParam(bool t) -{ - return t; -} - template static void ForAllProgramUniforms(SerialiserType *ser, CaptureState state, GLuint progSrc, GLuint progDst, map *locTranslate)