Sign in to follow this  

Clipped view of projection

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

My ReshapeFunc function looks like this - but it isn't working well

void reshape(int w,int h)
{
GLfloat aspectRatio;
if(h==0) h=1;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport (0, 100, (GLsizei) w, (GLsizei) h);
gluOrtho2D(0, 800, 0, 500 );

//small clipped view
//--this part is not working>
glLoadIdentity();
glViewport (0, 0, 100, 100);
gluOrtho2D(0, 800, 0, 500 );
//--this part is not working <

glFlush();
}






[Edited by - versus5 on November 11, 2009 7:52:47 PM]

Share this post


Link to post
Share on other sites
The whole code

Sure, my mistake, but after changing width into e.g. 100 the big image doesn't apearing in previous viewport. It shows only the small view.

[Edited by - versus5 on November 12, 2009 7:59:52 AM]

Share this post


Link to post
Share on other sites

This topic is 2955 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.

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