Can Someone tell me how JOGL functions as far as Shaders and Mouse and Key Inputs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Can Someone tell me how JOGL functions as far as Shaders and Mouse and Key Inputs

ElvJOGL
Hi,

I was wondering, like every java based program, you know we got asynchronous from keyboard, mouse, and other devices.

These help us manipulate the geometry that we want according to how one writes the code.

So far what I have seen with shader programs, the geometry are none interactive. Is possible with JOGL to write an interactive program, one where one can let says click one of the corners of a triangle, and be able to drag that corner to change the way the triangle looks?

Could you show me an example that shows these type of functions.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Can Someone tell me how JOGL functions as far as Shaders and Mouse and Key Inputs

jmaasing
This tutorial is what I used when learning modern OpenGL

http://web.archive.org/web/20140209181347/http://www.arcsynthesis.org/gltut/

I use the NEWT API in jogl to capture mouse events. THen I have to do some maths to get from mouse coordinates to the coordinate system the mesh is defined in, then you can modify the mesh.
So you can look at the JOGL examples also, they have a lot of useful code you can use to listen to mouse event et c.
Reply | Threaded
Open this post in threaded view
|

Re: Can Someone tell me how JOGL functions as far as Shaders and Mouse and Key Inputs

ElvJOGL
Thanks, this is a very good tutorial.
Reply | Threaded
Open this post in threaded view
|

Re: Can Someone tell me how JOGL functions as far as Shaders and Mouse and Key Inputs

elect
i did a port of that if you are interested