Jump to content
  • Advertisement
Sign in to follow this  
General_Lee

strange rendered model

This topic is 2844 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've created an application that uses lib3ds to load 3ds model,but my model is rendered "wrong".
I'm wondering if somebody has the same issue too

here is my app(source included)
http://www.mediafire.com/?pumkph5d78ve1lj

Share this post


Link to post
Share on other sites
Advertisement
I've got it rendered correctly, but the model is too near to clipping plane and when it is rotating, it clips the model ... if it is same bug, then this might fix it:


void ReshapeFunc(int width, int height)
{
glMatrixMode(GL_PROJECTION);

glLoadIdentity();
// Near clipping plane needs to be closer and far further like this
gluPerspective(20, width / (float) height, 0.1f, 1000.0f);
glViewport(0, 0, width, height);

glMatrixMode(GL_MODELVIEW);
glutPostRedisplay();
}


Also try translating your object a bit further from camera (place glTranslatef before your glRotatef and translate object on Z axis away from camera)

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!