I'm trying to use VBO to create a terrain from a heightmap, but i don't know what should I include to my project or what headers to use. I'm using Qt and my OS is Windows 7. When i want to use glGenBuffers(1, &VboId); it throws an error: "glGenBuffers was not declared in this scope"
VBO is not part of OpenGL core until a specific version and so on. That can make it cumbersome to access it. Most developers use a library like GLEW to resolve the lookup of extensions like VBO.
Another possibility is to use Qt functionality, as described here: http://entropologygames.wordpress.com/2009/10/31/howto-use-vertex-buffer-objectsvbo-with-opengl-qt/
In your case however I would suggest you use QGLBuffer (Qt 4.7 and up), which nicely encapsulates VBO functionality. http://qt-project.org/doc/qt-4.8/qglbuffer.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.