Sign in to follow this  
General_Lee

strange rendered model

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this