diff options
Diffstat (limited to 'Runtime/GfxDevice/opengl/GpuProgramsGL.h')
-rw-r--r-- | Runtime/GfxDevice/opengl/GpuProgramsGL.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/opengl/GpuProgramsGL.h b/Runtime/GfxDevice/opengl/GpuProgramsGL.h new file mode 100644 index 0000000..f9649dd --- /dev/null +++ b/Runtime/GfxDevice/opengl/GpuProgramsGL.h @@ -0,0 +1,28 @@ +#pragma once + +#include "Runtime/GfxDevice/GpuProgram.h" +#include "Runtime/GfxDevice/ChannelAssigns.h" + +class ShaderErrors; + +class GlslGpuProgram : public GpuProgramGL { +public: + GlslGpuProgram( const std::string& source, CreateGpuProgramOutput& output ); + virtual ~GlslGpuProgram(); + + virtual void ApplyGpuProgram (const GpuProgramParameters& params, const UInt8* buffer); + + GLShaderID GetGLProgram (FogMode fog, GpuProgramParameters& outParams); + +private: + bool Create( const std::string& source, ShaderErrors& outErrors ); + static void FillParams (GLShaderID programID, GpuProgramParameters& params, PropertyNamesSet* outNames); + void FillChannels (ChannelAssigns& channels); + +private: + GLShaderID m_GLSLVertexShader[kFogModeCount]; + GLShaderID m_GLSLFragmentShader[kFogModeCount]; + int m_FogColorIndex[kFogModeCount]; + int m_FogParamsIndex[kFogModeCount]; + bool m_FogFailed[kFogModeCount]; +}; |