Stefan Dösinger : wined3d: Remove maxConcurrentLights from the device.
Alexandre Julliard
julliard at winehq.org
Wed May 18 11:15:34 CDT 2011
Module: wine
Branch: master
Commit: 5c6c0193404a5226daa4ad788d98d2a37803006f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c6c0193404a5226daa4ad788d98d2a37803006f
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Wed May 18 09:12:40 2011 +0200
wined3d: Remove maxConcurrentLights from the device.
---
dlls/wined3d/device.c | 7 +++----
dlls/wined3d/state.c | 2 +-
dlls/wined3d/wined3d_private.h | 1 -
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7570bca..b0cfc1d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1279,8 +1279,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
/* Initialize the current view state */
device->view_ident = 1;
device->contexts[0]->last_was_rhw = 0;
- glGetIntegerv(GL_MAX_LIGHTS, &device->maxConcurrentLights);
- checkGLcall("glGetIntegerv(GL_MAX_LIGHTS, &device->maxConcurrentLights)");
switch (wined3d_settings.offscreen_rendering_mode)
{
@@ -2129,9 +2127,10 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
}
else
{
- int i;
+ unsigned int i;
+ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
/* Find a free GL light. */
- for (i = 0; i < device->maxConcurrentLights; ++i)
+ for (i = 0; i < gl_info->limits.lights; ++i)
{
if (!device->updateStateBlock->state.lights[i])
{
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 70e39d7..36cc891 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3859,7 +3859,7 @@ static void transform_view(DWORD state, struct wined3d_stateblock *stateblock, s
checkGLcall("glLoadMatrixf(...)");
/* Reset lights. TODO: Call light apply func */
- for (k = 0; k < stateblock->device->maxConcurrentLights; ++k)
+ for (k = 0; k < gl_info->limits.lights; ++k)
{
light = stateblock->state.lights[k];
if(!light) continue;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 08a8469..cb221e4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1654,7 +1654,6 @@ struct wined3d_device
LONG exStyle;
/* X and GL Information */
- GLint maxConcurrentLights;
GLenum offscreenBuffer;
/* Selected capabilities */
More information about the wine-cvs
mailing list