[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21815] branches/soc-2009-imbusy/source/ blender/gpu/intern/gpu_buffers.c: fixed glDrawElements when using VBOs, need to check if this is a proper fix or an undocumented feature

Lukas Steiblys imbusy at imbusy.org
Thu Jul 23 15:25:40 CEST 2009


Revision: 21815
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21815
Author:   imbusy
Date:     2009-07-23 15:25:39 +0200 (Thu, 23 Jul 2009)

Log Message:
-----------
fixed glDrawElements when using VBOs, need to check if this is a proper fix or an undocumented feature

Modified Paths:
--------------
    branches/soc-2009-imbusy/source/blender/gpu/intern/gpu_buffers.c

Modified: branches/soc-2009-imbusy/source/blender/gpu/intern/gpu_buffers.c
===================================================================
--- branches/soc-2009-imbusy/source/blender/gpu/intern/gpu_buffers.c	2009-07-23 13:21:27 UTC (rev 21814)
+++ branches/soc-2009-imbusy/source/blender/gpu/intern/gpu_buffers.c	2009-07-23 13:25:39 UTC (rev 21815)
@@ -924,7 +924,7 @@
 void GPU_buffer_draw_elements( GPUBuffer *elements, unsigned int mode, int start, int count )
 {
 	if( useVBOs ) {
-		glDrawElements( mode, count, GL_UNSIGNED_INT, start );
+		glDrawElements( mode, count, GL_UNSIGNED_INT, start*sizeof(unsigned int) );
 	}
 	else {
 		glDrawElements( mode, count, GL_UNSIGNED_INT, ((int *)elements->pointer)+start );





More information about the Bf-blender-cvs mailing list