Donnerstag, 27. Dezember 2012

On writing my own WebGL engine


So I did try out Threejs and CubicVR JS and while they are really powerful, I got stuck on using a 6 picture based Skybox with both of them. Threejs does it in a weird - two pass way I didn't like and CubicVR only supports an all-in-one picture approach I didn't like either.

So I tried to add a new Skybox object to CubicVR based on the "Cube with Multiple Materials" example.
But I failed horribly. Both because I didn't understand the inner workings of CubicVR enough and because I didn't understand WebGL.

It has been my personal experience, that to truly use a framework to its maximum potential you should understand the underlying concepts it is trying to abstract anyways.

So after I have stayed away from OpenGL for my entire life, I decided to finally learn it. ( OpenGL ES 2.0 to be specific ) and I am happy to report that it has payed of big time - I am in love !

While the old OpenGL (1.0 and maybe 2.0 )  without shaders was truly ugly, the new shader based OpenGL is easy to learn, understand and like. While I still believe this is an API that would benefit incredibly if converted to an object oriented API it is easy enough to build one yourself now and not cry in pain over all the ugly fixed functions because there are only so few left :-)


Keine Kommentare: