Vertex Arrays - Arrrrghh!

Started by cfmdobbie, February 20, 2004, 13:56:23

Previous topic - Next topic

cfmdobbie

There was a long post here asking questions about vertex arrays and what the hell I'm doing wrong.  I'm porting a huge piece of technology built on JoGL and a straight port was failing to display anything on the screen, I'd even chucked the whole lot out and started again, just to be sure I'd converted the few calls that have different syntax correctly.

Well, it now works to some extent, and the lesson I've learned today is:

If you're being given a ByteBuffer by someone else's technology, rewind the damn thing before you start as you're almost guaranteed its position will be equal to its limit.

Arrrgh!  You have no idea how long this problem has blocked me...
ellomynameis Charlie Dobbie.

Matzon

hehe, this is kinda an universal bug :) - I have seen it countless times, and not just with byte buffers!

princec

Just be thankful you ain't been handed a pointer that someone's forgotten to rewind...

Cas ;)