Бранимир Караџић 7 years ago
parent
commit
916d159965
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/renderer_gl.cpp

+ 5 - 1
src/renderer_gl.cpp

@@ -3007,10 +3007,14 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
 			case Handle::Texture:
 			case Handle::Texture:
 				{
 				{
 					GLint id = m_textures[_handle.idx].m_id;
 					GLint id = m_textures[_handle.idx].m_id;
-					if (0 != id /* write only texture */)
+					if (0 != id)
 					{
 					{
 						GL_CHECK(glObjectLabel(GL_TEXTURE, id, len, _name) );
 						GL_CHECK(glObjectLabel(GL_TEXTURE, id, len, _name) );
 					}
 					}
+					else
+					{
+						GL_CHECK(glObjectLabel(GL_RENDERBUFFER, m_textures[_handle.idx].m_rbo, len, _name) );
+					}
 				}
 				}
 				break;
 				break;