From 1264914e7c61767836b0f3f2c3060eb772313693 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/20] 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 7310731..b8c9df9 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -734,12 +734,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