PDA

View Full Version : Draw image out of viewport



alexei_shk
11-08-2005, 12:20 AM
Hi,

Can I set the viewport to one size and draw image with larger size than viewport tha I see only th part of image?

Thank's
Alexei

hazelwood
11-08-2005, 01:34 AM
OpenGL will clip to the viewport whatever you throw at it.

So for example if you're in a 640x480 window in ortho mode and you draw a 800x600 quad using glVertex2i then that quad will be clipped to the screen just fine.

alexei_shk
11-08-2005, 01:43 AM
Hi,

I want to show only part of image ( of my drawing). I need it for zoom in.

Cheps
11-08-2005, 03:05 AM
If you need to zoom in, you should change camera settings, not the viewport. You can do it with gluLookAt, or whatever modelView transformation you are using.

alexei_shk
11-08-2005, 04:47 AM
Hi,

I have tryed this but it doesn't help me...

Thank's
Alexei

jide
11-08-2005, 05:31 AM
Can you precise as much as you can what you want ? I read your post several times but I still don't understand what your problem really is.

alexei_shk
11-08-2005, 05:46 AM
Hi,

I have solved my problem.

Thank's
Alexei