GLShaders - Welcome
I am pleased to announce that the GLShaders is now ready and hot! Below and on other sides You can find proper information about usage of the engine. Enjoy.
Basic Information
GLShaders is a simple C++ effects engine alowing to consider OpenGL shaders as a parts of effect object. It is created to make the shaders usage simpler by placing a lot of code into objects. Also the engine containes a set of effect functions that setup the GL for some work (e.g. blending, multitexturing etc.). User's task is only to pass to the effect object proper data, like light parameters, set of textures, material info etc. While the effect objects are called for execution the set up informetions are passed to GL, according to defined effect function.
Engine structure
The engine is constructed of a set of classes defining the objects listed below:
- Effect - the main and basic structure of the engine,
- Texture - structure used for storing data about GL textures,
- Light - used for GL lighting setup,
- Material - containing information about GL material,
- Fog - a structure that stores GL fog setup information.
Additionally the engine containes also a set of auxiliary functions.
Version dependencies
The current version of the GLShaders engine is dependent on the OpneGL 2.x version and nativly compiled in Linux environment.
Usage
The engine is very easy to use. The setup and usage of the effects is listed in points below:
- Call an auxiliary function GLShaders::glStartEnvironment().
- Create an easily accessible instance of the GLEffect class.
- Setup the effect by creating textures, lighting, material and fog objects and passing them to it.
- Then finally in your drawing function call the effect to execute, as showed below:
// ...
// Call the effect for exectution passing to it effect function flags
effect.Begin(effect_function_flags);
{
// Place here code refering to effect parameters (GLSL uniform variables)
// And your rendering function
}
effect.End();
// ...
For more setup and usage information see section Effect Object.
Future plans
- Multipass rendering - structures and functions allowing the simple way of multipass rendering.
- Render-to-Texture - effect function allowing to render to texture using GL framebuffers.
See my profile and the source code. See project chat here.





