glCreateBuffers was introduced by DSA in GL45, however this test can run also
in GL44 mode. Do not call it.
Additionaly add glBindTexture call before glIsTexture, so texture is properly
created before check.
Changed tests:
GL44-CTS.khr_debug.*
Components: OpenGL
VK-GL-CTS Issue: 27
Change-Id: I8397bc10f64194cc7bce32f67260066b8101a3f6
GLuint texture_id = 0;
GLuint invalid_id = 1;
m_gl->genTextures(1, &texture_id);
GLuint texture_id = 0;
GLuint invalid_id = 1;
m_gl->genTextures(1, &texture_id);
+ m_gl->bindTexture(GL_TEXTURE_2D, texture_id);
GLU_EXPECT_NO_ERROR(m_gl->getError(), "GenTextures");
try
GLU_EXPECT_NO_ERROR(m_gl->getError(), "GenTextures");
try
*
* @return ID of created resource
**/
*
* @return ID of created resource
**/
-GLuint LabelsTest::createBuffer(const Functions* gl, const glu::RenderContext*)
+GLuint LabelsTest::createBuffer(const Functions* gl, const glu::RenderContext* rc)
- gl->createBuffers(1, &id);
- GLU_EXPECT_NO_ERROR(gl->getError(), "CreateBuffers");
+ if (glu::contextSupports(rc->getType(), glu::ApiType::core(4, 5)))
+ {
+ gl->createBuffers(1, &id);
+ GLU_EXPECT_NO_ERROR(gl->getError(), "CreateBuffers");
+ }
+ else
+ {
+ gl->genBuffers(1, &id);
+ gl->bindBuffer(GL_ARRAY_BUFFER, id);
+ GLU_EXPECT_NO_ERROR(gl->getError(), "GenBuffers");
+ }