Jump to content


Photo

Has jwz solved the OpenGL problem?


  • Please log in to reply
9 replies to this topic

#1 OFFLINE   torpor

torpor

    Advanced Member

  • Members
  • PipPipPip
  • 971 posts
  • Local time: 04:35 AM

Posted 20 June 2012 - 08:36 AM

Some exciting news - jwz ported xscreensaver to iOS:

http://www.jwz.org/b...-to-the-iphone/

He did it by implementing OpenGL 1.3 calls in OpenGLES1.1.

Does this mean we now have an easier solution for doing OpenGL conversions to Pandora? Who knows? I'm about to go download the code and have a look ..

What do you guys think?

#2 OFFLINE   crow_riot

crow_riot

    Advanced Member

  • Members
  • PipPipPip
  • 381 posts
  • Local time: 04:35 AM

Donator

Posted 20 June 2012 - 09:38 AM

just looked at it ... it probably makes it easier to port existing software. but doesn't nanoGL do the same?

finished: audiorace | still working on: paperwars | dragonbox compo: apkenv


#3 OFFLINE   torpor

torpor

    Advanced Member

  • Members
  • PipPipPip
  • 971 posts
  • Local time: 04:35 AM

Posted 20 June 2012 - 09:39 AM

I don't know enough about nanoGL to understand .. but just having the hundreds of GL XScreenSavers running on my iPad right now gives me a lot of hope that it can be useful in this context.

#4 OFFLINE   crow_riot

crow_riot

    Advanced Member

  • Members
  • PipPipPip
  • 381 posts
  • Local time: 04:35 AM

Donator

Posted 20 June 2012 - 09:48 AM

yes, that's for sure. it implements the full opengl 1.3 API (where applicable) which nanoGL didnt. someone should give it a try (looking at you pickle ;))

finished: audiorace | still working on: paperwars | dragonbox compo: apkenv


#5 OFFLINE   mcobit

mcobit

    Does this thing work?

  • Members
  • PipPipPip
  • 4509 posts
  • Local time: 05:35 AM
  • LocationFrankfurt a.M., Germany

Donator

Posted 20 June 2012 - 11:10 AM

That sounds good!

Is it just a library you link against instead of libgl?

#6 OFFLINE   Edglex

Edglex

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • Local time: 03:35 AM

Posted 20 June 2012 - 12:17 PM

This sounds cool. As to what is/isn't implemented, he says in the blog post:

There are a few things I couldn't figure out how to implement:

  • Sphere-mapped textures for environmental reflection: OpenGL ES doesn't have glTexGeni GL_SPHERE_MAP, and I don't know how to fake it, so the Flying Toasters aren't shiny.
  • There's glTexImage1D and I'm not sure how to simulate that with glTexImage2D.
  • There's no glPolygonMode with GL_LINE, so I don't see an easy way to implement wireframe objects with hidden surface removal. Maybe rendering them twice with glPolygonOffset?
  • Several of the hacks used GLUtesselator to decompose complex shapes into triangles, and I didn't implement that. I could probably port the code from GLU, but it's a huge piece of code and sounds like a pain in the ass, so I punted.


He also says:

The code is in hacks/glx/jwzgles.c. If you want to use it to port your own legacy code, just include jwzgles.h. Let me know if it works!



#7 OFFLINE   Pickle

Pickle

    Advanced Member

  • Members
  • PipPipPip
  • 875 posts
  • Local time: 10:35 PM

Posted 20 June 2012 - 12:43 PM

interesting, I think the most useful part I think the calllists. Doing a opengl port of alpehone for example might be much easier now.

#8 OFFLINE   Cloudef

Cloudef

    Advanced Member

  • Members
  • PipPipPip
  • 285 posts
  • Local time: 06:35 AM
  • LocationGensokyo

Posted 20 June 2012 - 01:39 PM

Has jwz solved the OpenGL problem?

What problem exactly? All I see is rambling of API changes, and some wrapper code to port ancient software instead of moving on.
makepnd not war

#9 OFFLINE   Pickle

Pickle

    Advanced Member

  • Members
  • PipPipPip
  • 875 posts
  • Local time: 10:35 PM

Posted 20 June 2012 - 04:10 PM

I don't know enough about nanoGL to understand


Really all these wrappers do is track state changes (glEnable/Disable) and collect vertex info (glVertex) and issue the draw commands when needed.
For the most part its not a huge problem to convert it to ES API. In the end its just manipulation of the data and states.

But there are cases where things like call lists can be very intrusive it may not be worth the rewrite, or not the motivation. The one case I mentioned was alpehone, where i just went with the sw render since I didnt want to put in the effort of rewriting the call lists.

#10 OFFLINE   torpor

torpor

    Advanced Member

  • Members
  • PipPipPip
  • 971 posts
  • Local time: 04:35 AM

Posted 22 June 2012 - 07:46 AM

Cloudef: It could be either a) re-write OpenGL code to use GL ES architecture, or B) Plug in jwz's shim code, and rewrite nothing in order to get it running.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users