• Advertisement
Sign in to follow this  

strange rendered model

This topic is 2632 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
maybe try some other models ? free ones from internet or exported with another programm ?

Share this post


Link to post
Share on other sites
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