View Full Version : What is the proper way to separate programs?

09-24-2010, 05:51 PM
Say one has reached a point of having to program a way to switch programs.

Right now I'm thinking it might be ideal to separate "drawing entities" into groups of programs and perhaps other data.

For instance, a "font entity" or a "static mesh entity". Each might have its own GLSL program but also other data such as its own lighting etc.

Do you know of a better way?

09-25-2010, 02:15 PM
That's the preferred way to do it: use a variety of simple separate shader programs to render different types of things rather than one giant complex shader program that renders everything.