Commit f460b386 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Fix compilation (VBO constants).

parent bce44161
......@@ -5012,7 +5012,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
void *src;
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, dest->vbo));
checkGLcall("glBindBufferARB");
src = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_ONLY));
src = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB));
if(src) {
memcpy(dest->resource.allocatedMemory, src, dest->resource.size);
}
......@@ -5030,7 +5030,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
if(dest->vbo) {
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, dest->vbo));
dest_conv = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY));
dest_conv = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB));
if(!dest_conv) {
ERR("glMapBuffer failed\n");
/* Continue without storing converted vertices */
......@@ -5349,7 +5349,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, SrcImpl->vbo));
checkGLcall("glBindBufferARB");
src = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_ONLY));
src = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB));
if(src) {
memcpy(SrcImpl->resource.allocatedMemory, src, SrcImpl->resource.size);
}
......
......@@ -142,9 +142,9 @@ static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
/* Using shaders? No conversion needed, the shaders handle this */
TRACE("Using vertex shaders, not doing any vertex conversion\n");
ENTER_GL();
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER, This->vbo));
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
checkGLcall("glBindBufferARB");
GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER, 0, This->resource.size, This->resource.allocatedMemory));
GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, This->resource.size, This->resource.allocatedMemory));
checkGLcall("glUnmapBuffer glBufferSubDataARB");
LEAVE_GL();
HeapFree(GetProcessHeap(), 0, This->resource.allocatedMemory);
......@@ -299,9 +299,9 @@ static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
}
ENTER_GL();
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER, This->vbo));
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
checkGLcall("glBindBufferARB");
GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER, start, end - start, data));
GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, start, end - start, data));
checkGLcall("glBufferSubDataARB");
LEAVE_GL();
......@@ -346,21 +346,21 @@ static HRESULT WINAPI IWineD3DVertexBufferImpl_Lock(IWineD3DVertexBuffer *iface
data = This->resource.allocatedMemory;
This->Flags |= VBFLAG_DIRTY;
} else {
GLenum mode = GL_READ_WRITE;
GLenum mode = GL_READ_WRITE_ARB;
/* Return data to the VBO */
TRACE("Locking directly into the buffer\n");
if((This->resource.usage & WINED3DUSAGE_WRITEONLY) || ( Flags & D3DLOCK_DISCARD) ) {
mode = GL_WRITE_ONLY;
mode = GL_WRITE_ONLY_ARB;
} else if( Flags & (D3DLOCK_READONLY | D3DLOCK_NO_DIRTY_UPDATE) ) {
mode = GL_READ_ONLY;
mode = GL_READ_ONLY_ARB;
}
ENTER_GL();
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER, This->vbo));
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
checkGLcall("glBindBufferARB");
data = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER, mode));
data = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, mode));
LEAVE_GL();
if(!data) {
ERR("glMapBuffer failed\n");
......@@ -378,9 +378,9 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_Unlock(IWineD3DVertexBuffer *iface) {
TRACE("(%p)\n", This);
if(!This->resource.allocatedMemory) {
ENTER_GL();
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER, This->vbo));
GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
checkGLcall("glBindBufferARB");
GL_EXTCALL(glUnmapBufferARB(GL_ARRAY_BUFFER));
GL_EXTCALL(glUnmapBufferARB(GL_ARRAY_BUFFER_ARB));
checkGLcall("glUnmapBufferARB");
LEAVE_GL();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment