mirror of https://github.com/bkaradzic/bgfx
GL: Implemented setName.
This commit is contained in:
parent
7ce23528e4
commit
db671c2ee4
|
@ -2984,7 +2984,20 @@ namespace bgfx { namespace gl
|
|||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
{
|
||||
BX_UNUSED(_handle, _name)
|
||||
switch (_handle.type)
|
||||
{
|
||||
case Handle::Shader:
|
||||
GL_CHECK(glObjectLabel(GL_SHADER, m_shaders[_handle.idx].m_id, -1, _name) );
|
||||
break;
|
||||
|
||||
case Handle::Texture:
|
||||
GL_CHECK(glObjectLabel(GL_TEXTURE, m_textures[_handle.idx].m_id, -1, _name) );
|
||||
break;
|
||||
|
||||
default:
|
||||
BX_CHECK(false, "Invalid handle type?! %d", _handle.type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void submitBlit(BlitState& _bs, uint16_t _view);
|
||||
|
|
|
@ -840,6 +840,14 @@ typedef uint64_t GLuint64;
|
|||
# define GL_UPPER_LEFT 0x8CA2
|
||||
#endif // GL_UPPER_LEFT
|
||||
|
||||
#ifndef GL_SHADER
|
||||
# define GL_SHADER 0x82E1
|
||||
#endif // GL_SHADER
|
||||
|
||||
#ifndef GL_TEXTURE
|
||||
# define GL_TEXTURE 0x1702
|
||||
#endif // GL_TEXTURE
|
||||
|
||||
// _KHR or _ARB...
|
||||
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
|
||||
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
|
||||
|
|
Loading…
Reference in New Issue