Serialise glActiveTexture during frame captures

This commit is contained in:
baldurk
2014-05-25 16:14:32 +01:00
parent c7b0ae41ef
commit ada40e303c
3 changed files with 26 additions and 0 deletions
+1
View File
@@ -82,6 +82,7 @@ enum GLChunkType
GEN_TEXTURE,
BIND_TEXTURE,
ACTIVE_TEXTURE,
TEXSTORAGE2D,
TEXSUBIMAGE2D,
PIXELSTORE,
+24
View File
@@ -382,11 +382,35 @@ void WrappedOpenGL::glTexImage2D(GLenum target, GLint level, GLint internalforma
RDCUNIMPLEMENTED();
}
bool WrappedOpenGL::Serialise_glActiveTexture(GLenum texture)
{
SERIALISE_ELEMENT(GLenum, Texture, texture);
if(m_State < WRITING)
m_Real.glActiveTexture(Texture);
return true;
}
void WrappedOpenGL::glActiveTexture(GLenum texture)
{
m_Real.glActiveTexture(texture);
m_TextureUnit = texture-eGL_TEXTURE0;
if(m_State == WRITING_CAPFRAME)
{
Chunk *chunk = NULL;
{
SCOPED_SERIALISE_CONTEXT(ACTIVE_TEXTURE);
Serialise_glActiveTexture(texture);
chunk = scope.Get();
}
m_ContextRecord->AddChunk(chunk);
}
}
#pragma endregion
+1
View File
@@ -39,6 +39,7 @@ const char *GLChunkNames[] =
"WrappedOpenGL::Initialisation",
"glGenTextures",
"glBindTexture",
"glActiveTexture",
"glTexStorage2D",
"glTexSubImage2D",
"glPixelStore",