Best way to implement a Shader Class

Each shader seems really different from each other, I did some research about how shaders classes are implemented to support in a scalable and flexible way new shaders yet to come and old shaders for old cards.

Basically what I found is this topic: http://www.gamedev.net/community/forums/topic.asp?topic_id=169710, in which it is considered the best option to code each shader separately derived from a class and to implement some functions (probably virtual functions derived from a base class).

But since the post is kinda old, I am wondering myself if this will be enough with all those passes and other things used in shaders nowadays. And if this is a reasonable thing for the future.

IMHO don’t limit your creativy to what OpenGL offers you. Instead, try definning how your effects will work in your system, how they will interact and how they will be invoked. Just after that you can start creating the classes that implement what YOU want, using OpenGL Shaders.

bye bye!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.