mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
[GL] Lock Helpers::format calls behind GPU_DEBUG_INFO macro
This commit is contained in:
parent
82d9511993
commit
9d75849600
2 changed files with 4 additions and 0 deletions
|
@ -65,8 +65,10 @@ struct ColourBuffer {
|
||||||
texture.setMagFilter(OpenGL::Linear);
|
texture.setMagFilter(OpenGL::Linear);
|
||||||
glBindTexture(GL_TEXTURE_2D, prevTexture);
|
glBindTexture(GL_TEXTURE_2D, prevTexture);
|
||||||
|
|
||||||
|
#ifdef GPU_DEBUG_INFO
|
||||||
const auto name = Helpers::format("Surface %dx%d %s from 0x%08X", size.x(), size.y(), PICA::textureFormatToString(format), location);
|
const auto name = Helpers::format("Surface %dx%d %s from 0x%08X", size.x(), size.y(), PICA::textureFormatToString(format), location);
|
||||||
OpenGL::setObjectLabel(GL_TEXTURE, texture.handle(), name.c_str());
|
OpenGL::setObjectLabel(GL_TEXTURE, texture.handle(), name.c_str());
|
||||||
|
#endif
|
||||||
|
|
||||||
fbo.createWithDrawTexture(texture);
|
fbo.createWithDrawTexture(texture);
|
||||||
fbo.bind(OpenGL::DrawAndReadFramebuffer);
|
fbo.bind(OpenGL::DrawAndReadFramebuffer);
|
||||||
|
|
|
@ -9,8 +9,10 @@ void Texture::allocate() {
|
||||||
texture.create(size.u(), size.v(), GL_RGBA8);
|
texture.create(size.u(), size.v(), GL_RGBA8);
|
||||||
texture.bind();
|
texture.bind();
|
||||||
|
|
||||||
|
#ifdef GPU_DEBUG_INFO
|
||||||
const auto name = Helpers::format("Surface %dx%d %s from 0x%08X", size.x(), size.y(), PICA::textureFormatToString(format), location);
|
const auto name = Helpers::format("Surface %dx%d %s from 0x%08X", size.x(), size.y(), PICA::textureFormatToString(format), location);
|
||||||
OpenGL::setObjectLabel(GL_TEXTURE, texture.handle(), name.c_str());
|
OpenGL::setObjectLabel(GL_TEXTURE, texture.handle(), name.c_str());
|
||||||
|
#endif
|
||||||
|
|
||||||
setNewConfig(config);
|
setNewConfig(config);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue