具有SDL的顶点缓冲区对象

Ben*_*Ben 1 opengl sdl vertex-buffer

使用SDL 1.2时,我需要包含什么才能使用OpenGL 顶点缓冲对象(VBO)?

目前,我只包括 SDL.h, SDL_opengl.h, SDL_image.h

并得到错误:

glGenBuffersARB, glBindBufferARB, glBufferDataARB not declared in this scope

Pio*_*zmo 6

如果要在包含之前使用SDL_opengl.hdefine GL_GLEXT_PROTOTYPES.

#define GL_GLEXT_PROTOTYPES

#include "SDL.h"
#include "SDL_opengl.h"
Run Code Online (Sandbox Code Playgroud)

我可能会也可能不会工作.如果你想以"正确"的方式做到这一点,请使用像glew这样的东西.