Re: Using Ogre 1.8 with JOGL and OpenGL ES 2.0
Posted by
Sven Gothel on
Feb 18, 2012; 4:03am
URL: https://forum.jogamp.org/Using-Ogre-1-8-with-JOGL-and-OpenGL-ES-2-0-tp3754215p3755598.html
On 02/17/2012 05:33 PM, seahorse [via jogamp] wrote:
>
>
> I want to use the latest version of Ogre (Ogre 1.8) and render to a SWT
> control using
> OpenGL ES 2.0.
> For this can I setup GLcanvas, GLProfile, GLCapabilites classes which are
> provided by Jogamp
> to setup the EGL part(window handling part) and use Ogre rendering calls
> through a native JNI
> interface which will automatically draw the 3D part.
>
> Basically the whole window handling part will be delegated to JOGL classes
> GLcanvas, GLProfile, GLCapabilites.
>
> And the 3D drawing part will NOT be done by JOGL but will be done at the
> native (C) layer itself
> through a seperate Java class unrelated to JOGL.
>
> Is such a case will Ogre scene get succesfully rendered on the JOGL Surface?
>
> I want to avoid setting up the EGL part myself without using JOGL because it
> seems JOGL has a lot of abstractions, classes and code related to Window
> Handling and it would be worthwhile not to rewrite that.
Understood.
Well, if you wanted the reverse, ie use an already existing GL context etc
for rendering - we would call it an external GL context and actually have
a methodology in place :)
JOGL won't forbid you to use the current context somewhere else, sure not.
And you can make it current etc and pass all the details via JNI to
your other special binding. You could do this either for each frame
and use JOGL's frame by frame makeCurrent/release
or you could just create context and surface, hold the locks and
pass it to Ogre. As you wish ..
It's more a question whether you can satisfy Ogre or not.
~Sven