Matteo Bruni : wined3d: Use the core version of glDrawElementsInstanced.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 20 15:20:10 CST 2015


Module: wine
Branch: master
Commit: aff0c389ccc9df72624f5f42b7d09319c3011d2d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aff0c389ccc9df72624f5f42b7d09319c3011d2d

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Jan 20 15:47:07 2015 +0100

wined3d: Use the core version of glDrawElementsInstanced.

---

 dlls/wined3d/directx.c  | 2 ++
 dlls/wined3d/drawprim.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index b596eac..60269f1 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2884,6 +2884,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
     USE_GL_FUNC(glCompressedTexSubImage3D)  /* OpenGL 1.3 */
     USE_GL_FUNC(glDeleteBuffers)            /* OpenGL 1.5 */
     USE_GL_FUNC(glDrawBuffers)              /* OpenGL 2.0 */
+    USE_GL_FUNC(glDrawElementsInstanced)    /* OpenGL 3.1 */
     USE_GL_FUNC(glGenBuffers)               /* OpenGL 1.5 */
     USE_GL_FUNC(glGetBufferSubData)         /* OpenGL 1.5 */
     USE_GL_FUNC(glGetCompressedTexImage)    /* OpenGL 1.3 */
@@ -2919,6 +2920,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
     MAP_GL_FUNCTION(glCompressedTexSubImage3D, glCompressedTexSubImage3DARB);
     MAP_GL_FUNCTION(glDeleteBuffers, glDeleteBuffersARB);
     MAP_GL_FUNCTION(glDrawBuffers, glDrawBuffersARB);
+    MAP_GL_FUNCTION(glDrawElementsInstanced, glDrawElementsInstancedARB);
     MAP_GL_FUNCTION(glGenBuffers, glGenBuffersARB);
     MAP_GL_FUNCTION(glGetBufferSubData, glGetBufferSubDataARB);
     MAP_GL_FUNCTION(glGetCompressedTexImage, glGetCompressedTexImageARB);
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 265942c..12b03f6 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -60,9 +60,9 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
                 }
                 else
                 {
-                    GL_EXTCALL(glDrawElementsInstancedARB(primitive_type, count, idxtype,
+                    GL_EXTCALL(glDrawElementsInstanced(primitive_type, count, idxtype,
                             (const char *)idx_data + (idx_size * start_idx), instance_count));
-                    checkGLcall("glDrawElementsInstancedARB");
+                    checkGLcall("glDrawElementsInstanced");
                 }
             }
         }




More information about the wine-cvs mailing list