Oups sorry, the bug came from me not updating the good variable for my index array. So "everything" works now.

It works on Mac OS X with python from macports, but not on Ubuntu (I get only a black screen). I'll have to find out why ...
I'ill open a new thread if I don't find it out.

Sorry for the disturbance

Michka

2011/4/24 Michka Popoff <michkapopoff@gmail.com>
Hello

I am trying to use VBO's to display a big colored meshgrid. I have a problem, as I think the buffer is not cleared correctly when I delete it.
What I am doing :

- Calculate the indexes, vertexes and colors of the meshgrid (on init)
- Buffer
- Display
- On user input (by keyboard), change a parameter (call it "z"), and recalculate a new meshgrid

But there seem to be some display bugs, some triangles are not on the right place, and as I go on with new calculations (new "z"), the grid is more and more messed up.
I tested with going directly to a new meshgrid (with a fixed parameter "z" on init) , and the meshgrid is displayed without graphical bug. So the bug is not coming from my vertexes array or index array.

So :
- If I init directly the meshgrid with a specific "z" parameter (for example z=6), no problem
- If I go from z=0 to z=6 (by steps of 1), the grid at z=6 is messed up

I use the VertexBuffer class from Nathan Ostgard (http://www.siafoo.net/snippet/185), but a little bit modified :

For the creation of the buffer :
self.buffer = glGenBuffers(1)

To delete the buffer : (needed to add int() here, without it there is a TypeError ...)
glDeleteBuffers(1, int(self.buffer))
self.buffer = None

I checked the deletion of the buffer with glIsBuffer, it says that it is well deleted (Vertexes, color and indexes buffer).

So what could be the problem ? Should I post some code to show what I am doing in detail ?


Using python 2.7 and opengl 3.0.1 through macports.

Thank you in advance !

Michka Popoff


------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been
demonstrated beyond question. Learn why your peers are replacing JEE
containers with lightweight application servers - and what you can gain
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
PyOpenGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyopengl-users