if( input == NULL )
return( false );
+#ifdef _WIN32
+ // get pointers to GL functions
+ glGenBuffers =
+ ( PFNGLGENBUFFERSARBPROC )wglGetProcAddress( "glGenBuffers" );
+ glBindBuffer =
+ ( PFNGLBINDBUFFERARBPROC )wglGetProcAddress( "glBindBuffer" );
+ glBufferData =
+ ( PFNGLBUFFERDATAARBPROC )wglGetProcAddress( "glBufferData" );
+ glBufferSubData =
+ ( PFNGLBUFFERSUBDATAARBPROC )wglGetProcAddress( "glBufferSubData" );
+ glDeleteBuffers =
+ ( PFNGLDELETEBUFFERSARBPROC )wglGetProcAddress( "glDeleteBuffers" );
+ glGetBufferParameteriv =
+ ( PFNGLGETBUFFERPARAMETERIVARBPROC )wglGetProcAddress(
+ "glGetBufferParameteriv"
+ );
+ glMapBuffer =
+ ( PFNGLMAPBUFFERARBPROC )wglGetProcAddress( "glMapBuffer" );
+ glUnmapBuffer =
+ ( PFNGLUNMAPBUFFERARBPROC )wglGetProcAddress( "glUnmapBuffer" );
+
+ // check once again VBO extension
+ if(
+ glGenBuffers != NULL &&
+ glBindBuffer != NULL &&
+ glBufferData != NULL &&
+ glBufferSubData != NULL &&
+ glMapBuffer != NULL &&
+ glUnmapBuffer != NULL &&
+ glDeleteBuffers != NULL &&
+ glGetBufferParameteriv != NULL
+ )
+ this->VBOSupported = true;
+ else
+ this->VBOSupported = false;
+
+ // check EXT_swap_control is supported
+ /* TODO: really needed?
+ wglSwapIntervalEXT =
+ ( PFNWGLSWAPINTERVALEXTPROC )wglGetProcAddress( "wglSwapIntervalEXT" );
+ wglGetSwapIntervalEXT =
+ ( PFNWGLGETSWAPINTERVALEXTPROC )wglGetProcAddress(
+ "wglGetSwapIntervalEXT"
+ );
+ if( wglSwapIntervalEXT != NULL && wglGetSwapIntervalEXT != NULL )
+ wglSwapIntervalEXT( 0 );
+ */
+#else // _WIN32
// Check if VBO ( Vertex Buffer Object ) is supported
std::string str = ( const char* )( glGetString( GL_EXTENSIONS ) );
this->VBOSupported =
( str.find( "GL_ARB_vertex_buffer_object" ) != std::string::npos );
+#endif // _WIN32
if( this->VBOSupported )
{