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.
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.
Visit nehe.gamedev.net and look for some texturing tutorial there.
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?