vertex program & VBO problem - solved

currently trying to get matrix palette skinnin to work, and while it works fine with regular Vertex Arrays, the moment I use VBOs it doesnt work

I use vertex program & vbo combo for particles as well and there it works…

here is what I do for particle:

  • bind buffers
  • stream particle data using subBuffer
  • set up pointers (position, normal…)
  • bind program
  • submit 8 extras using glProgramLocalParameter4fARB
  • enable program
  • render

and this here for matrix palette skinning results into a crash when trying to draw (on ati it doesnt crash but nothing is visible)

  • bind buffers
  • stream data to buffer (the part using software skinning)
  • set up pointers (attrib6)
  • bind program
  • submit 80 vectors for the matrices using glProgramLocalParameter4fARB
  • enable program
  • set up pointers (pos,normal,color)
  • render

which results into a crash
funny thing is when I set vbo to STREAM it works like for 5 frames (I see nothing so) and then it crashes with “abnormal program termination”
when I use STATIC (and I dont submit the data of software skinner) it immediately crashes on the draw call givin a memory address error.

however the same setup works with vertex array

when I dont do the 80 glProgramLocal… calls the app wont crash, but well the matrices not updated so I see nothing hehe

I know it likely aint efficient handing over so many vectors and such, but well for the moment I want to learn to make it work =)

ha I made the order match now and it works… meanining in all the other cases I did right per luck hehe

  • bind buffer
  • pointers to all per vertex attribs
  • bind program
  • local params
  • enable
  • render

but why ?

I don’t see anything that’s obviously out of spec. in your code… But I have a couple possible “pointers” ( :stuck_out_tongue: ) to offer…

  • Is the attrib6 array a member of the VBO?

I know NVIDIA drivers sometimes make a call to abort (…) [which is where an “abnormal program termination…” message comes from] somewhere when they run into a memory error.

This was VERY annoying in their VAR extension and it seems to have been carried over to their VBO implementation.

  • Have you checked the error stack after every API call? If you do something out of order, the VBO/VP extensions are supposed to generate an INVALID_OPERATION/VALUE error.

all per vertex data was in the vbo and pointed to when the vbo was bound

and indeed it threw a opengl error like 5 frames then the app crashed

the error strangely came up a tad later, ie not right after the draw call or before it…