Can anybody guide me to implement mouse based zoom in, zoom out, and then scroll up,down,left,right (like in adobe reader while viewing pdf file). I m using openGL.

Recommended Answers

All 5 Replies

Is this for 2D or 3D?

Is this for 2D or 3D?

3D with OpenGL (JOGL bindings in particular), though you can certainly do 2D work with OpenGL as well.

Edit: The NeHe tutorials have code portings for many different languages available at the bottom of each lesson, so those are not specific to JOGL (which are for Java).

User input is not handled ( or ever mentioned ) in the OpenGL specification. It is a graphics spec not an input spec.

There are libs that provide this functionality for OGL apps in a multiplatform way, i.e. glut and SDL... but keyboard and mouse handling is otherwise platform dependant. You should probably use one of these libs ( the windows API will also provide this functionality, but it's then platform dependant ).

So, more important than using 'OpenGL', what OS are you using, what development language are you using, and what libs would you be prepared to use aswell as OGL.

Hi every one,

I need the code in C or C++. Are there any body give me the code?

Thanks in advance.

commented: Stop resurrecting old threads to post "Give me teh codez" -5
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.