wined3d: Update clip planes when switching to/from offscreen rendering.
Matteo Bruni
matteo.mystral at gmail.com
Mon Jan 31 08:13:05 CST 2011
It should fix http://bugs.winehq.org/show_bug.cgi?id=25877
-------------- next part --------------
From afd1ca9b796b819b3aeeaa54a5681cd20f805a05 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni at codeweavers.com>
Date: Sat, 29 Jan 2011 22:54:21 +0100
Subject: wined3d: Update clip planes when switching to/from offscreen rendering.
---
dlls/wined3d/context.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index b7abc0f..4ba9787 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1969,8 +1969,15 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
static inline void context_set_render_offscreen(struct wined3d_context *context, const struct StateEntry *StateTable,
BOOL offscreen)
{
+ const struct wined3d_gl_info *gl_info = context->gl_info;
+ unsigned int i;
+
if (context->render_offscreen == offscreen) return;
+ for (i = 0; i < gl_info->limits.clipplanes; ++i)
+ {
+ Context_MarkStateDirty(context, STATE_CLIPPLANE(i), StateTable);
+ }
Context_MarkStateDirty(context, STATE_POINTSPRITECOORDORIGIN, StateTable);
Context_MarkStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION), StateTable);
Context_MarkStateDirty(context, STATE_VDECL, StateTable);
--
1.7.3.4
More information about the wine-patches
mailing list