Ivan Gyurdiev : wined3d:
Add D3DCLIPPLANE constants to the WINED3D namespace.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 13 05:25:43 CDT 2006
Module: wine
Branch: master
Commit: 4745e602d2936c8f81f02d01a0ceeb3b6ef6dda8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4745e602d2936c8f81f02d01a0ceeb3b6ef6dda8
Author: Ivan Gyurdiev <ivg231 at gmail.com>
Date: Thu Oct 12 23:35:35 2006 -0400
wined3d: Add D3DCLIPPLANE constants to the WINED3D namespace.
---
dlls/wined3d/device.c | 26 +++++++++++++-------------
dlls/wined3d/directx.c | 2 +-
dlls/wined3d/wined3d_private.h | 4 +---
include/wine/wined3d_types.h | 8 ++++++++
4 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ee966b0..ab94a1e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3687,19 +3687,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl
disable = ~Value & OldValue;
}
- if (enable & D3DCLIPPLANE0) { glEnable(GL_CLIP_PLANE0); checkGLcall("glEnable(clip plane 0)"); }
- if (enable & D3DCLIPPLANE1) { glEnable(GL_CLIP_PLANE1); checkGLcall("glEnable(clip plane 1)"); }
- if (enable & D3DCLIPPLANE2) { glEnable(GL_CLIP_PLANE2); checkGLcall("glEnable(clip plane 2)"); }
- if (enable & D3DCLIPPLANE3) { glEnable(GL_CLIP_PLANE3); checkGLcall("glEnable(clip plane 3)"); }
- if (enable & D3DCLIPPLANE4) { glEnable(GL_CLIP_PLANE4); checkGLcall("glEnable(clip plane 4)"); }
- if (enable & D3DCLIPPLANE5) { glEnable(GL_CLIP_PLANE5); checkGLcall("glEnable(clip plane 5)"); }
-
- if (disable & D3DCLIPPLANE0) { glDisable(GL_CLIP_PLANE0); checkGLcall("glDisable(clip plane 0)"); }
- if (disable & D3DCLIPPLANE1) { glDisable(GL_CLIP_PLANE1); checkGLcall("glDisable(clip plane 1)"); }
- if (disable & D3DCLIPPLANE2) { glDisable(GL_CLIP_PLANE2); checkGLcall("glDisable(clip plane 2)"); }
- if (disable & D3DCLIPPLANE3) { glDisable(GL_CLIP_PLANE3); checkGLcall("glDisable(clip plane 3)"); }
- if (disable & D3DCLIPPLANE4) { glDisable(GL_CLIP_PLANE4); checkGLcall("glDisable(clip plane 4)"); }
- if (disable & D3DCLIPPLANE5) { glDisable(GL_CLIP_PLANE5); checkGLcall("glDisable(clip plane 5)"); }
+ if (enable & WINED3DCLIPPLANE0) { glEnable(GL_CLIP_PLANE0); checkGLcall("glEnable(clip plane 0)"); }
+ if (enable & WINED3DCLIPPLANE1) { glEnable(GL_CLIP_PLANE1); checkGLcall("glEnable(clip plane 1)"); }
+ if (enable & WINED3DCLIPPLANE2) { glEnable(GL_CLIP_PLANE2); checkGLcall("glEnable(clip plane 2)"); }
+ if (enable & WINED3DCLIPPLANE3) { glEnable(GL_CLIP_PLANE3); checkGLcall("glEnable(clip plane 3)"); }
+ if (enable & WINED3DCLIPPLANE4) { glEnable(GL_CLIP_PLANE4); checkGLcall("glEnable(clip plane 4)"); }
+ if (enable & WINED3DCLIPPLANE5) { glEnable(GL_CLIP_PLANE5); checkGLcall("glEnable(clip plane 5)"); }
+
+ if (disable & WINED3DCLIPPLANE0) { glDisable(GL_CLIP_PLANE0); checkGLcall("glDisable(clip plane 0)"); }
+ if (disable & WINED3DCLIPPLANE1) { glDisable(GL_CLIP_PLANE1); checkGLcall("glDisable(clip plane 1)"); }
+ if (disable & WINED3DCLIPPLANE2) { glDisable(GL_CLIP_PLANE2); checkGLcall("glDisable(clip plane 2)"); }
+ if (disable & WINED3DCLIPPLANE3) { glDisable(GL_CLIP_PLANE3); checkGLcall("glDisable(clip plane 3)"); }
+ if (disable & WINED3DCLIPPLANE4) { glDisable(GL_CLIP_PLANE4); checkGLcall("glDisable(clip plane 4)"); }
+ if (disable & WINED3DCLIPPLANE5) { glDisable(GL_CLIP_PLANE5); checkGLcall("glDisable(clip plane 5)"); }
/** update clipping status */
if (enable) {
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 9494b38..a5fd74a 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -489,7 +489,7 @@ #undef USE_GL_FUNC
/* Retrieve opengl defaults */
glGetIntegerv(GL_MAX_CLIP_PLANES, &gl_max);
- gl_info->max_clipplanes = min(D3DMAXUSERCLIPPLANES, gl_max);
+ gl_info->max_clipplanes = min(WINED3DMAXUSERCLIPPLANES, gl_max);
TRACE_(d3d_caps)("ClipPlanes support - num Planes=%d\n", gl_max);
glGetIntegerv(GL_MAX_LIGHTS, &gl_max);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 60a934a..abdd1f0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -51,7 +51,7 @@ #define MAX_STREAMS 16
#define MAX_TEXTURES 8
#define MAX_SAMPLERS 16
#define MAX_ACTIVE_LIGHTS 8
-#define MAX_CLIPPLANES D3DMAXUSERCLIPPLANES
+#define MAX_CLIPPLANES WINED3DMAXUSERCLIPPLANES
#define MAX_LEVELS 256
#define MAX_CONST_I 16
@@ -221,8 +221,6 @@ #define MAX_STREAMS 16 /* Maximum poss
/* Maximum number of constants provided to the shaders */
#define HIGHEST_TRANSFORMSTATE 512
/* Highest value in WINED3DTRANSFORMSTATETYPE */
-#define MAX_CLIPPLANES D3DMAXUSERCLIPPLANES
-
#define MAX_PALETTES 256
/* Checking of API calls */
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h
index baa0c52..d1964eb 100644
--- a/include/wine/wined3d_types.h
+++ b/include/wine/wined3d_types.h
@@ -1334,4 +1334,12 @@ #define WINED3DPRESENT_INTERVAL_THREE
#define WINED3DPRESENT_INTERVAL_FOUR 0x00000008
#define WINED3DPRESENT_INTERVAL_IMMEDIATE 0x80000000
+#define WINED3DMAXUSERCLIPPLANES 32
+#define WINED3DCLIPPLANE0 (1 << 0)
+#define WINED3DCLIPPLANE1 (1 << 1)
+#define WINED3DCLIPPLANE2 (1 << 2)
+#define WINED3DCLIPPLANE3 (1 << 3)
+#define WINED3DCLIPPLANE4 (1 << 4)
+#define WINED3DCLIPPLANE5 (1 << 5)
+
#endif
More information about the wine-cvs
mailing list