Vitaly Budovski : wined3d: Fixed WINED3DRS_POINTSPRITEENABLE.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Feb 3 05:39:29 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 8f3c98fdfd44165aebcdc75215c835af475d6360
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=8f3c98fdfd44165aebcdc75215c835af475d6360
Author: Vitaly Budovski <vbudovsk at cs.rmit.edu.au>
Date: Fri Feb 3 12:37:46 2006 +0100
wined3d: Fixed WINED3DRS_POINTSPRITEENABLE.
---
dlls/wined3d/device.c | 43 ++++++++++++++++++++++---------------------
1 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a491343..c5c4c47 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3576,29 +3576,30 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRen
return D3DERR_INVALIDCALL;
}
case WINED3DRS_POINTSPRITEENABLE :
+ {
/* TODO: NV_POINT_SPRITE */
- if (GL_SUPPORT(ARB_POINT_SPRITE)) {
- if (Value != FALSE) {
- /* Doesn't work with GL_POINT_SMOOTH on on my ATI 9600, but then ATI drivers are buggered! */
- glDisable(GL_POINT_SMOOTH);
- /* Centre the texture on the vertex */
- VTRACE("glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n");
- glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
-
- VTRACE("glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n");
- glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
- checkGLcall("glTexEnvf(...)");
- VTRACE("glEnable( GL_POINT_SPRITE_ARB )\n");
- glEnable( GL_POINT_SPRITE_ARB );
- checkGLcall("glEnable(...)");
- } else {
- VTRACE("glDisable( GL_POINT_SPRITE_ARB )\n");
- glDisable( GL_POINT_SPRITE_ARB );
- checkGLcall("glEnable(...)");
- }
+ if (!GL_SUPPORT(ARB_POINT_SPRITE)) {
+ TRACE("Point sprites not supported\n");
+ break;
}
- break;
- /* Unhandled yet...! */
+
+ /*
+ * Point sprites are always enabled. Value controls texture coordinate
+ * replacement mode. Must be set true for point sprites to use
+ * textures.
+ */
+ glEnable(GL_POINT_SPRITE_ARB);
+ checkGLcall("glEnable(GL_POINT_SPRITE_ARB)");
+
+ if (Value) {
+ glTexEnvf(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, TRUE);
+ checkGLcall("glTexEnvf(GL_POINT_SPRITE, GL_COORD_REPLACE, TRUE)");
+ } else {
+ glTexEnvf(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, FALSE);
+ checkGLcall("glTexEnvf(GL_POINT_SPRITE, GL_COORD_REPLACE, FALSE)");
+ }
+ break;
+ }
case WINED3DRS_EDGEANTIALIAS :
{
if(Value) {
More information about the wine-cvs
mailing list