DI-Guy SDK Documentation  13.7.1
diguyDx11GraphicsShaderInstance Class Reference

#include <diguyDx11GraphicsShaderInstance.h>

Inheritance diagram for diguyDx11GraphicsShaderInstance:
diguyGraphicsShaderInstance

Public Member Functions

 diguyDx11GraphicsShaderInstance (void *internal_data)
 4 Header files and forward declarations More...
 
virtual int bind ()
 This function will be called by DI-Guy when it is time for the object that this shader instance is attached to to be rendered. More...
 
virtual int unbind ()
 This function will be called by DI-Guy when the object this shader is attached to is done being rendered. More...
 
- Public Member Functions inherited from diguyGraphicsShaderInstance
diguyGraphicsShaderTechniqueget_shader_technique ()
 This function returns the shader technique this shader instance is associated with. More...
 
diguyCharacterget_character ()
 This function returns a pointer to the character that this shader instance is associated with. More...
 
int get_num_variables ()
 
const char * get_variable_name_at_index (int index)
 
int has_variable (const char *name)
 
const char * get_variable_type (const char *name)
 
void reset_variables_to_initial_values ()
 
void reset_variables_to_program_defaults ()
 
int set_variable_float (const char *name, float value, int set_current=1, int set_initial=0, float blend_time=0.0f)
 
int set_variable_vec2 (const char *name, float x, float y, int set_current=1, int set_initial=0, float blend_time=0.0f)
 
int set_variable_vec3 (const char *name, float x, float y, float z, int set_current=1, int set_initial=0, float blend_time=0.0f)
 
int set_variable_vec4 (const char *name, float x, float y, float z, float w, int set_current=1, int set_initial=0, float blend_time=0.0f)
 
int set_variable_int (const char *name, int value, int set_current=1, int set_initial=0)
 
int get_variable_float (const char *name, float *value, int get_current=1)
 
int get_variable_vec2 (const char *name, float *x, float *y, int get_current=1)
 
int get_variable_vec3 (const char *name, float *x, float *y, float *z, int get_current=1)
 
int get_variable_vec4 (const char *name, float *r, float *g, float *b, float *a, int get_current=1)
 
int get_variable_int (const char *name, int *value, int get_current=1)
 
diguyGraphicsShaderProgramget_shader_program ()
  Deprecated Functions: changed due to API restructuring More...
 
bdiShaderProgramInstanceget_internal_data ()
 

Public Attributes

diguyDx11GraphicsShaderProgramm_shader_program
 

Additional Inherited Members

- Protected Member Functions inherited from diguyGraphicsShaderInstance
 diguyGraphicsShaderInstance (void *internal_data)
 A protected constructor. More...
 
virtual ~diguyGraphicsShaderInstance ()
 A protected destructor. More...
 

Constructor & Destructor Documentation

diguyDx11GraphicsShaderInstance::diguyDx11GraphicsShaderInstance ( void *  internal_data)

4 Header files and forward declarations

Member Function Documentation

int diguyDx11GraphicsShaderInstance::bind ( )
virtual

This function will be called by DI-Guy when it is time for the object that this shader instance is attached to to be rendered.

This happens during the Draw Stage, just before the geometry of a character or scene object is to be rendered.

Any instance level shader control variables should be set in this function. Instance level variables will affect only shader operations in which this instance is active. Variables that should affect the overall program of a shader should be set in diguyGraphicsShaderProgram::bind().

Immediate Mode:

Immediate mode renderers usually do override this function.

Scene Graph:

Scene graph renderers usually do not override this function; the renderer will typically do this internally. If shader variables need to be bound, however, this function should be overridden.

Callable From:

  • N/A (automatically called by DI-Guy Graphics API during the Draw Stage)

Reimplemented from diguyGraphicsShaderInstance.

int diguyDx11GraphicsShaderInstance::unbind ( )
virtual

This function will be called by DI-Guy when the object this shader is attached to is done being rendered.

This happens during the Draw Stage, just after the geometry of a character has been rendered.

Any shader variables bound in bind() should be unbound here.

Immediate Mode:

Immediate mode renderers usually do override this function.

Scene Graph:

Scene graph renderers usually do not override this function; the renderer will typically do this internally. If the bind() function was overridden, however, this function probably should be, too.

Callable From:

  • N/A (automatically called by DI-Guy Graphics API during the Draw Stage)

Reimplemented from diguyGraphicsShaderInstance.

Member Data Documentation

diguyDx11GraphicsShaderProgram* diguyDx11GraphicsShaderInstance::m_shader_program

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