diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 989026f65ca..2fba83bffa3 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -105,8 +105,8 @@ static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_g { if(!This->buffer_object) return; - GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object)); - checkGLcall("glDeleteBuffersARB"); + GL_EXTCALL(glDeleteBuffers(1, &This->buffer_object)); + checkGLcall("glDeleteBuffers"); This->buffer_object = 0; if(This->query) @@ -140,7 +140,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, struct wine * to be verified to check if the rhw and color values are in the correct * format. */ - GL_EXTCALL(glGenBuffersARB(1, &This->buffer_object)); + GL_EXTCALL(glGenBuffers(1, &This->buffer_object)); error = gl_info->gl_ops.gl.p_glGetError(); if (!This->buffer_object || error != GL_NO_ERROR) { @@ -150,7 +150,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, struct wine if (This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) context_invalidate_state(context, STATE_INDEXBUFFER); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + GL_EXTCALL(glBindBuffer(This->buffer_type_hint, This->buffer_object)); error = gl_info->gl_ops.gl.p_glGetError(); if (error != GL_NO_ERROR) { @@ -181,11 +181,11 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, struct wine * calling glBufferSubData on updates. Upload the actual data in case * we're not double buffering, so we can release the heap mem afterwards */ - GL_EXTCALL(glBufferDataARB(This->buffer_type_hint, This->resource.size, This->resource.heap_memory, gl_usage)); + GL_EXTCALL(glBufferData(This->buffer_type_hint, This->resource.size, This->resource.heap_memory, gl_usage)); error = gl_info->gl_ops.gl.p_glGetError(); if (error != GL_NO_ERROR) { - ERR("glBufferDataARB failed with error %s (%#x)\n", debug_glerror(error), error); + ERR("glBufferData failed with error %s (%#x)\n", debug_glerror(error), error); goto fail; } @@ -500,8 +500,8 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *con if (This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) context_invalidate_state(context, STATE_INDEXBUFFER); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); - GL_EXTCALL(glGetBufferSubDataARB(This->buffer_type_hint, 0, This->resource.size, This->resource.heap_memory)); + GL_EXTCALL(glBindBuffer(This->buffer_type_hint, This->buffer_object)); + GL_EXTCALL(glGetBufferSubData(This->buffer_type_hint, 0, This->resource.size, This->resource.heap_memory)); This->flags |= WINED3D_BUFFER_DOUBLEBUFFER; return This->resource.heap_memory; @@ -589,8 +589,8 @@ static void buffer_sync_apple(struct wined3d_buffer *This, DWORD flags, const st if (flags & WINED3D_MAP_DISCARD) { - GL_EXTCALL(glBufferDataARB(This->buffer_type_hint, This->resource.size, NULL, This->buffer_object_usage)); - checkGLcall("glBufferDataARB\n"); + GL_EXTCALL(glBufferData(This->buffer_type_hint, This->resource.size, NULL, This->buffer_object_usage)); + checkGLcall("glBufferData"); return; } @@ -654,8 +654,8 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined /* This potentially invalidates the element array buffer binding, but the * caller always takes care of this. */ - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(This->buffer_type_hint, This->buffer_object)); + checkGLcall("glBindBuffer"); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { GLbitfield mapflags; @@ -679,8 +679,8 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined syncflags |= WINED3D_MAP_NOOVERWRITE; buffer_sync_apple(This, syncflags, gl_info); } - map = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_WRITE_ONLY_ARB)); - checkGLcall("glMapBufferARB"); + map = GL_EXTCALL(glMapBuffer(This->buffer_type_hint, GL_WRITE_ONLY)); + checkGLcall("glMapBuffer"); } if (!map) { @@ -707,8 +707,8 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined checkGLcall("glFlushMappedBufferRangeAPPLE"); } } - GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); - checkGLcall("glUnmapBufferARB"); + GL_EXTCALL(glUnmapBuffer(This->buffer_type_hint)); + checkGLcall("glUnmapBuffer"); } void buffer_mark_used(struct wined3d_buffer *buffer) @@ -913,10 +913,10 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte } } - GL_EXTCALL(glBindBufferARB(buffer->buffer_type_hint, buffer->buffer_object)); - checkGLcall("glBindBufferARB"); - GL_EXTCALL(glBufferSubDataARB(buffer->buffer_type_hint, start, len, data + start)); - checkGLcall("glBufferSubDataARB"); + GL_EXTCALL(glBindBuffer(buffer->buffer_type_hint, buffer->buffer_object)); + checkGLcall("glBindBuffer"); + GL_EXTCALL(glBufferSubData(buffer->buffer_type_hint, start, len, data + start)); + checkGLcall("glBufferSubData"); } HeapFree(GetProcessHeap(), 0, data); @@ -979,7 +979,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) context_invalidate_state(context, STATE_INDEXBUFFER); - GL_EXTCALL(glBindBufferARB(buffer->buffer_type_hint, buffer->buffer_object)); + GL_EXTCALL(glBindBuffer(buffer->buffer_type_hint, buffer->buffer_object)); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { @@ -992,17 +992,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN { if (buffer->flags & WINED3D_BUFFER_APPLESYNC) buffer_sync_apple(buffer, flags, gl_info); - buffer->map_ptr = GL_EXTCALL(glMapBufferARB(buffer->buffer_type_hint, - GL_READ_WRITE_ARB)); - checkGLcall("glMapBufferARB"); + buffer->map_ptr = GL_EXTCALL(glMapBuffer(buffer->buffer_type_hint, + GL_READ_WRITE)); + checkGLcall("glMapBuffer"); } if (((DWORD_PTR)buffer->map_ptr) & (RESOURCE_ALIGNMENT - 1)) { WARN("Pointer %p is not %u byte aligned.\n", buffer->map_ptr, RESOURCE_ALIGNMENT); - GL_EXTCALL(glUnmapBufferARB(buffer->buffer_type_hint)); - checkGLcall("glUnmapBufferARB"); + GL_EXTCALL(glUnmapBuffer(buffer->buffer_type_hint)); + checkGLcall("glUnmapBuffer"); buffer->map_ptr = NULL; if (buffer->resource.usage & WINED3DUSAGE_DYNAMIC) @@ -1078,7 +1078,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer) if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) context_invalidate_state(context, STATE_INDEXBUFFER); - GL_EXTCALL(glBindBufferARB(buffer->buffer_type_hint, buffer->buffer_object)); + GL_EXTCALL(glBindBuffer(buffer->buffer_type_hint, buffer->buffer_object)); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { @@ -1099,7 +1099,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer) } } - GL_EXTCALL(glUnmapBufferARB(buffer->buffer_type_hint)); + GL_EXTCALL(glUnmapBuffer(buffer->buffer_type_hint)); if (wined3d_settings.strict_draw_ordering) gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1d293bfa53e..271a2166a63 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3019,7 +3019,7 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, e->data.addr += (ULONG_PTR)buffer_get_sysmem(buffer, context); if (buffer->buffer_object) { - GL_EXTCALL(glDeleteBuffersARB(1, &buffer->buffer_object)); + GL_EXTCALL(glDeleteBuffers(1, &buffer->buffer_object)); buffer->buffer_object = 0; } if (e->data.addr) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index f42769b6adc..00d2ac6ccac 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -570,15 +570,15 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info) gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 0); checkGLcall("Specifying the PBO test texture"); - GL_EXTCALL(glGenBuffersARB(1, &pbo)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pbo)); - GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, sizeof(pattern), pattern, GL_STREAM_DRAW_ARB)); + GL_EXTCALL(glGenBuffers(1, &pbo)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo)); + GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, sizeof(pattern), pattern, GL_STREAM_DRAW)); checkGLcall("Specifying the PBO test pbo"); gl_info->gl_ops.gl.p_glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); checkGLcall("Loading the PBO test texture"); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); gl_info->gl_ops.gl.p_glFinish(); /* just to be sure */ @@ -587,7 +587,7 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info) checkGLcall("Reading back the PBO test texture"); gl_info->gl_ops.gl.p_glDeleteTextures(1, &texture); - GL_EXTCALL(glDeleteBuffersARB(1, &pbo)); + GL_EXTCALL(glDeleteBuffers(1, &pbo)); checkGLcall("PBO test cleanup"); if (memcmp(check, pattern, sizeof(check))) @@ -2876,10 +2876,18 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) /* Newer core functions */ USE_GL_FUNC(glActiveTexture) /* OpenGL 1.3 */ + USE_GL_FUNC(glBindBuffer) /* OpenGL 1.5 */ USE_GL_FUNC(glBlendColor) /* OpenGL 1.4 */ USE_GL_FUNC(glBlendEquation) /* OpenGL 1.4 */ USE_GL_FUNC(glBlendEquationSeparate) /* OpenGL 2.0 */ USE_GL_FUNC(glBlendFuncSeparate) /* OpenGL 1.4 */ + USE_GL_FUNC(glBufferData) /* OpenGL 1.5 */ + USE_GL_FUNC(glBufferSubData) /* OpenGL 1.5 */ + USE_GL_FUNC(glDeleteBuffers) /* OpenGL 1.5 */ + USE_GL_FUNC(glGenBuffers) /* OpenGL 1.5 */ + USE_GL_FUNC(glGetBufferSubData) /* OpenGL 1.5 */ + USE_GL_FUNC(glMapBuffer) /* OpenGL 1.5 */ + USE_GL_FUNC(glUnmapBuffer) /* OpenGL 1.5 */ #undef USE_GL_FUNC #ifndef USE_WIN32_OPENGL @@ -2896,10 +2904,18 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) } while (0) MAP_GL_FUNCTION(glActiveTexture, glActiveTextureARB); + MAP_GL_FUNCTION(glBindBuffer, glBindBufferARB); MAP_GL_FUNCTION(glBlendColor, glBlendColorEXT); MAP_GL_FUNCTION(glBlendEquation, glBlendEquationEXT); MAP_GL_FUNCTION(glBlendEquationSeparate, glBlendEquationSeparateEXT); MAP_GL_FUNCTION(glBlendFuncSeparate, glBlendFuncSeparateEXT); + MAP_GL_FUNCTION(glBufferData, glBufferDataARB); + MAP_GL_FUNCTION(glBufferSubData, glBufferSubDataARB); + MAP_GL_FUNCTION(glDeleteBuffers, glDeleteBuffersARB); + MAP_GL_FUNCTION(glGenBuffers, glGenBuffersARB); + MAP_GL_FUNCTION(glGetBufferSubData, glGetBufferSubDataARB); + MAP_GL_FUNCTION(glMapBuffer, glMapBufferARB); + MAP_GL_FUNCTION(glUnmapBuffer, glUnmapBufferARB); #undef MAP_GL_FUNCTION } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 048ec133971..725ed63b0ba 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3366,8 +3366,8 @@ static void load_tex_coords(const struct wined3d_context *context, const struct if (*curVBO != e->data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, e->data.buffer_object)); + checkGLcall("glBindBuffer"); *curVBO = e->data.buffer_object; } @@ -4100,8 +4100,8 @@ static void load_numbered_arrays(struct wined3d_context *context, { if (curVBO != stream_info->elements[i].data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, stream_info->elements[i].data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, stream_info->elements[i].data.buffer_object)); + checkGLcall("glBindBuffer"); curVBO = stream_info->elements[i].data.buffer_object; } /* Use the VBO to find out if a vertex buffer exists, not the vb @@ -4271,8 +4271,8 @@ static void load_vertex_data(struct wined3d_context *context, if (curVBO != e->data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, e->data.buffer_object)); + checkGLcall("glBindBuffer"); curVBO = e->data.buffer_object; } @@ -4327,8 +4327,8 @@ static void load_vertex_data(struct wined3d_context *context, if (curVBO != e->data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, e->data.buffer_object)); + checkGLcall("glBindBuffer"); curVBO = e->data.buffer_object; } @@ -4349,8 +4349,8 @@ static void load_vertex_data(struct wined3d_context *context, if (curVBO != e->data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, e->data.buffer_object)); + checkGLcall("glBindBuffer"); curVBO = e->data.buffer_object; } @@ -4376,8 +4376,8 @@ static void load_vertex_data(struct wined3d_context *context, if (curVBO != e->data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, e->data.buffer_object)); + checkGLcall("glBindBuffer"); curVBO = e->data.buffer_object; } @@ -4411,8 +4411,8 @@ static void load_vertex_data(struct wined3d_context *context, if (curVBO != e->data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, e->data.buffer_object)); + checkGLcall("glBindBuffer"); curVBO = e->data.buffer_object; } @@ -4850,12 +4850,12 @@ static void indexbuffer(struct wined3d_context *context, const struct wined3d_st if (!state->index_buffer || !stream_info->all_vbo) { - GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)); } else { struct wined3d_buffer *ib = state->index_buffer; - GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, ib->buffer_object)); + GL_EXTCALL(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib->buffer_object)); } } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fb27c8a9e5d..e6d7427d698 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -59,7 +59,7 @@ static void surface_cleanup(struct wined3d_surface *surface) if (surface->pbo) { TRACE("Deleting PBO %u.\n", surface->pbo); - GL_EXTCALL(glDeleteBuffersARB(1, &surface->pbo)); + GL_EXTCALL(glDeleteBuffers(1, &surface->pbo)); } if (surface->rb_multisample) @@ -522,22 +522,22 @@ static void surface_prepare_buffer(struct wined3d_surface *surface) context = context_acquire(surface->resource.device, NULL); gl_info = context->gl_info; - GL_EXTCALL(glGenBuffersARB(1, &surface->pbo)); + GL_EXTCALL(glGenBuffers(1, &surface->pbo)); error = gl_info->gl_ops.gl.p_glGetError(); if (!surface->pbo || error != GL_NO_ERROR) ERR("Failed to create a PBO with error %s (%#x).\n", debug_glerror(error), error); TRACE("Binding PBO %u.\n", surface->pbo); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo)); + checkGLcall("glBindBuffer"); - GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.size + 4, - NULL, GL_STREAM_DRAW_ARB)); - checkGLcall("glBufferDataARB"); + GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, surface->resource.size + 4, + NULL, GL_STREAM_DRAW)); + checkGLcall("glBufferData"); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); context_release(context); } @@ -733,10 +733,10 @@ static void surface_unmap(struct wined3d_surface *surface) context = context_acquire(device, NULL); gl_info = context->gl_info; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); - GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glUnmapBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo)); + GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glUnmapBuffer"); context_release(context); break; @@ -1152,8 +1152,8 @@ HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *sur /* Context activation is done by the caller. */ static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) { - GL_EXTCALL(glDeleteBuffersARB(1, &surface->pbo)); - checkGLcall("glDeleteBuffersARB(1, &surface->pbo)"); + GL_EXTCALL(glDeleteBuffers(1, &surface->pbo)); + checkGLcall("glDeleteBuffers(1, &surface->pbo)"); surface->pbo = 0; surface_invalidate_location(surface, WINED3D_LOCATION_BUFFER); @@ -1340,12 +1340,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct if (data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, data.buffer_object)); + checkGLcall("glBindBuffer"); GL_EXTCALL(glGetCompressedTexImageARB(surface->texture_target, surface->texture_level, NULL)); checkGLcall("glGetCompressedTexImageARB"); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); } else { @@ -1380,15 +1380,15 @@ static void surface_download_data(struct wined3d_surface *surface, const struct if (data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, data.buffer_object)); + checkGLcall("glBindBuffer"); gl_info->gl_ops.gl.p_glGetTexImage(surface->texture_target, surface->texture_level, gl_format, gl_type, NULL); checkGLcall("glGetTexImage"); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); } else { @@ -1494,8 +1494,8 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w if (data->buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, data->buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, data->buffer_object)); + checkGLcall("glBindBuffer"); } if (format->flags & WINED3DFMT_FLAG_COMPRESSED) @@ -1561,8 +1561,8 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w if (data->buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); } if (wined3d_settings.strict_draw_ordering) @@ -2665,9 +2665,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, context = context_acquire(device, NULL); gl_info = context->gl_info; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); - base_memory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo)); + base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); checkGLcall("map PBO"); context_release(context); @@ -2839,8 +2839,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc if (data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data.buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, data.buffer_object)); + checkGLcall("glBindBuffer"); } /* Setup pixel store pack state -- to glReadPixels into the correct place */ @@ -2868,8 +2868,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc if (data.buffer_object) { - mem = GL_EXTCALL(glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_WRITE_ARB)); - checkGLcall("glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_WRITE_ARB)"); + mem = GL_EXTCALL(glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_WRITE)); + checkGLcall("glMapBuffer"); } else mem = data.addr; @@ -2887,14 +2887,14 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc HeapFree(GetProcessHeap(), 0, row); if (data.buffer_object) - GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB)); + GL_EXTCALL(glUnmapBuffer(GL_PIXEL_PACK_BUFFER)); } error: if (data.buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); } context_release(context); @@ -4004,9 +4004,9 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD { context = context_acquire(device, NULL); gl_info = context->gl_info; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, dst.buffer_object)); - GL_EXTCALL(glBufferSubDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0, size, src.addr)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, dst.buffer_object)); + GL_EXTCALL(glBufferSubData(GL_PIXEL_UNPACK_BUFFER, 0, size, src.addr)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); checkGLcall("Upload PBO"); context_release(context); return; @@ -4015,9 +4015,9 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD { context = context_acquire(device, NULL); gl_info = context->gl_info; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, src.buffer_object)); - GL_EXTCALL(glGetBufferSubDataARB(GL_PIXEL_PACK_BUFFER_ARB, 0, size, dst.addr)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, src.buffer_object)); + GL_EXTCALL(glGetBufferSubData(GL_PIXEL_PACK_BUFFER, 0, size, dst.addr)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); checkGLcall("Download PBO"); context_release(context); return; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index b5ab862c054..f2dd9e90df0 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -105,8 +105,8 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine if (data->buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, data->buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, data->buffer_object)); + checkGLcall("glBindBuffer"); } GL_EXTCALL(glTexSubImage3DEXT(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0, @@ -116,8 +116,8 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine if (data->buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); } HeapFree(GetProcessHeap(), 0, converted_mem); @@ -153,8 +153,8 @@ static void wined3d_volume_download_data(struct wined3d_volume *volume, if (data->buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data->buffer_object)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, data->buffer_object)); + checkGLcall("glBindBuffer"); } gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_3D, volume->texture_level, @@ -163,8 +163,8 @@ static void wined3d_volume_download_data(struct wined3d_volume *volume, if (data->buffer_object) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); } } @@ -383,10 +383,10 @@ static void wined3d_volume_prepare_pbo(struct wined3d_volume *volume, struct win if (volume->pbo) return; - GL_EXTCALL(glGenBuffersARB(1, &volume->pbo)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo)); - GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.size, NULL, GL_STREAM_DRAW_ARB)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + GL_EXTCALL(glGenBuffers(1, &volume->pbo)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo)); + GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, volume->resource.size, NULL, GL_STREAM_DRAW)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); checkGLcall("Create PBO"); TRACE("Created PBO %u for volume %p.\n", volume->pbo, volume); @@ -398,8 +398,8 @@ static void wined3d_volume_free_pbo(struct wined3d_volume *volume) const struct wined3d_gl_info *gl_info = context->gl_info; TRACE("Deleting PBO %u belonging to volume %p.\n", volume->pbo, volume); - GL_EXTCALL(glDeleteBuffersARB(1, &volume->pbo)); - checkGLcall("glDeleteBuffersARB"); + GL_EXTCALL(glDeleteBuffers(1, &volume->pbo)); + checkGLcall("glDeleteBuffers"); volume->pbo = 0; context_release(context); } @@ -587,22 +587,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, else wined3d_volume_load_location(volume, context, WINED3D_LOCATION_BUFFER); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo)); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { GLbitfield mapflags = wined3d_resource_gl_map_flags(flags); mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT; - base_memory = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER_ARB, + base_memory = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, volume->resource.size, mapflags)); } else { GLenum access = wined3d_resource_gl_legacy_map_flags(flags); - base_memory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, access)); + base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, access)); } - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); checkGLcall("Map PBO"); context_release(context); @@ -704,9 +704,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) struct wined3d_context *context = context_acquire(device, NULL); const struct wined3d_gl_info *gl_info = context->gl_info; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo)); - GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo)); + GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER)); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); checkGLcall("Unmap PBO"); context_release(context);