Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

sp::video::CgShaderProgram Class Reference

Class for the "NVIDIA Cg Shader Program". More...

#include <spCgShaderProgram.hpp>

Inheritance diagram for sp::video::CgShaderProgram:
sp::video::Shader sp::video::CgShaderProgramD3D11 sp::video::CgShaderProgramD3D9 sp::video::CgShaderProgramGL

List of all members.

Public Member Functions

virtual ~CgShaderProgram ()
bool compile (const std::list< io::stringc > &ShaderBuffer, const io::stringc &EntryPoint="", const c8 **CompilerOptions=0)
virtual bool setConstant (const io::stringc &Name, const f32 Value)
virtual bool setConstant (const io::stringc &Name, const f32 *Buffer, s32 Count)
virtual bool setConstant (const io::stringc &Name, const s32 Value)
virtual bool setConstant (const io::stringc &Name, const s32 *Buffer, s32 Count)
virtual bool setConstant (const io::stringc &Name, const dim::vector3df &Position)
virtual bool setConstant (const io::stringc &Name, const dim::vector4df &Position)
virtual bool setConstant (const io::stringc &Name, const video::color &Color)
virtual bool setConstant (const io::stringc &Name, const dim::matrix4f &Matrix)

Protected Member Functions

 CgShaderProgram (ShaderClass *Table, const EShaderTypes Type, const EShaderVersions Version)
bool createProgram (const io::stringc &SourceCodeString, const io::stringc &EntryPoint, const c8 **CompilerOptions=0)
virtual bool compileCg (const io::stringc &SourceCodeString, const io::stringc &EntryPoint, const c8 **CompilerOptions=0)=0
virtual void bind ()=0
virtual void unbind ()=0
bool getParam (const io::stringc &Name)
bool setupShaderConstants ()

Protected Attributes

CGprofile cgProfile_
CGprogram cgProgram_
std::map< std::string,
CGparameter > 
ParameterMap_

Static Protected Attributes

static CGparameter ActiveParam_

Friends

class CgShaderClass

Detailed Description

Class for the "NVIDIA Cg Shader Program".


Constructor & Destructor Documentation

virtual sp::video::CgShaderProgram::~CgShaderProgram (  )  [virtual]
sp::video::CgShaderProgram::CgShaderProgram ( ShaderClass Table,
const EShaderTypes  Type,
const EShaderVersions  Version 
) [protected]

Member Function Documentation

virtual void sp::video::CgShaderProgram::bind (  )  [protected, pure virtual]
bool sp::video::CgShaderProgram::compile ( const std::list< io::stringc > &  ShaderBuffer,
const io::stringc EntryPoint = "",
const c8 **  CompilerOptions = 0 
) [virtual]

Compiles the given shader source code.

Parameters:
[in] ShaderBuffer Specifies the shader source code in form of a string container. Each string line has to end with the end-of-line character ('
')!
[in] EntryPoint Specifies the shader entry point. This not required for GLSL shaders. But for HLSL and Cg. It's actually just the shader's main function name.
[in] CompilerOptions Specifies the pointer to the comiler option strings.
Returns:
True if the shader could be compiled successful.

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::compileCg ( const io::stringc SourceCodeString,
const io::stringc EntryPoint,
const c8 **  CompilerOptions = 0 
) [protected, pure virtual]
bool sp::video::CgShaderProgram::createProgram ( const io::stringc SourceCodeString,
const io::stringc EntryPoint,
const c8 **  CompilerOptions = 0 
) [protected]
bool sp::video::CgShaderProgram::getParam ( const io::stringc Name  )  [protected]
virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const f32  Value 
) [virtual]

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const s32  Value 
) [virtual]

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const video::color Color 
) [virtual]

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const dim::matrix4f Matrix 
) [virtual]

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const dim::vector4df Position 
) [virtual]

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const f32 Buffer,
s32  Count 
) [virtual]

Reimplemented from sp::video::Shader.

Reimplemented in sp::video::CgShaderProgramGL.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const s32 Buffer,
s32  Count 
) [virtual]

Reimplemented from sp::video::Shader.

virtual bool sp::video::CgShaderProgram::setConstant ( const io::stringc Name,
const dim::vector3df Position 
) [virtual]

Reimplemented from sp::video::Shader.

bool sp::video::CgShaderProgram::setupShaderConstants (  )  [protected]
virtual void sp::video::CgShaderProgram::unbind (  )  [protected, pure virtual]

Friends And Related Function Documentation

friend class CgShaderClass [friend]

Member Data Documentation

CGparameter sp::video::CgShaderProgram::ActiveParam_ [static, protected]
std::map<std::string, CGparameter> sp::video::CgShaderProgram::ParameterMap_ [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines