49 virtual int link()
override;
51 virtual int bind()
override;
52 virtual int unbind()
override;
149 const float* color_data);
152 virtual int bind_matrix(
int bind_location,
const float* mat_data);
179 const char* shader_filename,
181 bool& shader_loaded);
diguyOglGraphicsShaderProgram(void *internal_data)
virtual int get_uniform_bind_location(const char *name)
This function will be called by DI-Guy when core code is attempting to identify the capabilities of t...
bool m_linked
Definition: diguyOglGraphicsShaderProgram.h:195
int m_bind_location_attr_weight_array
Skeletal animation bone weight.
Definition: diguyOglGraphicsShaderProgram.h:72
int m_bind_location_ufrm_component_row
uniform to control which row of the shared variation texture to use for this draw call ...
Definition: diguyOglGraphicsShaderProgram.h:120
int m_bind_location_ufrm_link_matrices_start
Definition: diguyOglGraphicsShaderProgram.h:102
int m_bind_location_ufrm_specular_map_enabled
Definition: diguyOglGraphicsShaderProgram.h:112
bool m_vertex_shader_valid
Definition: diguyOglGraphicsShaderProgram.h:187
GLhandleARB m_gl_vertex_shader_object
Definition: diguyOglGraphicsShaderProgram.h:188
char * load_shader_source(const char *shader_filename)
~diguyOglGraphicsShaderProgram()
int m_ubo_transform_block_index
Definition: diguyOglGraphicsShaderProgram.h:129
int m_bind_location_ufrm_component_map_enabled
Definition: diguyOglGraphicsShaderProgram.h:113
int m_bind_location_ufrm_bump_map_enabled
Definition: diguyOglGraphicsShaderProgram.h:111
virtual int bind_link_matrices(int num_mats, const float *mat_data)
This function will be called by DI-Guy when the matrix data of a character's links needs to be sent t...
virtual int load_vertex_shader_source(const char *filename_base) override
This function will be called by DI-Guy when it is time for the vertex part of this shader to be loade...
virtual int bind_uniform_with_location(int location, const char *name, int value_size, float *values)
These functions will be called by DI-Guy when there is a shader uniform that needs to be updated and ...
int m_bind_location_attr_index_array
Skeletal animation bone index.
Definition: diguyOglGraphicsShaderProgram.h:75
int m_bind_location_ufrm_base_matrices_start
Definition: diguyOglGraphicsShaderProgram.h:100
bool m_vertex_shader_loaded
Definition: diguyOglGraphicsShaderProgram.h:186
int m_bind_location_ufrm_blend_weight
uniform for controlling the amount of a blend shape
Definition: diguyOglGraphicsShaderProgram.h:78
int m_bind_location_ufrm_link_colors
Uniform for sending bone link colors, needed for per pixel intersection tests.
Definition: diguyOglGraphicsShaderProgram.h:96
This class is part of the DI-Guy Graphics API.
Definition: diguyOglGraphicsShaderProgram.h:39
int m_include_point_lights
should shader include point light support.
Definition: diguyOglGraphicsShaderProgram.h:134
int m_ubo_material_block_index
Definition: diguyOglGraphicsShaderProgram.h:130
const float * m_last_matrix_data
Definition: diguyOglGraphicsShaderProgram.h:197
int m_ubo_per_frame_block_index
Definition: diguyOglGraphicsShaderProgram.h:131
virtual int link() override
This function will be called by DI-Guy when it is time for the shader program to be linked...
virtual int bind() override
This function will be called by DI-Guy when this program is being bound for rendering.
virtual void set_textures_enabled(int enabled)
int m_bind_location_ufrm_extra_per_instance_data
Definition: diguyOglGraphicsShaderProgram.h:105
int m_bind_location_ufrm_link_matrices
matrix array used to transform a skinned mesh
Definition: diguyOglGraphicsShaderProgram.h:93
diguyOglUniformBufferUpdater * m_uniform_buffer_updater
shared uniform buffer object
Definition: diguyOglGraphicsShaderProgram.h:200
int m_bind_location_ufrm_misc_1_map_enabled
these really aren't use now.
Definition: diguyOglGraphicsShaderProgram.h:116
bool m_pixel_shader_loaded
Definition: diguyOglGraphicsShaderProgram.h:191
virtual int get_gl_program_object() override
This function will be called by DI-Guy when core code is attempting to identify send shader low level...
Definition: diguyOglGraphicsShaderProgram.h:54
static int s_bound
stat for how many shaders were bound this frame
Definition: diguyOglGraphicsShaderProgram.h:171
GLhandleARB m_gl_program_object
Definition: diguyOglGraphicsShaderProgram.h:183
int m_bind_location_attr_normal
Definition: diguyOglGraphicsShaderProgram.h:65
bool m_pixel_shader_valid
Definition: diguyOglGraphicsShaderProgram.h:192
int m_bind_location_ufrm_link_matrix
matrix used to transform a rigid drawable
Definition: diguyOglGraphicsShaderProgram.h:90
virtual int load_pixel_shader_source(const char *filename_base) override
This function is the pixel shader (AKA fragment shader in OpenGL) equivalent of load_vertex_shader_so...
float m_last_light_update_time
Definition: diguyOglGraphicsShaderProgram.h:196
virtual int bind_matrix(int bind_location, const float *mat_data)
void update_light_uniforms()
int m_bind_location_ufrm_link_matrices_tbo
Instancing uniforms:
Definition: diguyOglGraphicsShaderProgram.h:99
int m_bind_location_ufrm_pbr_enabled
General state variables.
Definition: diguyOglGraphicsShaderProgram.h:108
diguyOglUniformBufferUpdater * get_ogl_uniform_buffer_updater()
Definition: diguyOglGraphicsShaderProgram.h:168
int m_bind_location_ufrm_blend_indecies
Definition: diguyOglGraphicsShaderProgram.h:79
char m_vertex_shader_filename[512]
Definition: diguyOglGraphicsShaderProgram.h:185
int m_bind_location_ufrm_apply_matrices_flag
should bone matrices be used for this drawable, if 0 assumed to be a rigid drawable ...
Definition: diguyOglGraphicsShaderProgram.h:87
virtual int get_attrib_bind_location(const char *name)
This function will be called by DI-Guy when core code is attempting to identify the capabilities of t...
int m_bind_location_ufrm_link_matrices_count
Definition: diguyOglGraphicsShaderProgram.h:103
virtual int unbind() override
In general variables that were set in bind() should be unset or unbound here.
A class that represents the unique per-character non-shared joint of a character. A diguyCharacter is...
Definition: diguyGraphicsLink.h:45
int m_bind_location_attr_vertex
base default attrib locations
Definition: diguyOglGraphicsShaderProgram.h:64
int m_bind_location_attr_tangent
Per vertex tangent for bump mapping.
Definition: diguyOglGraphicsShaderProgram.h:69
virtual int bind_color_array(int num_colors, const float *color_data)
This function will be called by DI-Guy when the color data of a character's links needs to be sent to...
int m_bind_location_ufrm_base_matrices_count
Definition: diguyOglGraphicsShaderProgram.h:101
diguyGraphicsShaderProgram * diguyOglGraphicsShaderProgram_create_func(void *internal_data)
Create function declaration.
int m_bind_location_ufrm_decal_enabled
index into texture array sampler
Definition: diguyOglGraphicsShaderProgram.h:123
int m_bind_location_attr_color
needed for IM and particle systems
Definition: diguyOglGraphicsShaderProgram.h:61
int m_bind_location_ufrm_decal_index
Definition: diguyOglGraphicsShaderProgram.h:124
int m_bind_location_ufrm_vert_count
Definition: diguyOglGraphicsShaderProgram.h:80
This class implements shader programs for use with DI-Guy character graphics.
Definition: diguyGraphicsShaderProgram.h:94
int load_and_compile_shader(GLhandleARB shader_object, const char *shader_filename, int shader_type, bool &shader_loaded)
int m_bind_location_ufrm_emission_color
uniform for controlling emission color
Definition: diguyOglGraphicsShaderProgram.h:83
GLhandleARB m_gl_pixel_shader_object
Definition: diguyOglGraphicsShaderProgram.h:193
int m_bind_location_ufrm_fade
uniform for per object alpha fade for lod fade out support.
Definition: diguyOglGraphicsShaderProgram.h:127
virtual void set_apply_matrices_flag(int apply_matrices_flag)
int m_bind_location_ufrm_misc_2_map_enabled
Definition: diguyOglGraphicsShaderProgram.h:117
int m_bind_location_ufrm_textures_enabled
Definition: diguyOglGraphicsShaderProgram.h:110
char m_pixel_shader_filename[512]
Definition: diguyOglGraphicsShaderProgram.h:190
int m_bind_location_attr_texture
Definition: diguyOglGraphicsShaderProgram.h:66