}
}
+static GLenum
+_mesa_generic_type_for_internal_format(GLenum internalFormat)
+{
+ if (_mesa_is_enum_format_unsigned_int(internalFormat))
+ return GL_UNSIGNED_BYTE;
+ else if (_mesa_is_enum_format_signed_int(internalFormat))
+ return GL_BYTE;
+ else
+ return GL_FLOAT;
+}
+
/* default implementation of QueryInternalFormat driverfunc, for
* drivers not implementing ARB_internalformat_query2.
*/
break;
}
+ case GL_READ_PIXELS_TYPE: {
+ GLenum base_format = _mesa_base_tex_format(ctx, internalFormat);
+ if (base_format > 0)
+ params[0] = _mesa_generic_type_for_internal_format(internalFormat);
+ else
+ params[0] = GL_NONE;
+ break;
+ }
+
case GL_MANUAL_GENERATE_MIPMAP:
case GL_AUTO_GENERATE_MIPMAP:
case GL_SRGB_READ:
case GL_READ_PIXELS:
case GL_READ_PIXELS_FORMAT:
+ case GL_READ_PIXELS_TYPE:
ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname,
buffer);
break;
- case GL_READ_PIXELS_TYPE:
- /* @TODO */
- break;
-
case GL_TEXTURE_IMAGE_FORMAT:
/* @TODO */
break;