Tuesday, June 9, 2009

This is a fun day

It's been a bit of a long haul...

The mission is to represent arbitrary graphics - stylus ink, primarily, and images. It will ideally be in OpenGL because I'd like it to be cross platform and because I want to use Awesomium as a render source when we get more advanced. The programming language of choice is Erlang, because that's what the server architecture is in and I'm experimenting with doing a sort of distributed grid thing instead of classic client/server.

Basically there are two things that need to be done:

1. Prove gold standard ink from a pen - that is, receive and represent pressure information with sufficiently timely polling to have a high fidelity reproduction of the user's movements.

2. Render that to an OpenGL surface, preferably with a high level API.

The obvious choice is SDL, for all these things. The first proof of concept I knocked up was in SDL 1.2, which worked fine for 2 and for half of 1, but didn't have pressure information coming off the stylus.

Someone went and built a Summer of Code project to bring that information to SDL 1.3 Hang on... Szymon Wilczek. That's who did it. Anyway, it works fine. The problem is I can't get anything to render in SDL 1.3, no matter how I try it. I've tried the compat.c, and working through the texture to surface attachment api by hand, but there's just no output. Maybe it's because I'm on a laptop without a graphics card? I'm not sure. Anyway, I had this code working for 1.2 and it's very frustrating!