
|
|
This file was automatically generated from diguyGraphicsShaderTechnique.h. Do not edit this file directly; the changes will be lost.Includes: diguy_constants.h | declspec_diguy.h
Contents:
Link against: libdiguy_graphics_api
This struct is passed into diguyGraphicsShaderTechnique::pick_shader_program() to provide the end user information to base the resulting shader choice.
This class implements shader lod system for use with DI-Guy character graphics.
Shader Techniques are shared among all characters that use the shader Technique. Any variables used in a shader Technique should therefore apply to all characters using the shader.
Also see diguyGraphicsShaderInstance.
class diguyGraphicsShaderTechnique
|
class BDI_DECLSPEC_diguy diguyGraphicsShaderTechnique { public: const char* get_name(); int get_num_shader_lod_programs(); diguyGraphicsShaderProgram* get_shader_lod_program_at_index(int index); float get_shader_lod_range_at_index(int index); diguyGraphicsShaderProgram * get_shader_by_distance(float distance, int max_quality_level); int get_program_index_by_distance(float distance, int max_quality_level); diguyGraphicsShaderProgram* get_intersection_shader(); diguyGraphicsShaderProgram* get_shadow_pass_shader(); diguyGraphicsShaderProgram * find_or_create_shader_variation(diguyGraphicsShaderProgram * program, const char * new_name); void add_additional_shader(diguyGraphicsShaderProgram* program); int get_num_additional_shaders(); diguyGraphicsShaderProgram* get_additional_shader_at_index(int index); int set_variable_float(const char* name, float value, int set_current = 1, int set_initial = 0); int set_variable_vec2(const char* name, float x, float y, int set_current = 1, int set_initial = 0); int set_variable_vec3(const char* name, float x, float y, float z, int set_current = 1, int set_initial = 0); int set_variable_vec4(const char* name, float x, float y, float z, float w, int set_current = 1, int set_initial = 0); int set_variable_int(const char* name, int value, int set_current = 1, int set_initial = 0); virtual diguyGraphicsShaderProgram * pick_shader_program(const diguyShaderPickDescription & desc); virtual void build();
| Accessor Functions |
The functions in this section provide access to data in this object. They are designed to be called by DI-Guy programmers.
All functions are Callable From:
- C++
- Script
function diguyGraphicsShaderTechnique::get_name |
Prototype:
Returns:const char* get_name();
the name of the shader technique. This pointer will never be NULL.
function diguyGraphicsShaderTechnique::get_num_shader_lod_programs |
Prototype:
Description:int get_num_shader_lod_programs();
Returns the number of lod shaders the technique has.
function diguyGraphicsShaderTechnique::get_shader_lod_program_at_index |
Prototype:
Description:diguyGraphicsShaderProgram* get_shader_lod_program_at_index(int index);
Returns the shader program at a lod index.
function diguyGraphicsShaderTechnique::get_shader_lod_range_at_index |
Prototype:
Description:float get_shader_lod_range_at_index(int index);
Returns the distance that a shader lod switches out at.
function diguyGraphicsShaderTechnique::get_shader_by_distance |
Prototype:
Description:diguyGraphicsShaderProgram * get_shader_by_distance(float distance, int max_quality_level);
Returns a shader based on the rendering distance.
function diguyGraphicsShaderTechnique::get_program_index_by_distance |
Prototype:
Description:int get_program_index_by_distance(float distance, int max_quality_level);
Returns the shader index based on the rendering distance.
function diguyGraphicsShaderTechnique::get_intersection_shader |
Prototype:
Description:diguyGraphicsShaderProgram* get_intersection_shader();
Returns the shader specified for intersections.
function diguyGraphicsShaderTechnique::get_shadow_pass_shader |
Prototype:
Description:diguyGraphicsShaderProgram* get_shadow_pass_shader();
Returns the shader specified for shadow map generation.
| Shader Creation Functions |
function diguyGraphicsShaderTechnique::find_or_create_shader_variation |
Prototype:
Description:diguyGraphicsShaderProgram * find_or_create_shader_variation(diguyGraphicsShaderProgram * program, const char * new_name);
This function allows you create a new shader that uses the same vertex and pixel files as the one passed in. The user is then able modify the subclassed shader before calling load(). This function should allow end users to create an arbitrary number of shader permutations and then return them via overriding pick_shader_program(). See diguyOglGraphicsShaderTechnique::build() for an example of it's usage. Override pick_shader_program() to return a procedurally created shader.
function diguyGraphicsShaderTechnique::add_additional_shader |
Prototype:
Description:void add_additional_shader(diguyGraphicsShaderProgram* program);
Adds an additional shader program to the technique these will get automatically updated if any of the shader uniform functions are used. These are mostly for convenience. Users will probably want their own data structures to store shader lookup tables.
function diguyGraphicsShaderTechnique::get_num_additional_shaders |
Prototype:
Returns:int get_num_additional_shaders();
The number of shaders that have been procedurally added to the technique.
function diguyGraphicsShaderTechnique::get_additional_shader_at_index |
Prototype:
Returns:diguyGraphicsShaderProgram* get_additional_shader_at_index(int index);
A pointer to the procedural shaders that has been procedurally added to the technique.
| Shader Uniform Functions |
function diguyGraphicsShaderTechnique::set_variable_float |
Prototype:
Description:int set_variable_float(const char* name, float value, int set_current = 1, int set_initial = 0);
Convenience functions. Loops through all shaders in this technique and sets uniform variables if they exist.Callable From:
- C++
- Script
function diguyGraphicsShaderTechnique::set_variable_vec2 |
Prototype:
int set_variable_vec2(const char* name, float x, float y, int set_current = 1, int set_initial = 0);
function diguyGraphicsShaderTechnique::set_variable_vec3 |
Prototype:
int set_variable_vec3(const char* name, float x, float y, float z, int set_current = 1, int set_initial = 0);
function diguyGraphicsShaderTechnique::set_variable_vec4 |
Prototype:
int set_variable_vec4(const char* name, float x, float y, float z, float w, int set_current = 1, int set_initial = 0);
function diguyGraphicsShaderTechnique::set_variable_int |
Prototype:
int set_variable_int(const char* name, int value, int set_current = 1, int set_initial = 0);
| Virtual Functions |
The functions in this section are all virtual functions that will be called by DI-Guy at various times during DI-Guy execution.
Because the functions are all virtual, DI-Guy programmers can create a subclass of this class and override them. Unless otherwise stated, the base class functions do not need to be called.
function diguyGraphicsShaderTechnique::pick_shader_program |
Prototype:
Description:virtual diguyGraphicsShaderProgram * pick_shader_program(const diguyShaderPickDescription & desc);
Allows users to use a subclass to override the default shader LOD system see diguyOglGraphicsShaderTechnique::pick_shader_program() for an example of it's usage.
function diguyGraphicsShaderTechnique::build |
Prototype:
Description:virtual void build();
Allows users to do their own post shader load behavior.
| Private Functionality |
ALL RIGHTS RESERVED.
These coded instructions, statements, and computer programs contain unpublished proprietary information of Boston Dynamics and are protected by Copyright Laws of the United States. They may not be used, duplicated, or disclosed in any form, in whole or in part, without the prior written consent from Boston Dynamics.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Sofware clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished-rights reserved under the Copyright Laws of the United States.
Contractor/Manufacturer is:
Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.