Posts Tagged ‘android’

Sane replacement for GLSurfaceView

May 1, 2010

I’ve been asked several times about my implementation of OpenGL ES on top of Android’s SurfaceView so I’m posting it here for easier access 🙂 And maybe someone finds it useful by googling.

A few words about why did I bother in the first place? First, I wanted to control the main game loop by myself and don’t rely on GLSurfaceView’s callbacks. Doing it this way allowed me to have a much better code architecture and is more robust as I can *really* control when and what it does. My version does the same thing in 200 lines of code instead of 1350 and can actually be understood by human beings. That brings us to the second reason: I was experiencing weird bugs and had to debug my GL rendering code. Tracing the issue I ended up at EGL level. To this day I don’t know what was really the problem as GLSurfaceView is an abomination. It doesn’t have a proper separation of responsibilities in its thirteen internal classes, the logic is horribly convoluted… let’s say initially I started to refactor it into something understandable but after a few hours just gave up and wrote my own implementation. In a single class. Simple and working one. Nuff said 🙂

(more…)

Advertisements

Android on the iPhone!

April 24, 2010

FINALLY!

That was my first thought when I saw this post and watched the video 🙂 I just finished installing it on my iPhone, finally it’ll be put to some use 😉

It’s just the first alpha release so things are a bit dodgy but it’s fantastic news anyway and I bet it’ll be improved quickly now. The prebuilt binaries contain Android 1.6 but others built 2.0 and 2.1 working images as well.

Bootloader

OS booting, phase 1

OS booting, phase 2

Android on the iPhone!

Web browser

Two hints if you want to try it on your own. I found this tutorial for dummies very helpful. To easily extract firmware you may want to use commands from this page.