Reply – JOGL Drawing on Image (e.g. JButton)
Your Name
Subject
Message
or Cancel
In Reply To
JOGL Drawing on Image (e.g. JButton)
— by raysmith619 raysmith619
JOGL Drawing on Image (e.g. JButton)

We are investigating computer graphics with the hope of creating graphics programs/games for children of the ages 4-8 years old.

We are currently using JOGL. To add images, such as animals, to the 3D viewing area we provide JButtons containing a text title with an image below. To add abstract blocks such as "box", "ball" or "cone", we provide a JButton with a text string. We would prefer to provide a JButton containing a miniature graphic similar to those we generate inside our "display()" calls such as "drawBall(GLAutoDrawable... glut.glutSolidSphere(...".

While we might, for each button, create a complete miniature view, containing an instance of the block, I fear that this would be very computationally expensive as well as programmably cumbersome.

Instead, I'm hoping someone might point me in a better direction. I would like to reuse the JOGL code I use to draw instances of the objects in my various views. Fantastic would be instructions on how I could "draw" in to an Image class via a "GLAutoDrawable" or "GL2"., which I could then create a JButton(String, Image) instance with minimal additional overhead.

Thanks for your consideration.
Ray