PDA

View Full Version : Dynamically allocated vertex arrays



GarlicGL
02-19-2002, 06:54 AM
Hi all,
I've got a problem with my GL code that uses vertex arrays. I need to read data from files and allocate memory accodringly to my vertex, color, and index arrays. I'm testing my code on a simple cube. When I read the cube information from a file and then try to render it I get a blank screen. However, when I manually create arrays and fill them with the same data I can see the cube. I've verified that the dynamically allocated arrays contain the correct index, vertex, and color data. I'm at a loss here; any help is greatly appreciated.

Regards,
GarlicGL

Zak McKrakem
02-19-2002, 07:09 AM
This is OpenGL coding: advanced forum. Please, don't fill it with questions that can be easyly answered on beginners forum.
Thanks.

rIO
02-19-2002, 07:15 AM
Why spending time writing a so useless answer ?
You are right, this is a programmign related question and not a specific OGL question, but that's not the way IMHO.

GarlicGL
02-19-2002, 07:18 AM
Sorry folks. Maybe it is a programming questions and maybe it is a silly question. But if it is so easy, PLEASE tell me if the problem is what I suspect ...

Thanks,
GGL

Gorg
02-19-2002, 08:50 AM
What do you suspect it is?

I suspect it is because you did not pass enough time debugging http://www.opengl.org/discussion_boards/ubb/smile.gif

Are you sure the parameters you pass to gl*Pointer are the same for dynamically loaded cube and the one manually buily?

GarlicGL
02-19-2002, 09:08 AM
Originally posted by Gorg:
What do you suspect it is?

I suspect it is because you did not pass enough time debugging http://www.opengl.org/discussion_boards/ubb/smile.gif

Are you sure the parameters you pass to gl*Pointer are the same for dynamically loaded cube and the one manually buily?



There's never enough time for debugging. http://www.opengl.org/discussion_boards/ubb/smile.gif

Yes I'm passing the same parameters in both cases.

GGL

Nutty
02-19-2002, 09:11 AM
I think the best way to deal with completely Off-Topic posts, is to just ignore them, and do _not_ reply saying this is off-topic, that way it doesn't get bumped back to the top of the forum.

Concentrate of GL posts, and just ignore the rest, that way they fall off the bottom much faster.

P.S. Yes I know I just replied to this one too.. damnit..

Nutty