User:Javispedro/SDL-GLES

m (OpenGL ES 2.0)
m
Line 14: Line 14:
#: <code>fakeroot apt-get install libgles2-dev</code>
#: <code>fakeroot apt-get install libgles2-dev</code>
# Now to get a simple skeleton for your app. Download [http://git.maemo.org/git?p=sdlhildon;a=blob_plain;f=sdlgles/test/gles2.c;h=d13ee1ef5505af8ee51a68250f3016ea4ce5f5d3;hb=HEAD gles2.c] and put it in your working directory.
# Now to get a simple skeleton for your app. Download [http://git.maemo.org/git?p=sdlhildon;a=blob_plain;f=sdlgles/test/gles2.c;h=d13ee1ef5505af8ee51a68250f3016ea4ce5f5d3;hb=HEAD gles2.c] and put it in your working directory.
 +
#: <code>wget "http://git.maemo.org/git?p=sdlhildon;a=blob_plain;f=sdlgles/test/gles2.c;h=d13ee1ef5505af8ee51a68250f3016ea4ce5f5d3" -O gles2.c</code>
# Build gles2 with  
# Build gles2 with  
-
#: <code>gcc `sdl-config --cflags --libs` -o gles2 gles2.c -lSDL_gles</code>
+
#: <code>gcc `sdl-config --cflags --libs` -o gles2 gles2.c -lSDL_gles -lEGL -lGLESv2</code>
# Now run it. Ensure the SDK interface is up (this is out of the scope for this little tutorial).
# Now run it. Ensure the SDK interface is up (this is out of the scope for this little tutorial).
#: <code>./gles2</code>
#: <code>./gles2</code>

Revision as of 22:29, 23 March 2010

You can use SDL 1.2 and a small addon I made, SDL-GLES, to ease development of OpenGL ES (1.1 and 2.0) applications in Maemo.

Page in progress

Contents

Get started

OpenGL ES 2.0

  1. In any of the SDK targets, download and install SDL and SDL-GLES packages.
    fakeroot apt-get install libsdl-gles1.2-dev libsdl1.2-dev
  2. If you are in the FREMANTLE_ARMEL target, install libgles2-sgx-img-dev (which contains the OpenGL ES 2.0 required libraries and headers)
    fakeroot apt-get install libgles2-sgx-img-dev
  3. But if you are in the FREMANTLE_X86 target, install libgles2-dev instead (which contains the OpenGL ES 2.0 emulation libraries).
    fakeroot apt-get install libgles2-dev
  4. Now to get a simple skeleton for your app. Download gles2.c and put it in your working directory.
    wget "http://git.maemo.org/git?p=sdlhildon;a=blob_plain;f=sdlgles/test/gles2.c;h=d13ee1ef5505af8ee51a68250f3016ea4ce5f5d3" -O gles2.c
  5. Build gles2 with
    gcc `sdl-config --cflags --libs` -o gles2 gles2.c -lSDL_gles -lEGL -lGLESv2
  6. Now run it. Ensure the SDK interface is up (this is out of the scope for this little tutorial).
    ./gles2

In detail

Questions & Answers

Feel free to edit here.