[PyOpenGL-Users] Help with VAOs
Brought to you by:
mcfletch
From: Johannes B. <dfn...@gm...> - 2015-01-27 20:36:54
|
Hello list, I'm trying to store objects (currently only vertices) on the graphics card so that I can avoid lots of: glBegin() glVertex(...) [...] glEnd() I've tried lots and lots of code now (none of which fully did what I wanted) and really am losing my mind soon :-( I could adapt this to work with my code: https://gist.github.com/MorganBorman/4243336 And it does work, but when integrated in my 3D environment I noticed that the drawn objects are not rendered perspectively, but just a flat object. I'm looking for the easiest way to dump a bunch of vertices onto the graphics card and later reference those vertices to draw some object and have it render as if I had used glBegin(), glVertex(), glEnd(). Is this possible at all? Which approach should I look into? In general I've seen two different approaches, one that involes (usually super-primitive) shaders, others do not. I do not see why I would need a custom-shader for this task, is this really necessary? My goal ultimately is to store surfaces (i.e. vertices, their normals, their texture UV coordinates) on the graphics card. Any help is greatly appreciated, Johannes |