IterateResult iterate (void);
protected:
- virtual void createTexture (void) = 0;
+ virtual void createTexture (GLuint texture) = 0;
tcu::TestContext& m_testCtx;
glu::RenderContext& m_renderCtx;
glViewport (offsetX, offsetY, viewportWidth, viewportHeight);
- createTexture ();
+ GLuint texture;
+ glGenTextures(1, &texture);
+ createTexture(texture);
+
renderer.renderQuad (0, &texCoord[0], glu::TextureTestUtil::TEXTURETYPE_2D);
glu::readPixels (m_renderCtx, offsetX, offsetY, renderedFrame.getAccess());
bool isOk = compareToConstantColor(log, "Result", "Image comparison result", renderedFrame, tcu::COMPARE_LOG_RESULT, m_compareColor);
+ glDeleteTextures(1, &texture);
+
m_testCtx.setTestResult(isOk ? QP_TEST_RESULT_PASS : QP_TEST_RESULT_FAIL,
isOk ? "Pass" : "Image comparison failed");
return STOP;
IterateResult iterate (void);
protected:
- virtual void createTexture (void) = 0;
+ virtual void createTexture (GLuint texture) = 0;
tcu::TestContext& m_testCtx;
glu::RenderContext& m_renderCtx;
int offsetX = random.getInt(0, de::max(0,m_renderCtx.getRenderTarget().getWidth() - 64));
int offsetY = random.getInt(0, de::max(0,m_renderCtx.getRenderTarget().getHeight() - 64));
- createTexture();
+ GLuint texture;
+ glGenTextures(1, &texture);
+ createTexture(texture);
for (int face = 0; face < tcu::CUBEFACE_LAST; face++)
{
allFacesOk = false;
}
+ glDeleteTextures(1, &texture);
+
m_testCtx.setTestResult(allFacesOk ? QP_TEST_RESULT_PASS : QP_TEST_RESULT_FAIL,
allFacesOk ? "Pass" : "Image comparison failed");
return STOP;
Incomplete2DSizeCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, IVec2 invalidLevelSize, int invalidLevelNdx, const glu::ContextInfo& ctxInfo);
~Incomplete2DSizeCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
int m_invalidLevelNdx;
{
}
-void Incomplete2DSizeCase::createTexture (void)
+void Incomplete2DSizeCase::createTexture (GLuint texture)
{
static const char* const s_relaxingExtensions[] =
{
tcu::TextureLevel levelData (fmt);
TestLog& log = m_testCtx.getLog();
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);
Incomplete2DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 format, deUint32 invalidFormat, int invalidLevelNdx);
~Incomplete2DFormatCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
int m_invalidLevelNdx;
{
}
-void Incomplete2DFormatCase::createTexture (void)
+void Incomplete2DFormatCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(m_format, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);
Incomplete2DMissingLevelCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, int missingLevelNdx);
~Incomplete2DMissingLevelCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
int m_missingLevelNdx;
{
}
-void Incomplete2DMissingLevelCase::createTexture (void)
+void Incomplete2DMissingLevelCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);
Incomplete2DWrapModeCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 wrapT, deUint32 wrapS, const glu::ContextInfo& ctxInfo);
~Incomplete2DWrapModeCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
deUint32 m_wrapT;
{
}
-void Incomplete2DWrapModeCase::createTexture (void)
+void Incomplete2DWrapModeCase::createTexture (GLuint texture)
{
TestLog& log = m_testCtx.getLog();
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures(1, &texture);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glBindTexture(GL_TEXTURE_2D, texture);
Complete2DExtraLevelCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
~Complete2DExtraLevelCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
IVec2 m_size;
{
}
-void Complete2DExtraLevelCase::createTexture (void)
+void Complete2DExtraLevelCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);
Incomplete2DEmptyObjectCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
~Incomplete2DEmptyObjectCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
IVec2 m_size;
{
}
-void Incomplete2DEmptyObjectCase::createTexture (void)
+void Incomplete2DEmptyObjectCase::createTexture (GLuint texture)
{
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);
IncompleteCubeSizeCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, IVec2 invalidLevelSize, int invalidLevelNdx, tcu::CubeFace invalidCubeFace);
~IncompleteCubeSizeCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
int m_invalidLevelNdx;
{
}
-void IncompleteCubeSizeCase::createTexture (void)
+void IncompleteCubeSizeCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_CUBE_MAP, texture);
IncompleteCubeFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 format, deUint32 invalidFormat, tcu::CubeFace invalidCubeFace);
~IncompleteCubeFormatCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
deUint32 m_format;
{
}
-void IncompleteCubeFormatCase::createTexture (void)
+void IncompleteCubeFormatCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_CUBE_MAP, texture);
IncompleteCubeMissingLevelCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, int invalidLevelNdx, tcu::CubeFace invalidCubeFace);
~IncompleteCubeMissingLevelCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
int m_invalidLevelNdx;
{
}
-void IncompleteCubeMissingLevelCase::createTexture (void)
+void IncompleteCubeMissingLevelCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_CUBE_MAP, texture);
IncompleteCubeWrapModeCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 wrapT, deUint32 wrapS, const glu::ContextInfo& ctxInfo);
~IncompleteCubeWrapModeCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
deUint32 m_wrapT;
{
}
-void IncompleteCubeWrapModeCase::createTexture (void)
+void IncompleteCubeWrapModeCase::createTexture (GLuint texture)
{
TestLog& log = m_testCtx.getLog();
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures(1, &texture);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glBindTexture(GL_TEXTURE_2D, texture);
CompleteCubeExtraLevelCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
~CompleteCubeExtraLevelCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
IVec2 m_size;
{
}
-void CompleteCubeExtraLevelCase::createTexture (void)
+void CompleteCubeExtraLevelCase::createTexture (GLuint texture)
{
tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
tcu::TextureLevel levelData (fmt);
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);
IncompleteCubeEmptyObjectCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
~IncompleteCubeEmptyObjectCase (void) {}
- virtual void createTexture (void);
+ virtual void createTexture (GLuint texture);
private:
IVec2 m_size;
{
}
-void IncompleteCubeEmptyObjectCase::createTexture (void)
+void IncompleteCubeEmptyObjectCase::createTexture (GLuint texture)
{
- GLuint texture;
- glGenTextures (1, &texture);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glBindTexture (GL_TEXTURE_2D, texture);