Sign in to follow this  
versus5

Clipped view of projection

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

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