Original Post
Hello, currently to draw my gui i use glOrtho etc... to enable and disable 2D mode during rendering. I am learning GLSL and was wondering if this could be done with a shader instead. So basically i said to myself, for a hud the vertex coordinates (x,z) should correspond to screen coordinates (x,y). So the vertex shader should be: void main() { gl_Position = gl_Vertex; gl_FrontColor = gl_Color; } I also tried: void main(void) { gl_Position.xy = gl_Vertex.xz; gl_Position.z = 0.0f; gl_FrontColor = gl_Color; } And the fragment shader (no lighting): void main() { glFragColor = gl_Color; } Thats just with colors and no texturing so far but it doesnt work, any idea why? should i still use glOrtho etc..?