From 60b3110dc703eb7c9855e51f69ccedb2380965ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 17 Dec 2009 18:32:41 +0100 Subject: [PATCH 02/25] WineD3D: Use unload instead of duplicating buffer remove code --- dlls/wined3d/buffer.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index e24546c..b26f37d 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -742,12 +742,8 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) { FIXME("Too many declaration changes, stopping converting\n"); - ENTER_GL(); - GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object)); - checkGLcall("glDeleteBuffersARB"); - LEAVE_GL(); - This->buffer_object = 0; - HeapFree(GetProcessHeap(), 0, This->conversion_shift); + IWineD3DBuffer_UnLoad(iface); + This->flags &= ~WINED3D_BUFFER_CREATEBO; /* The stream source state handler might have read the memory of the vertex buffer already * and got the memory in the vbo which is not valid any longer. Dirtify the stream source -- 1.6.4.4