projection problem

i want to know how can i adjust my clipping box dynamically when an event is triggered.

any help is much be appreciated.

Pretty much exactly how you would when calling a resize window function:

// since you want it to be interactive I'd suggest having some variables to hold the clipping coordinates
glFrustum(left, right, bottom, top, znear, zfar);

Again since it has to be interactive the calls in the resize function and the event processing function have to be the same so you won’t have any “reset” effects. Take a look at Nate Robbins’ demos. There is one on which you can change the view volume dynamically. Nate’s page

it’s not working!

Post your code so that we can see what you’re trying to do.

Is it resizing?

Then look at a standard window opening example for your operating system. Nehe’s lesson 1 and 2 open a window for Window’s Operating system in fullscreen as well as windowed(resizable) mode.

hope that helps.

What API are you using to create the window? Win32, glut, or something else? Again I will point you to Nate Robins’ tutorials, (with a more specific link this time :slight_smile: ). Here
The “projection” project has exactly what you want, as I’ve understood.

thanks a lot, guys!

from the site as suggested, i have got what i want!