Stefan Dösinger : wined3d: Add GL_APPLE_float_pixels.

Alexandre Julliard julliard at winehq.org
Tue Feb 26 05:45:21 CST 2008


Module: wine
Branch: master
Commit: 62694157936baf64d20ab10e2c464bd1b1d6d34b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=62694157936baf64d20ab10e2c464bd1b1d6d34b

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Feb 13 14:22:40 2008 +0100

wined3d: Add GL_APPLE_float_pixels.

---

 dlls/wined3d/directx.c    |   20 ++++++++++++++++++++
 include/wine/wined3d_gl.h |   20 ++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 58a2781..2e31f33 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -47,6 +47,7 @@ static const struct {
     {"GL_APPLE_fence",                      APPLE_FENCE,                    0                           },
     {"GL_APPLE_flush_render",               APPLE_FLUSH_RENDER,             0                           },
     {"GL_APPLE_ycbcr_422",                  APPLE_YCBCR_422,                0                           },
+    {"GL_APPLE_float_pixels",               APPLE_FLOAT_PIXELS,             0                           },
 
     /* ATI */
     {"GL_ATI_separate_stencil",             ATI_SEPARATE_STENCIL,           0                           },
@@ -784,6 +785,25 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
              */
             gl_info->supported[NV_FENCE] = FALSE;
         }
+        if (gl_info->supported[APPLE_FLOAT_PIXELS]) {
+            /* GL_APPLE_float_pixels == GL_ARB_texture_float + GL_ARB_half_float_pixel
+             *
+             * The enums are the same:
+             * GL_RGBA16F_ARB     = GL_RGBA_FLOAT16_APPLE = 0x881A
+             * GL_RGB16F_ARB      = GL_RGB_FLOAT16_APPLE  = 0x881B
+             * GL_RGBA32F_ARB     = GL_RGBA_FLOAT32_APPLE = 0x8814
+             * GL_RGB32F_ARB      = GL_RGB_FLOAT32_APPLE  = 0x8815
+             * GL_HALF_FLOAT_ARB  = GL_HALF_APPLE         =  0x140B
+             */
+            if(!gl_info->supported[ARB_TEXTURE_FLOAT]) {
+                TRACE_(d3d_caps)(" IMPLIED: GL_ARB_texture_float support(from GL_APPLE_float_pixels\n");
+                gl_info->supported[ARB_TEXTURE_FLOAT] = TRUE;
+            }
+            if(!gl_info->supported[ARB_HALF_FLOAT_PIXEL]) {
+                TRACE_(d3d_caps)(" IMPLIED: GL_ARB_half_float_pixel support(from GL_APPLE_float_pixels\n");
+                gl_info->supported[ARB_HALF_FLOAT_PIXEL] = TRUE;
+            }
+        }
         if (gl_info->supported[ARB_TEXTURE_CUBE_MAP]) {
             TRACE_(d3d_caps)(" IMPLIED: NVIDIA (NV) Texture Gen Reflection support\n");
             gl_info->supported[NV_TEXGEN_REFLECTION] = TRUE;
diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h
index bb46124..66bfad8 100644
--- a/include/wine/wined3d_gl.h
+++ b/include/wine/wined3d_gl.h
@@ -2887,6 +2887,25 @@ typedef void (WINE_GLAPI * PGLFNFINISHRENDERAPPLEPROC) (void);
 #define GL_SAMPLER_2D_RECT_SHADOW_ARB       0x8B64
 #endif
 
+/* GL_APPLE_float_pixels */
+#ifndef GL_APPLE_float_pixels
+#define GL_APPLE_float_pixels
+#define GL_HALF_APPLE                       0x140B
+#define GL_COLOR_FLOAT_APPLE                0x8A0F
+#define GL_RGBA_FLOAT32_APPLE               0x8814
+#define GL_RGB_FLOAT32_APPLE                0x8815
+#define GL_ALPHA_FLOAT32_APPLE              0x8816
+#define GL_INTENSITY_FLOAT32_APPLE          0x8817
+#define GL_LUMINANCE_FLOAT32_APPLE          0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE    0x8819
+#define GL_RGBA_FLOAT16_APPLE               0x881A
+#define GL_RGB_FLOAT16_APPLE                0x881B
+#define GL_ALPHA_FLOAT16_APPLE              0x881C
+#define GL_INTENSITY_FLOAT16_APPLE          0x881D
+#define GL_LUMINANCE_FLOAT16_APPLE          0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE    0x881F
+#endif
+
 /* GL_VERSION_2_0 */
 #ifndef GL_VERSION_2_0
 #define GL_VERSION_2_0 1
@@ -3251,6 +3270,7 @@ typedef enum _GL_SupportedExt {
   APPLE_CLIENT_STORAGE,
   APPLE_FLUSH_RENDER,
   APPLE_YCBCR_422,
+  APPLE_FLOAT_PIXELS,
   /* SGI */
   SGI_VIDEO_SYNC,
   SGIS_GENERATE_MIPMAP,




More information about the wine-cvs mailing list