From 320b8b57d613a856478671645c83a56ed8330f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 17 Dec 2009 18:11:20 +0100 Subject: [PATCH 01/20] WineD3D: Revert the GL usage confusion This is functionally a revert of 8eeb513b1a0e7a4f7963612f0305850499c9ec7d. The language of the extension is slightly confusing to me, but GL_STREAM_*_ARB is more dynamic than GL_DYNAMIC_*_ARB. So use GL_STREAM usage for D3DUSAGE_DYNAMIC buffers and GL_DYNAMIC usage for non-dynamic buffers. http://www.opengl.org/wiki/Buffer_Objects#Buffer_Object_Usage has a clearer description of the usage terms. This patch does not bring back the switch-case statement 8eeb513b removed, and doesn't take the WRITEONLY usage into account, which has no effect on the GL hint - these buffers are always _DRAW buffers. --- dlls/wined3d/buffer.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index ff1ebd7..7310731 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -83,13 +83,13 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This) */ if(This->resource.usage & WINED3DUSAGE_DYNAMIC) { - TRACE("Gl usage = GL_DYNAMIC_DRAW\n"); - gl_usage = GL_DYNAMIC_DRAW_ARB; + TRACE("Gl usage = GL_STREAM_DRAW_ARB\n"); + gl_usage = GL_STREAM_DRAW_ARB; } else { - TRACE("Gl usage = GL_STREAM_DRAW\n"); - gl_usage = GL_STREAM_DRAW_ARB; + TRACE("Gl usage = GL_DYNAMIC_DRAW_ARB\n"); + gl_usage = GL_DYNAMIC_DRAW_ARB; } /* Reserve memory for the buffer. The amount of data won't change -- 1.6.4.4