diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-06-14 01:24:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-06-14 01:24:21 +0400 |
commit | 6d62a18a51303da845df1c04cd2b357853b7e7ed (patch) | |
tree | dbe5455cf7d57f719b58615c1c40c6a8f2903439 /source/gameengine/Ketsji/BL_BlenderShader.h | |
parent | 9fb4cbc668ad7fc612cbb63206567066e2626173 (diff) |
Apricot Branch: GLSL
====================
* Added support for lamps and shaders. All material diffuse and
specular shaders are supported, for lamps especially area light
support is not there yet.
* Added support for these GLSL shaders in the game engine, though
it is incomplete and somewhat of a hack. Specifically all the
variables are completely static, which means moving lights, or
animating material properties will not work.
* Enabling GLSL shaders is now different. They work in textured
drawmode, and can be enabled in the Game menu with the option
"Blender GLSL Materials"
Known issues:
* The GLSL shaders don't always update correct on light changes.
* The game player appears to crash with these GLSL shaders, while
regular blender works fine.
Diffstat (limited to 'source/gameengine/Ketsji/BL_BlenderShader.h')
-rw-r--r-- | source/gameengine/Ketsji/BL_BlenderShader.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h new file mode 100644 index 00000000000..95f2cfe044d --- /dev/null +++ b/source/gameengine/Ketsji/BL_BlenderShader.h @@ -0,0 +1,37 @@ + +#ifndef __BL_GPUSHADER_H__ +#define __BL_GPUSHADER_H__ + +#include "GPU_material.h" + +#include "MT_Matrix4x4.h" +#include "MT_Matrix3x3.h" +#include "MT_Tuple2.h" +#include "MT_Tuple3.h" +#include "MT_Tuple4.h" + +struct Material; + +/** + * BL_BlenderShader + * Blender GPU shader material + */ +class BL_BlenderShader +{ +private: + GPUMaterial *mGPUMat; + bool mBound; + +public: + BL_BlenderShader(struct Material *ma); + virtual ~BL_BlenderShader(); + + const bool Ok()const; + void SetProg(bool enable); + + void ApplyShader(); + void SetTexCoords(class RAS_IRasterizer* ras); + void Update(const class KX_MeshSlot & ms, class RAS_IRasterizer* rasty); +}; + +#endif//__BL_GPUSHADER_H__ |