mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 04:50:35 +00:00
Add helpers to set/push/pop markers on GL
This commit is contained in:
@@ -212,6 +212,25 @@ GLuint OpenGLGraphicsTest::MakeFBO()
|
||||
return fbos[fbos.size() - 1];
|
||||
}
|
||||
|
||||
void OpenGLGraphicsTest::pushMarker(const std::string &name)
|
||||
{
|
||||
if(glPushDebugGroup)
|
||||
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name.c_str());
|
||||
}
|
||||
|
||||
void OpenGLGraphicsTest::setMarker(const std::string &name)
|
||||
{
|
||||
if(glDebugMessageInsert)
|
||||
glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_MARKER, 0,
|
||||
GL_DEBUG_SEVERITY_LOW, -1, name.c_str());
|
||||
}
|
||||
|
||||
void OpenGLGraphicsTest::popMarker()
|
||||
{
|
||||
if(glPopDebugGroup)
|
||||
glPopDebugGroup();
|
||||
}
|
||||
|
||||
bool OpenGLGraphicsTest::Running()
|
||||
{
|
||||
if(!FrameLimit())
|
||||
|
||||
@@ -52,6 +52,10 @@ struct OpenGLGraphicsTest : public GraphicsTest
|
||||
GLuint MakeVAO();
|
||||
GLuint MakeFBO();
|
||||
|
||||
void pushMarker(const std::string &name);
|
||||
void setMarker(const std::string &name);
|
||||
void popMarker();
|
||||
|
||||
bool Running();
|
||||
void Present(GraphicsWindow *window);
|
||||
void Present() { Present(mainWindow); }
|
||||
|
||||
Reference in New Issue
Block a user