PDA

View Full Version : zoomin/zoomout



bhogasena
23rd January 2009, 16:08
hi,
i have used opengl to draw a complex shape(many polygons only combined)
can any one help me how can i write code for zoom in particular polygon?
or how to zoom whole shape?
pease send me a sample code for this one so that i'll be thankful to you.
thanks and regards
k. bhogasena reddy

Grimlock
23rd January 2009, 16:18
float zoom;//incremetn or decrement in a function and call PaintGl
//in your PaintGl function
glLoadIdentity();
glScalef(zoom,zoome,zoom);

You can also use translation for this.
I hope this helps.