mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Serialise glActiveTexture during frame captures
This commit is contained in:
@@ -82,6 +82,7 @@ enum GLChunkType
|
||||
|
||||
GEN_TEXTURE,
|
||||
BIND_TEXTURE,
|
||||
ACTIVE_TEXTURE,
|
||||
TEXSTORAGE2D,
|
||||
TEXSUBIMAGE2D,
|
||||
PIXELSTORE,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -39,6 +39,7 @@ const char *GLChunkNames[] =
|
||||
"WrappedOpenGL::Initialisation",
|
||||
"glGenTextures",
|
||||
"glBindTexture",
|
||||
"glActiveTexture",
|
||||
"glTexStorage2D",
|
||||
"glTexSubImage2D",
|
||||
"glPixelStore",
|
||||
|
||||
Reference in New Issue
Block a user