Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So the thing is, I get dispersed triangles instead of model that I'm loading, in this case it's just a cube. It seems as those triangles have no points that connect them. Is there anyone who had this problem before and knows where should I look for the problem in my code?

Here is an image I get:

enter image description here

GitHub link

Load3ds.java - loads the3dsmax object

Scene3D.java - stores all the objects (vertices, indices, materials etc)

Model3d - based on the Scene3D information creates buffers and passes them to OpenGL, I think the problem is here, though I have no luck finiding it

Any help, thoughts on this matter are greatly appreciated.

share|improve this question
Print out the object vertices or use your debugger to make sure you're reading the file in properly. Double check your projection matrices. Make sure you're filling your VBOs with good data (gDEBugger - the newer AMD version, not the ancient Gremedy version - helps there). – Sean Middleditch Dec 24 '12 at 1:37
Thank, gonna check it now – Oleg Bondarenko Dec 24 '12 at 8:58
Typically, if you feel it's necessary to link all your source code, the question is too localized. Voting to close. – Byte56 Jan 14 at 19:56
This usually happens when your index data is incorrectly interpreted ( or sent to the GPU ). Something like: your model contains quads, but you render it using triangles, so the indices no longer correspond to valid polygons. – rootlocus Jan 14 at 20:13

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.