Hi Charles,

On Jan 22, 2008 10:44 AM, Charles, Oliver <[EMAIL PROTECTED]> wrote:
> We try to port openscenegraph to a device where only opengl es is
> available.
> Does anyone know if this was tried before? And if - if the sources are
> available?

I don't know of any projects that have do so yet.

> If not - does anyone have experience or any hints with porting opengl
> applications to opengl es?
> The problem in detail is that many of the opengl functions used by
> openscenegraph are not available on opengl es , eg GL_POLYGON, Shading
> or any functions introduced in OpenGl 2.0. Is there any well performing
> algorithm to replace for example GL_POLYGON with eg GL_TRIANGLES (etc).

The osgUtil::Optimizer and osgUtil::Tessellator will be able to help a bit.

Items like shaders and other OpenGL state won't be able to map across
to all versions of OpenGL ES, the same applies to display lists too.
Most OpenGL state in the OSG is pretty loosely coupled virtue of the
way that OpenGL state is wrapped up in subclasses from
osg::StateAttribute.  You could easily just not compile the problem
state attributes, or perhaps have a non op implementation of these.
The non op route might help with the job reading existing databases
via the .ive and .osg plugins.

Personally I'd tackle the task my tackling it in several passes - the
first pass would be a very rough attempt, just commenting out or not
compiling parts that don't compile.  Also just use a stripped down
osgUtil::SceneView or osgViewer::GraphicsWindowEmbedded based viewwer
- see osgviewerGLUT and osgviewerSDL for examples of the later.  Again
taking an axe to bits that don't compile in osgViewer would get you
past some of the difficult parts.

Also set yourself a set of simple models that you'd like to load and
see if you can get them working.

Once this rough pass has been done one can reflect on what parts map
easily, what parts don't and how the core OSG might be refactored to
help a much cleaner support of OpenGL ES.

Please feel free to bounce ideas off the OSG community.  I'm sure I'm
not the only one would love to see OpenGL ES supprt added in future
version.

BTW, what dev tools are you using right now?

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to