Jump to content

  • Log In with Google      Sign In   
  • Create Account





Possible VBO Victory!

Posted by ObsidianBlk, in Archetype Engine, Python 30 January 2011 · 375 views

Python pyopengl OpenGL vertex buffer VBO Vertex Arrays
[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 :D




Oooohh man you save my day!

I'm learning right now OpenGL with PyOpenGL following a tutorial for C (my main language, so I have no problem translating the code to Python) and I was having the same f***ing problem and you save me with the knowledge that I need a valid OpenGL context created to be able to use glGenBuffers at all.

A thousand thanks man, really.
May the force be with you ^_^


PD.: Sorry for my poor english.

Oooohh man you save my day!

I'm learning right now OpenGL with PyOpenGL following a tutorial for C (my main language, so I have no problem translating the code to Python) and I was having the same f***ing problem and you save me with the knowledge that I need a valid OpenGL context created to be able to use glGenBuffers at all.

A thousand thanks man, really.
May the force be with you ^_^


PD.: Sorry for my poor english.


Hey man!

Sorry for the late reply, but I'm glad my insight was able to help you out! Truth be told, I'm still having a hell of a time with VBOs in general.
Good luck in your project!!

October 2014 »

S M T W T F S
   1234
567891011
12131415161718
192021 22 232425
262728293031 

Recent Comments

PARTNERS