Game Development Community

How to add VBO and glDrawRangeElements to TGE?

by Skanda · in Torque Game Engine · 01/22/2006 (6:34 pm) · 3 replies

For some rendering needs, I test to add VBO & glDrawRangeElements to TGE,but it seems that I do something wrong!
Who can help me?
Thanks very much!

and this is my steps:

// --- Adding glDrawRangeElements --- //

1 lib\opengl2d3d\opengl2d3d.h

line 15:
#include "stddef.h"

line 50:
//#ifndef GL_ARB_vertex_buffer_object
/* GL types for handling large vertex buffer objects */
typedef ptrdiff_t GLintptrARB;
typedef ptrdiff_t GLsizeiptrARB;
//#endif

line 1250:
GLAPI void GLAPIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei cound, GLenum type, const GLvoid *indices);


2 engine\platform\GLCoreFunc.h

Line 79:
GL_FUNCTION(void,       glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei cound, GLenum type, const GLvoid *indices), return; )

3 engine\platformWin32\winGLSpecial.cc[b]

Line 733:
static void APIENTRY logglDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei cound, GLenum type, const GLvoid *indices)
{
   SIG( "glDrawRangeElements" );
   dllglDrawRangeElements(mode, start, end, cound, type, indices);
}

[b]Is that OK?

#1
01/22/2006 (6:47 pm)
And the VBO, i follow this:
tdn.garagegames.com/wiki/AddingOpenGLExtensions

AddingOpenGLExtensions

but may i do wrong,in TGE,it can't use such VBO functions,too!
#2
01/22/2006 (6:56 pm)
If it works then you're doing it right. Does it work?
#3
01/22/2006 (6:59 pm)
It can't work! I don't know why?