PDA

View Full Version : Global uniforms



Corrail
06-30-2005, 01:58 PM
Hello!

I just finished my first big project using OpenGL and came in some troubles using GLSL. If I want to specifiy a global uniform, for example the object matrix I have either pass this value to every shader or I have to use texture matrices (which I did).
So my question: are there any plans for global uniforms for GLSL? Or do I have to search for bulit-in uniforms and use them?

zed
07-01-2005, 12:10 AM
ive got no idea about future plans but what i use are the gl_Lights for global stuff (i dont use lighting so its sitting around doing nothing)
and with 8 lights * AMBIENT,DIFFUSE,POSITION etc u have heaps of space

skynet
07-01-2005, 06:48 AM
I also use state uniforms as "global" uniforms. But it feels rather odd. IŽd like to see a clean api for this in GLSL one day.