Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Possible VBO Victory!

Possible VBO Victory!

ObsidianBlk
ObsidianBlk
#!/Bin/Bash-ObsidianBlk · · 2 min read
2,012 2
[BLURB:] I think I may have successfully discovered how to integrate VBOs into my library!

[DEVELOPMENT: Archetype Engine]


Having gone round and round and round the google merry-go-round in regards to VBOs with pyopengl, I FINALLY figured out how to get my hands on glGenBuffers and why my tests for always failed! Ok, it seems my drivers (both for my modern ATI and generations old NVidia) do not support glGenBuffers directly. Making the following call...
bool(glGenBuffers)
... would always return False for me. Ok, so, I must have to use the ARB version of the call. However, every test I made to find a valid implementation of glGenBuffersARB would, likewise, fail! I took this to mean I did not have access to the extension for vertex buffers.

Here's where my mistake was (or seems to be)...
My tests involved calling up the python console, importing the modules, and testing for the existence of the functions I wanted. What I didn't realize is, what I needed to find the extensions in the first place was a VALID CONTEXT!!! More or less, when I was running python in the console, I was never creating an OpenGL context, so all of my tests would fail because none of the extensions would load. Once I did my tests with a context created, I was able to find an implementation of the glGenBuffers function...
from OpenGL.GL.ARB import *

Unfortunately, I've been under the weather the last couple of days and haven't been able to concentrate real well on coding, so, all I've managed to do was start a shell of a VBO class. When done, my VBO class will match my VAO class, allowing me to use either interchangeably, allowing me to adapt the engine for systems that may not support VBOs at all.

May the force be with me! And also with you

Discussion

Loading comments...