D3D8: Add detection for GL_ARB_point_sprite support

H. Verbeet hverbeet at gmail.com
Sat Jan 21 17:26:49 CST 2006


http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=624efed78e0ae83d19fd1c7210ddd0b5b30d129b
 should use GL_SUPPORT the proper way. For d3d8 GL_SUPPORT is defined
as
#define GL_SUPPORT(ExtName)           (TRUE ==
This->direct3d8->gl_info.supported[ExtName])
It should be called with a member of the GL_SupportedExt enum and
neither GL_ARB_point_sprite nor GL_ARB_multisample are (both just get
set to 1 when their respective sets of defines are defined). In order
to use GL_SUPPORT the proper way, d3d8 should be able to detect if
GL_ARB_point_sprite support is present. This patch adds that.

Changelog:
  - Add detection for GL_ARB_point_sprite
-------------- next part --------------
diff --git a/dlls/d3d8/d3dcore_gl.h b/dlls/d3d8/d3dcore_gl.h
index 173ee74..6bacc5f 100644
--- a/dlls/d3d8/d3dcore_gl.h
+++ b/dlls/d3d8/d3dcore_gl.h
@@ -656,6 +656,7 @@ typedef enum _GL_SupportedExt {
   ARB_MULTISAMPLE,
   ARB_MULTITEXTURE,
   ARB_POINT_PARAMETERS,
+  ARB_POINT_SPRITE,
   ARB_TEXTURE_COMPRESSION,
   ARB_TEXTURE_CUBE_MAP,
   ARB_TEXTURE_ENV_ADD,
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 9454aa8..a324855 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -398,6 +398,9 @@ static void IDirect3D8Impl_FillGLCaps(LP
 	  TRACE_(d3d_caps)(" FOUND: ARB Multitexture support - GL_MAX_TEXTURE_UNITS_ARB=%u\n", gl_max);
 	  This->gl_info.supported[ARB_MULTITEXTURE] = TRUE;
 	  This->gl_info.max_textures = min(8, gl_max);
+	} else if (strcmp(ThisExtn, "GL_ARB_point_sprite") == 0) {
+	  TRACE_(d3d_caps)(" FOUND: ARB Point sprite support\n");
+	  This->gl_info.supported[ARB_POINT_SPRITE] = TRUE;
         } else if (strcmp(ThisExtn, "GL_ARB_texture_cube_map") == 0) {
 	  TRACE_(d3d_caps)(" FOUND: ARB Texture Cube Map support\n");
 	  This->gl_info.supported[ARB_TEXTURE_CUBE_MAP] = TRUE;










More information about the wine-patches mailing list