2d ray tracing with opengl/sdl around simple shapes