Jump to content
  • Advertisement
Sign in to follow this  
fguihen

mesh.drawSubset() causing an application error

This topic is 5049 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

i have a person class, this calls my MeshLoader class. the meshLoader class contains a drawMesh method. i keep getting application errors on the mesh.drawSubset(int i) method. it loops around it a few times, but on the last loop it just hangs and gives an error. the MeshLoader class takes a device as one of its constructor parameters. should this not associate the mesh with the form that that everything is drawn on, or how do i fix this? any example i find have the drawMesh method in the form that the mesh is displayed on, but im trying to create a class that i can use to load and draw any of my meshes. hope the explination of what im doing is ok, if not please ask for a better explination. thanks all

Share this post


Link to post
Share on other sites
Advertisement
If it crashes at last loop maybe you are trying to draw more subsets then mesh has. When you load mesh you get number of materials and you should loop from 0 to matnum-1.

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!