mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
wined3d: Index buffer creation adjustments.
Index buffer creation changes the bound gl buffer, thus the state has to be dirtified, similar to locking. In an error case the function returned without calling LEAVE_GL().
This commit is contained in:
parent
76ed11e180
commit
74d2632756
@ -447,6 +447,11 @@ static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This, IWineD3DIndexBufferIm
|
||||
GLenum error, glUsage;
|
||||
TRACE("Creating VBO for Index Buffer %p\n", object);
|
||||
|
||||
/* The following code will modify the ELEMENT_ARRAY_BUFFER binding, make sure it is
|
||||
* restored on the next draw
|
||||
*/
|
||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER);
|
||||
|
||||
ENTER_GL();
|
||||
while(glGetError());
|
||||
|
||||
@ -454,8 +459,7 @@ static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This, IWineD3DIndexBufferIm
|
||||
error = glGetError();
|
||||
if(error != GL_NO_ERROR || object->vbo == 0) {
|
||||
ERR("Creating a vbo failed, continueing without vbo for this buffer\n");
|
||||
object->vbo = 0;
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, object->vbo));
|
||||
|
Loading…
Reference in New Issue
Block a user