first draft hlsl/glsl segregation and opengl porting.