Building a simple OpenGL ES 2.0 application

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

Building a simple OpenGL ES 2.0 application

sunnystormy
Hello!

I'm new to the forums and equally new to JOGL. After working at my last gig I was encouraged to learn JAVA programming, which naturally led to my exposure to JOGL. I was considering the JMonkeyEngine previously, but after learning that there's no renderer for desktop OpenGL ES 2.0, I thought JOGL would be more appropriate for my needs. :)

Right now, I am in the process of building a very simple JAVA application that uses the "RedSquare" demo. The problem I'm having is getting it to display within an AWT frame.

I'm assuming that I am to treat the RedSquare class as its own object, but I'm having difficulty figuring out how to properly display it within the main method of another class.

Any guidance would be appreciated. Thank you for your help in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Building a simple OpenGL ES 2.0 application

Sven Gothel
Administrator
On 03/11/2013 04:06 PM, sunnystormy [via jogamp] wrote:

> Hello!
>
> I'm new to the forums and equally new to JOGL. After working at my last gig I
> was encouraged to learn JAVA programming, which naturally led to my exposure
> to JOGL. I was considering the JMonkeyEngine previously, but after learning
> that there's no renderer for desktop OpenGL ES 2.0, I thought JOGL would be
> more appropriate for my needs. :)
>
> Right now, I am in the process of building a very simple JAVA application that
> uses the "RedSquare" demo. The problem I'm having is getting it to display
> within an AWT frame.
>
> I'm assuming that I am to treat the RedSquare class as its own object, but I'm
> having difficulty figuring out how to properly display it within the main
> method of another class.
>
> Any guidance would be appreciated. Thank you for your help in advance!
See Tutorials:
  http://jogamp.org/wiki/index.php/Jogl_Tutorial
  https://sites.google.com/site/justinscsstuff/jogl-tutorial-2

Please have a look at JOGL's unit tests,
source code within JOGL's source tree.
  jogl/src/test/com/jogamp/opengl/test/junit/**

GearsES2, similar to RedSuareES2, is being demonstrated in a
Newt, AWT, Newt/AWT and Newt/SWT environment:
  TestGearsES2NEWT
  TestGearsES2AWT
  TestGearsES2NewtCanvasAWT
  TestGearsES2NewtCanvasSWT

  jogl/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/**

Git repo:
  http://jogamp.org/git/?p=jogl.git;a=summary
  http://jogamp.org/wiki/index.php/Jogamp_SCM_Repositories

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Building a simple OpenGL ES 2.0 application

sunnystormy
Hi Sven,


After looking over the raw OpenGL ES 2.0 example on the wiki (via the link you provided), I realized all I had to do was reference the RedSquare class inside of the "addGLEventListener" method on my GLCanvas object.

I now have the square displaying in my application. I'm eager to explore more of the API, and this is a great start!

I appreciate your help. Thanks again! :)