Jump to content
  • Advertisement
Sign in to follow this  

OpenGL normals/culling/drawing order problems with DAE import

This topic is 3620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm creating a small DAE loader that takes everything from the geometry element (positions, normals, mapchannel, tristrip p elems, textcoords) and draw them using triangle_strips in OpenGL ES. As the following screenshots clearly show, I can load and draw the geometry but there's something wrong. I get the same results with all my models. http://www.iphonevalley.com/images/daetest1.jpg http://www.iphonevalley.com/images/daetest2.jpg I tried the following to solve it: - flip normals in 3D Studio Max before exporting (seems to have no effect 'at all') - enable culling with backface or frontface - change the drawing order to CW and/or drawing the tristrips in reverse order - condition the DAE with the Axis converter (Y_UP) in the Collada Refinery. - various combinations of the above I'm kinda lost as for what to try next. Can anyone here suggest other magic buttons I can push? :D I'm kinda hoping it's something simple, not collada-related because I know I'm loading the mesh info correctly, I seem to be messing up in the opengl drawing. To include some code for the sake of including some code:
		glVertexPointer(3, GL_FLOAT, 0, newvertices);
		glTexCoordPointer(2, GL_FLOAT, 0, newtexcoords);
		glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors);		

		glNormalPointer(GL_FLOAT, 0, newnormals);
		glDrawArrays(GL_TRIANGLE_STRIP, 0, [thisStripsVertCoords count]);

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!