GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment: Sdl 1.3, Glu And Nehe Opengl Tutorials For The Pandora - GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Sdl 1.3, Glu And Nehe Opengl Tutorials For The Pandora

#1 User is offline   Cpasjuste

  • GP32 Hardcore
  • PipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 260
  • Joined: 20-April 07

Posted 28 May 2009 - 02:56 PM

Hello there !

After a lot of work, i finally successfully writed an OpenGL ES pandora driver for the upcoming SDL 1.3 library.

The pandora video driver allow to use SDL 1.3 with OpenGL ES support under the framebuffer, but for now i didn't writed the input event part, so we need to add our own control system. This will be added to the pandora video driver soon, i bet before the official pandora release.

I also added OpenGL ES support for the x11 video driver, so we can use SDL 1.3 with OpenGL ES support under X, with input event working and all that crap. So it mean that this one is fully functionnal.

I contacted Sam, the author of the SDL library, this one confirmed me that we can dynamically link our application against SDL 1.3 for FREE, and that we can add this shared library for free in our Pandora firmware image. This mean that you can already start coding application under the SDL 1.3 library, it will be free for the pandora.

Note that all this work is done on the SVN library, but this one seems to be almost done for a release so it may not change a lot.

Here is the SDL 1.3 repository with Pandora support : http://github.com/Cp...ste/SDL-13/tree


In the same time, i ported GLU library to the pandora, based on the "Mike Gorchak" QNX port (http://embedded.org.ua/opengles/lessons.html) so i was able to compile his Nehe OpenGL tutorials ports.
Here is the GLU repository with Pandora support, which need SDL 1.3 : http://github.com/Cpasjuste/GLU/tree

And here is the Nehe OpenGL tutorial compiled for the pandora (with sources) : http://mydedibox.fr/.../sdl13_nehe.zip

If you want some screenshot of the tutorials, you can found them here : http://embedded.org....es/lessons.html
All of them have been ported with success on the pandora.

See you !!!


#2 User is offline   MWeston

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 900
  • Joined: 23-June 06
  • Location:Canada

Posted 28 May 2009 - 04:34 PM

Wow, nice work!!

#3 User is offline   Pickle

  • Mega GP Mania
  • Icon
  • View blog
  • Group: GP Guru
  • Posts: 3,119
  • Joined: 30-May 06
  • Gender:Male
  • Location:Detroit, Michigan

Posted 28 May 2009 - 05:45 PM

Cpasjuste, this is great.

How is 1.3 different. In previous 1.2.X build opengl and software context's seem to separate, is this still the case with 1.3? Basically does any of the opengles power the normal software modes? Could normal SDL apps linked to 1.3 see any increase in speed?

I guess I need to find some documentation on 1.3 to get up to speed.

#4 User is offline   Cpasjuste

  • GP32 Hardcore
  • PipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 260
  • Joined: 20-April 07

Posted 28 May 2009 - 05:59 PM

In fact SDL 13 have some new functions for rendering. When we use the 13 calls, all the blitting are done with openGL ES for us, and software for other platform. So when using the SDL 13 engine, yes we have a lot of power. Old SDL 1.2 calls (SDL_Blitsurface ..) are still here but use software rendering like the 1.2 one.

Having SDL 13 mean that we have a great openGL ES powered 2D library, and that all future application using the sdl 13 engine will be openGL ES accelerated on the pandora. Also the 1.3 engine is already working on the iphone, so people can easly develop application for the iphone and the pandora in the same time.

I was actually writing a 2D opengl Es library for the pandora, i will move it to SDL 1.3.

This post has been edited by Cpasjuste: 28 May 2009 - 06:02 PM


#5 User is offline   Pickle

  • Mega GP Mania
  • Icon
  • View blog
  • Group: GP Guru
  • Posts: 3,119
  • Joined: 30-May 06
  • Gender:Male
  • Location:Detroit, Michigan

Posted 28 May 2009 - 06:02 PM

QUOTE (Cpasjuste @ May 28 2009, 01:59 PM) <{POST_SNAPBACK}>
In fact SDL 13 have some new functions for rendering. When we use the 13 calls, all the blitting are done with openGL ES for us, and software for other platform. So when using the SDL 13 engine, yes we have a lot of power. Old SDL 1.2 calls (SDL_Blitsurface ..) are still here but use software rendering like the 1.2 one.

Having SDL 13 mean that we have a great openGL ES powered 2D library, and that all future application using the sdl 13 engine will be openGL ES accelerated on the pandora.


Yeah thats what I thought, very awesome!

#6 User is offline   Cpasjuste

  • GP32 Hardcore
  • PipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 260
  • Joined: 20-April 07

Posted 28 May 2009 - 06:13 PM

I think porting SDL 1.2 2D applications to 1.3 should be very easy, i will try soon to see.

Also, you remember our problem of poor framerate under X with openGL ES ? I asked powerVr team about that, and they are already aware of this problem. It should be fixed in june with the EVM ! So for now SDL 13 under X is slower than under the framebuffer but should be fixed in june.

This post has been edited by Cpasjuste: 28 May 2009 - 06:15 PM


#7 User is offline   Pickle

  • Mega GP Mania
  • Icon
  • View blog
  • Group: GP Guru
  • Posts: 3,119
  • Joined: 30-May 06
  • Gender:Male
  • Location:Detroit, Michigan

Posted 28 May 2009 - 07:13 PM

QUOTE (Cpasjuste @ May 28 2009, 02:13 PM) <{POST_SNAPBACK}>
I think porting SDL 1.2 2D applications to 1.3 should be very easy, i will try soon to see.

Also, you remember our problem of poor framerate under X with openGL ES ? I asked powerVr team about that, and they are already aware of this problem. It should be fixed in june with the EVM ! So for now SDL 13 under X is slower than under the framebuffer but should be fixed in june.


Great im glad they are on the problem.

#8 User is offline   dockthepod

  • GP32 Hardcore
  • PipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 240
  • Joined: 15-June 06

Posted 28 May 2009 - 10:14 PM

Very cool. Is there a changelist somewhere for 1.2->1.3? I'm failing to find anything.

#9 User is offline   senorgomez

  • GP32 Hardcore
  • PipPipPipPip
  • View blog
  • Group: Members
  • Posts: 120
  • Joined: 15-May 09

Posted 29 May 2009 - 03:21 AM

Noob question but whatever. This includes Open GL ES 2.0 not 1.x?


EDIT: P.S. Very exciting thread, I am about to start my own project (uni semester is over)

And to add, this is exactly what I (and other amateur developers) need, thanks a lot! biggrin.gif

This post has been edited by senorgomez: 29 May 2009 - 03:40 AM


#10 User is online   lulzfish

  • I am now here to f**k you -- Ze Spy
  • PipPipPipPipPipPip
  • View blog
  • Group: GP32 Hardcore
  • Posts: 2,791
  • Joined: 14-January 09
  • Gender:Male
  • Interests:Making shit up, programming, Linux, the ladies

Posted 29 May 2009 - 05:15 AM

Not sure, but since the Pandora supports both and SDL programs don't really use GLSL, it shouldn't matter.

#11 User is offline   Cpasjuste

  • GP32 Hardcore
  • PipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 260
  • Joined: 20-April 07

Posted 29 May 2009 - 05:50 AM

It use openGL ES 1.1.

If people want to start a project with SDL 1.3 for the pandora, you can compile the openGL desktop version of it, and use it on your desktop, As soon as you don't use any openGL call that are not provided with openGL ES, your project will run fine on the pandor. I'm actually working on a library that come on top of SDL 1.3, that should add some easy wrapper for rotation, scaling, TTF font rendering etc. I will try to release a premilary version very soon, maybe in the next week, so people can start coding !

#12 User is offline   Yod4z

  • Mega GP Mania
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 845
  • Joined: 16-February 06
  • Gender:Male
  • Location:France

Posted 29 May 2009 - 06:44 AM

I have heard that the SGX on the OMAP is not good at 2D things, is this right?

#13 User is offline   JayFoxRox

  • NO DELAYS, NO MILK!
  • PipPipPipPipPipPip
  • View blog
  • Group: GP32 Hardcore
  • Posts: 675
  • Joined: 03-August 08
  • Gender:Male
  • Location:Hanover, Germany

Posted 29 May 2009 - 08:25 AM

Can't be I think. Because if you look at OpenGL ES 2.0 you see that you have to do vertex transformation in the vertexshader. Not transforming it results in a 2D Primitive, transforming it results in a 3D primitive. In theory drawing the 2D Primitive should be faster because you don't have to multiple by a matrix. The only thing which could be the limiting factor here is that most 2D objects cover more screen and require more work in the fragmentshader (but then again, you can skip lighting) and bandwidth

#14 User is offline   Adventus

  • GP Mania
  • PipPipPipPipPip
  • View blog
  • Group: GP32 Hardcore
  • Posts: 454
  • Joined: 01-October 07
  • Gender:Male
  • Location:Canberra, Australia

Posted 29 May 2009 - 10:41 AM

QUOTE
I have heard that the SGX on the OMAP is not good at 2D things, is this right?
A TBDR doesn't really gain you anything without a zbuffer because the fragment shader will still run on nonvisible fragments. Its still much quicker than software, you just don't get the zero overdraw advantage. If your billboarding and batching your primitives it should work fine.

In SuperLumenal i do all my transforms as a 2D matrix + displacement vector. Saves a lot over a full 4D matrix or 3d + displacement.... 8 vs 28 / 18 operations.



#15 User is offline   Michoko

  • GP32 User
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 13-May 08
  • Gender:Male
  • Location:France

Posted 29 May 2009 - 11:54 AM

Amazing work! Hardware accelerated SDL is just what we needed ! smile.gif

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic