mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Move CheckConstParam into common code
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 <typename T>
|
||||
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
|
||||
|
||||
@@ -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 <typename T>
|
||||
T CheckConstParam(T t);
|
||||
template <>
|
||||
bool CheckConstParam(bool t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
template <const bool CopyUniforms, const bool SerialiseUniforms, typename SerialiserType>
|
||||
static void ForAllProgramUniforms(SerialiserType *ser, CaptureState state, GLuint progSrc,
|
||||
GLuint progDst, map<GLint, GLint> *locTranslate)
|
||||
|
||||
Reference in New Issue
Block a user