mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Serialise glActiveTexture during frame captures
This commit is contained in:
@@ -82,6 +82,7 @@ enum GLChunkType
|
|||||||
|
|
||||||
GEN_TEXTURE,
|
GEN_TEXTURE,
|
||||||
BIND_TEXTURE,
|
BIND_TEXTURE,
|
||||||
|
ACTIVE_TEXTURE,
|
||||||
TEXSTORAGE2D,
|
TEXSTORAGE2D,
|
||||||
TEXSUBIMAGE2D,
|
TEXSUBIMAGE2D,
|
||||||
PIXELSTORE,
|
PIXELSTORE,
|
||||||
|
|||||||
@@ -382,11 +382,35 @@ void WrappedOpenGL::glTexImage2D(GLenum target, GLint level, GLint internalforma
|
|||||||
RDCUNIMPLEMENTED();
|
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)
|
void WrappedOpenGL::glActiveTexture(GLenum texture)
|
||||||
{
|
{
|
||||||
m_Real.glActiveTexture(texture);
|
m_Real.glActiveTexture(texture);
|
||||||
|
|
||||||
m_TextureUnit = texture-eGL_TEXTURE0;
|
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
|
#pragma endregion
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const char *GLChunkNames[] =
|
|||||||
"WrappedOpenGL::Initialisation",
|
"WrappedOpenGL::Initialisation",
|
||||||
"glGenTextures",
|
"glGenTextures",
|
||||||
"glBindTexture",
|
"glBindTexture",
|
||||||
|
"glActiveTexture",
|
||||||
"glTexStorage2D",
|
"glTexStorage2D",
|
||||||
"glTexSubImage2D",
|
"glTexSubImage2D",
|
||||||
"glPixelStore",
|
"glPixelStore",
|
||||||
|
|||||||
Reference in New Issue
Block a user