Archive for the 'Graphics' Category

OpenGL ES for Maemo

July 24th, 2007 | Category: Graphics, Maemo

Lately I’ve been toying around with the idea of adding OpenGL ES support to the Nokia N800 internet tablet. As you might know, OpenGL ES is a slimmed down version of the desktop OpenGL standard. An open source software implementation called Vincent exists for Linux and Windows CE. Porting it to Maemo, the Debian-based software environment for the N770 and N800, was just a matter of creating a package for it.

But a library is not much fun without some supporting software. I started by adding OpenGL ES support to SDL, a popular game programming library. With the patched SDL, getting an OpenGL ES context up and running is just a matter of

    SDL_SetVideoMode(800, 480, 16, SDL_OPENGLES);

GLUT is another widely used high-level library for dealing with OpenGL. An OpenGL ES version of GLUT called GLUT|ES exists for Windows CE. I took that and ported it back to Linux.

Finally, Teemu Haapoja had made an OpenGL ES library for Python in the spirit of PyOpenGL. Originally his library was for Symbian, but now he has ported it to over to Maemo.

So here’s what I have so far:

  • libvincent: Vincent OpenGL ES engine
  • libsdl: SDL with OpenGL ES support
  • libglutes: GLUT with OpenGL ES support
  • python-egl: EGL library for Python
  • python-opengles: OpenGL ES library for Python

I’ve set up a Maemo repository for these packages. You can get the packages with these settings:

  • Name: Muksuluuri
  • Url: http://muksuluuri.ath.cx/maemo
  • Distribution: bora
  • Components: main

The repository also has some additional packages, like Mesa for full OpenGL support. You can find the source code at my darcs repository.

The libraries still have some minor kinks to iron out. For some reason, Vincent renders everything upside down (I said minor, didn’t I :). The OpenGL ES version of SDL also depends on the full OpenGL libraries due to some braindamage in the patch. I hope to have these sorted out soon, along with a new utility library to ease porting OpenGL programs to OpenGL ES.

Oh, I almost forgot the mandatory screenshot. Here’s a Python version of glxgears running on the N800:

OpenGL ES on N800

Here’s the same thing in motion:

10 comments

Archos compatible videos

January 05th, 2005 | Category: Graphics, Hardware, Utilities

The Archos Multimedia Jukebox is a nice portable player but unfortunately picky when it comes to playing AVI files. Thus, here is an empirically crafted script that will encode almost any movie file to an Archos-friendly format.

The script uses mencoder from MPlayer, specifically with the following options:

mencoder -audio-preload 0 -oac copy -o OUTPUT -ovc lavc
         -lavcopts vcodec=mpeg4:vqmin=2:vqmax=20:vhq:keyint=250:vme=4:v4mv INPUT

Note: If the audio track isn’t encoded with MP3, replace -oac copy above with e.g. -oac mp3lame -lameopts preset=standard

Usage:

  make-archos-video.sh input.avi output.avi

Download: make-archos-video.sh

No comments