Henri Verbeet : wined3d: Standalone surfaces should never be sRGB.
Module: wine Branch: master Commit: ddc7a803e96897b8e95e9ce6ca54021cbb68e87d URL: http://source.winehq.org/git/wine.git/?a=commit;h=ddc7a803e96897b8e95e9ce6ca... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Mar 2 08:55:48 2011 +0100 wined3d: Standalone surfaces should never be sRGB. --- dlls/wined3d/surface.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index b0f9dc6..0897467 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -707,24 +707,25 @@ void surface_bind(IWineD3DSurfaceImpl *surface, BOOL srgb) } else { - GLuint *name = srgb ? &surface->texture_name_srgb : &surface->texture_name; - if (surface->texture_level) { ERR("Standalone surface %p is non-zero texture level %u.\n", surface, surface->texture_level); } + if (srgb) + ERR("Trying to bind standalone surface %p as sRGB.\n", surface); + ENTER_GL(); - if (!*name) + if (!surface->texture_name) { - glGenTextures(1, name); + glGenTextures(1, &surface->texture_name); checkGLcall("glGenTextures"); - TRACE("Surface %p given name %u.\n", surface, *name); + TRACE("Surface %p given name %u.\n", surface, surface->texture_name); - glBindTexture(surface->texture_target, *name); + glBindTexture(surface->texture_target, surface->texture_name); checkGLcall("glBindTexture"); glTexParameteri(surface->texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(surface->texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); @@ -735,7 +736,7 @@ void surface_bind(IWineD3DSurfaceImpl *surface, BOOL srgb) } else { - glBindTexture(surface->texture_target, *name); + glBindTexture(surface->texture_target, surface->texture_name); checkGLcall("glBindTexture"); }
participants (1)
-
Alexandre Julliard