sorry for posting again.actually i have posted the question in opengl for advanc forum.

i have loaded a .tiff image(map) using opengl.

i want to zoom the selected part of this image and display the zoom image.

the selection should be done through mouse .

i m collecting the coordinates of a rectangle(selected area thru mouse) and trying to zoom the pixels.but i m not getting the zoom image displayed.i m able to collect the rectangle coordinates but pixels are not getting zoomed.

can any body tell how to zoom the image using opengl?

which function shall i use ?
can any body tell the solution.

thanx in advance.

k_szczech

12-14-2006, 06:43 AM

How do you display your image? If you use glDrawPixels, then you could try using textures and draw a textured quad instead. In that case zooming is easy - you just render the same quad with different texture coordinates at corners that specify fragment of texture to display.

i m using linux fedora core 4, gcc compiler.
can give example or some sample code using textures and how to draw texture quad.

k_szczech

12-15-2006, 05:17 AM

Well, I never used glDrawPixels since it's too slow (need to pass entire bitmap to the GPU every time you draw), so I have very limited knowledge here. Perhaps you should try calling glDrawPixels again instead of glCopyPixels?