I have old opengl1/1.5 immediate mode code im trying to get updated into opengl es 2 using glsl. I have some code that creates 2d box using glVertex3i to set the location in pixels. I have a box drawing in glsl but its in the center using
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
How can I set it using pixels? Im not concerned about passing the values yet just changing the gl_Position to say put it 100px from the bottom and 100px in from the left that would be a great starting point. Thanks
I figure I might be able to (havent tried) make a box that takes up the whole screen then use the frag shader to only set the pixels I want but then it would have to run over per every pixel on screen but thats got to be inefficient I would think theres a better way?