Posts Tagged ‘java’

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

Liquidiser – a Blender to M3G converter

March 18, 2010

Recently I released Liquidiser, a new tool to convert Blender’s .blend files to M3G’s .m3g format. It doesn’t support the whole M3G spec yet but can convert static and skeleton-animated textured models which is the most important part 🙂
Apart from being a converter Liquidiser is also a library capable of reading entire contents of .blend files so can come in handy for those wanting to write their own converters or utilities.