OpenGL object picking and dragging

Posted on 2009-07-06
Medium Priority
Last Modified: 2015-01-05
How do I write OpenGL code that displays 3D objects (like Cubes) in which I can pick one or more objects and drag them to change their position?  I would prefer this solution to be in Java & SWT.  Code in C++ is also ok.
Question by:sankartadi
1 Comment
LVL 25

Accepted Solution

InteractiveMind earned 2000 total points
ID: 24790117
NeHe has great OpenGL tutorials which include drawing a cube (these are easily adapted to JoGL):

And for picking objects, see

(To get the mouse_x and mouse_y coordinates, just add an AWT mouse listener to your canvas)

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question