diff options
author | marha <marha@users.sourceforge.net> | 2011-04-15 15:08:38 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-15 15:08:38 +0000 |
commit | 205a4bdae76f287126db9f45a4f0ba631e3efca1 (patch) | |
tree | 6327d3e449dfe53ad6ee6125290581aae6f5ed35 /mesalib/src/mesa/main/fbobject.c | |
parent | 898081f31f99dc35a1602a607a07d1aaff49ac40 (diff) | |
parent | 71372d36e1a3f0230b88808f70d35446fda12260 (diff) | |
download | vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.tar.gz vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.tar.bz2 vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r-- | mesalib/src/mesa/main/fbobject.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 76493f1a8..a961e68cb 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -1145,7 +1145,37 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_INTENSITY16_SNORM:
return ctx->Extensions.EXT_texture_snorm &&
ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0;
- /* XXX add floating point and integer formats eventually */
+ case GL_R16F:
+ case GL_R32F:
+ return ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.ARB_texture_float ? GL_RED : 0;
+ case GL_RG16F:
+ case GL_RG32F:
+ return ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.ARB_texture_float ? GL_RG : 0;
+ case GL_RGB16F:
+ case GL_RGB32F:
+ return ctx->Extensions.ARB_texture_float ? GL_RGB : 0;
+ case GL_RGBA16F:
+ case GL_RGBA32F:
+ return ctx->Extensions.ARB_texture_float ? GL_RGBA : 0;
+ case GL_ALPHA16F_ARB:
+ case GL_ALPHA32F_ARB:
+ return ctx->Extensions.ARB_texture_float &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
+ case GL_LUMINANCE16F_ARB:
+ case GL_LUMINANCE32F_ARB:
+ return ctx->Extensions.ARB_texture_float &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0;
+ case GL_LUMINANCE_ALPHA16F_ARB:
+ case GL_LUMINANCE_ALPHA32F_ARB:
+ return ctx->Extensions.ARB_texture_float &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0;
+ case GL_INTENSITY16F_ARB:
+ case GL_INTENSITY32F_ARB:
+ return ctx->Extensions.ARB_texture_float &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0;
+ /* XXX add integer formats eventually */
default:
return 0;
}
|