PDA

View Full Version : zoom type help



azncrip4lif
08-01-2004, 03:45 AM
okay i want to write a little magnifying glass program. i can get the zoom but it zooms the whole screen. i was wondering how i could shrink this down into a little circle type thing.



void APIENTRY pglFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
{
int zoom=1;
if(zoom && GetAsyncKeyState(VK_RBUTTON))
{
int zoom_lvl = 30;
top = zNear * tan(zoom_lvl * 3.1428571428571428571428571428571 / 360.0);
bottom = -top;
left = bottom * 1.3333333333333333333333333333333;
right = top * 1.3333333333333333333333333333333;
}
glFrustum( left, right, bottom, top, zNear, zFar );
}