[<<][opengl][>>][..]
Fri Feb 27 21:09:24 EST 2015

Gui

Widgets are a grid.  That seems simplest.  Need mouse clicks.

Basically, a widget is a rectangle and needs to be able to draw
itself.

I need to stick to glsl 1.2 for now due to HW limitations.


So does this really all need to be done with shaders now?
In ES 2.0 shaders are mandatory.
Projection and modelview are removed 

What goes into the shader?

From [2] it seems that uploading a matrix to the GPU is what's done
these days.

So if there is no default pipeline, why are coordinates still -1 to 1?
Seems so. glViewPort() and normalized device coordinates are still used[3].



Variables:
- uniform: (global) all shaders can access as long as they declare
GLint myLoc = glGetUniformLocation(p, "myVar");
glProgramUniform4f(p, myLoc, 1.0f, 2.0f, 2.5f, 2.7f);

- attribute: stuff is fed into the shader






[1] https://stackoverflow.com/questions/16106854/opengl-es-2-0-and-shaders
[2] https://stackoverflow.com/questions/2713417/which-opengl-functions-are-not-gpu-accelerated
[3] https://www.opengl.org/sdk/docs/man/html/glViewport.xhtml





[Reply][About]
[<<][opengl][>>][..]