Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
CShaderPass Class Reference

Implements a render pass consisting of various GL state changes and a shader, used by CShaderTechnique. More...

#include <ShaderTechnique.h>

Public Member Functions

 CShaderPass ()
 
void SetShader (const CShaderProgramPtr &shader)
 Set the shader program used for rendering with this pass. More...
 
void AlphaFunc (GLenum func, GLclampf ref)
 
void BlendFunc (GLenum src, GLenum dst)
 
void ColorMask (GLboolean r, GLboolean g, GLboolean b, GLboolean a)
 
void DepthMask (GLboolean mask)
 
void DepthFunc (GLenum func)
 
void Bind ()
 Set up all the GL state that was previously specified on this pass. More...
 
void Unbind ()
 Reset the GL state to the default. More...
 
const CShaderProgramPtrGetShader () const
 

Private Attributes

CShaderProgramPtr m_Shader
 
bool m_HasAlpha
 
GLenum m_AlphaFunc
 
GLclampf m_AlphaRef
 
bool m_HasBlend
 
GLenum m_BlendSrc
 
GLenum m_BlendDst
 
bool m_HasColorMask
 
GLboolean m_ColorMaskR
 
GLboolean m_ColorMaskG
 
GLboolean m_ColorMaskB
 
GLboolean m_ColorMaskA
 
bool m_HasDepthMask
 
GLboolean m_DepthMask
 
bool m_HasDepthFunc
 
GLenum m_DepthFunc
 

Detailed Description

Implements a render pass consisting of various GL state changes and a shader, used by CShaderTechnique.

Definition at line 27 of file ShaderTechnique.h.

Constructor & Destructor Documentation

CShaderPass::CShaderPass ( )

Definition at line 22 of file ShaderTechnique.cpp.

Member Function Documentation

void CShaderPass::AlphaFunc ( GLenum  func,
GLclampf  ref 
)

Definition at line 79 of file ShaderTechnique.cpp.

void CShaderPass::Bind ( )

Set up all the GL state that was previously specified on this pass.

Definition at line 27 of file ShaderTechnique.cpp.

void CShaderPass::BlendFunc ( GLenum  src,
GLenum  dst 
)

Definition at line 86 of file ShaderTechnique.cpp.

void CShaderPass::ColorMask ( GLboolean  r,
GLboolean  g,
GLboolean  b,
GLboolean  a 
)

Definition at line 93 of file ShaderTechnique.cpp.

void CShaderPass::DepthFunc ( GLenum  func)

Definition at line 108 of file ShaderTechnique.cpp.

void CShaderPass::DepthMask ( GLboolean  mask)

Definition at line 102 of file ShaderTechnique.cpp.

const CShaderProgramPtr& CShaderPass::GetShader ( ) const
inline

Definition at line 54 of file ShaderTechnique.h.

void CShaderPass::SetShader ( const CShaderProgramPtr shader)
inline

Set the shader program used for rendering with this pass.

Definition at line 35 of file ShaderTechnique.h.

void CShaderPass::Unbind ( )

Reset the GL state to the default.

Definition at line 57 of file ShaderTechnique.cpp.

Member Data Documentation

GLenum CShaderPass::m_AlphaFunc
private

Definition at line 60 of file ShaderTechnique.h.

GLclampf CShaderPass::m_AlphaRef
private

Definition at line 61 of file ShaderTechnique.h.

GLenum CShaderPass::m_BlendDst
private

Definition at line 65 of file ShaderTechnique.h.

GLenum CShaderPass::m_BlendSrc
private

Definition at line 64 of file ShaderTechnique.h.

GLboolean CShaderPass::m_ColorMaskA
private

Definition at line 71 of file ShaderTechnique.h.

GLboolean CShaderPass::m_ColorMaskB
private

Definition at line 70 of file ShaderTechnique.h.

GLboolean CShaderPass::m_ColorMaskG
private

Definition at line 69 of file ShaderTechnique.h.

GLboolean CShaderPass::m_ColorMaskR
private

Definition at line 68 of file ShaderTechnique.h.

GLenum CShaderPass::m_DepthFunc
private

Definition at line 77 of file ShaderTechnique.h.

GLboolean CShaderPass::m_DepthMask
private

Definition at line 74 of file ShaderTechnique.h.

bool CShaderPass::m_HasAlpha
private

Definition at line 59 of file ShaderTechnique.h.

bool CShaderPass::m_HasBlend
private

Definition at line 63 of file ShaderTechnique.h.

bool CShaderPass::m_HasColorMask
private

Definition at line 67 of file ShaderTechnique.h.

bool CShaderPass::m_HasDepthFunc
private

Definition at line 76 of file ShaderTechnique.h.

bool CShaderPass::m_HasDepthMask
private

Definition at line 73 of file ShaderTechnique.h.

CShaderProgramPtr CShaderPass::m_Shader
private

Definition at line 57 of file ShaderTechnique.h.


The documentation for this class was generated from the following files: