0
\$\begingroup\$

For my game engine, I would like to be able to load all of the matrices (i.e. mvp, model, etc.) once per frame to save a bit of time, and have a set of uniforms that any shader can access by using layout or binding or something similar. I was wondering if this would be possible or would I have to load them each for every shader?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Yes, you can put your uniforms in a Uniform Buffer Object. These uniforms can be shared between programs. https://www.khronos.org/opengl/wiki/Uniform_Buffer_Object

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .