fix some FBO/texture queries (bug 15296)

This commit is contained in:
Brian Paul
2008-08-06 08:39:54 -06:00
parent c20a173656
commit f1e4ca776f

View File

@@ -1513,8 +1513,13 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
return; return;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
if (att->Type == GL_TEXTURE) { if (att->Type == GL_TEXTURE) {
if (att->Texture && att->Texture->Target == GL_TEXTURE_CUBE_MAP) {
*params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace; *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace;
} }
else {
*params = 0;
}
}
else { else {
_mesa_error(ctx, GL_INVALID_ENUM, _mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)"); "glGetFramebufferAttachmentParameterivEXT(pname)");
@@ -1522,8 +1527,13 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
return; return;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
if (att->Type == GL_TEXTURE) { if (att->Type == GL_TEXTURE) {
if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) {
*params = att->Zoffset; *params = att->Zoffset;
} }
else {
*params = 0;
}
}
else { else {
_mesa_error(ctx, GL_INVALID_ENUM, _mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)"); "glGetFramebufferAttachmentParameterivEXT(pname)");