Commit ddc7a803 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Standalone surfaces should never be sRGB.

parent fe425a2f
......@@ -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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment