gl->framebufferTexture = (glFramebufferTextureFunc) loader->get("glFramebufferTextureEXT");
}
+if (de::contains(extSet, "GL_EXT_robustness"))
+{
+ gl->getGraphicsResetStatus = (glGetGraphicsResetStatusFunc) loader->get("glGetGraphicsResetStatusEXT");
+ gl->getnUniformfv = (glGetnUniformfvFunc) loader->get("glGetnUniformfvEXT");
+ gl->getnUniformiv = (glGetnUniformivFunc) loader->get("glGetnUniformivEXT");
+ gl->readnPixels = (glReadnPixelsFunc) loader->get("glReadnPixelsEXT");
+}
+
if (de::contains(extSet, "GL_EXT_texture_buffer"))
{
gl->texBuffer = (glTexBufferFunc) loader->get("glTexBufferEXT");
void readn_pixels (NegativeTestContext& ctx)
{
+ std::vector<GLfloat> floatData (4);
std::vector<GLubyte> ubyteData (4);
GLuint fbo = 0x1234;
ctx.beginSection("GL_INVALID_OPERATION is generated by ReadnPixels if the buffer size required to store the requested data is larger than bufSize.");
ctx.glReadnPixels(0, 0, 0x1234, 0x1234, GL_RGBA, GL_UNSIGNED_BYTE, (int) ubyteData.size(), &ubyteData[0]);
ctx.expectError(GL_INVALID_OPERATION);
+ ctx.glReadnPixels(0, 0, 1, 1, GL_RGBA, GL_FLOAT, (int) floatData.size(), &floatData[0]);
+ ctx.expectError(GL_INVALID_OPERATION);
ctx.endSection();
ctx.beginSection("GL_INVALID_FRAMEBUFFER_OPERATION is generated if the currently bound framebuffer is not framebuffer complete.");
{
std::vector<GLubyte> ubyteData (4);
std::vector<GLushort> ushortData (4);
- std::vector<GLfloat> floatData (4);
GLint readFormat = 0x1234;
GLint readType = 0x1234;
ctx.expectError(GL_INVALID_OPERATION);
ctx.glReadPixels(0, 0, 1, 1, GL_ALPHA, GL_UNSIGNED_SHORT_5_5_5_1, &ushortData[0]);
ctx.expectError(GL_INVALID_OPERATION);
- ctx.glReadnPixels(0, 0, 1, 1, GL_RGBA, GL_FLOAT, (int) floatData.size(), &floatData[0]);
- ctx.expectError(GL_INVALID_OPERATION);
ctx.endSection();
ctx.beginSection("GL_RGBA/GL_UNSIGNED_BYTE is always accepted and the other acceptable pair can be discovered by querying GL_IMPLEMENTATION_COLOR_READ_FORMAT and GL_IMPLEMENTATION_COLOR_READ_TYPE.");