wined3d: Use unload instead of duplicating buffer remove code.

This commit is contained in:
Stefan Dösinger 2009-12-17 18:32:41 +01:00 committed by Alexandre Julliard
parent 4590dc4806
commit 1d37ae6f61
1 changed files with 2 additions and 6 deletions

View File

@ -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