16 #ifndef diguyDx9GraphicsShaderProgram_h__
17 #define diguyDx9GraphicsShaderProgram_h__
22 #include <dx9_headers.h>
46 const float* mat_data);
48 const float* color_data);
54 const char* shader_filename,
void free_shader_source(char *source_source)
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...
LPD3DXBUFFER m_pixel_code
Definition: diguyDx9GraphicsShaderProgram.h:63
char m_vertex_shader_filename[512]
Definition: diguyDx9GraphicsShaderProgram.h:60
virtual int load_vertex_shader_source(const char *filename_base)
This function will be called by DI-Guy when it is time for the vertex part of this shader to be loade...
LPDIRECT3DVERTEXSHADER9 m_vertex_shader
Definition: diguyDx9GraphicsShaderProgram.h:59
char m_pixel_shader_filename[512]
Definition: diguyDx9GraphicsShaderProgram.h:65
~diguyDx9GraphicsShaderProgram()
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...
diguyGraphicsShaderProgram * diguyDx9GraphicsShaderProgram_create_func(void *internal_data)
Create function declaration.
virtual int unbind()
In general variables that were set in bind() should be unset or unbound here.
int load_and_compile_shader(const char *shader_filename, bool &shader_loaded)
Definition: diguyDx9GraphicsShaderProgram.h:27
LPD3DXBUFFER m_vertex_code
Definition: diguyDx9GraphicsShaderProgram.h:58
bool m_vertex_shader_loaded
Definition: diguyDx9GraphicsShaderProgram.h:61
LPDIRECT3DPIXELSHADER9 m_pixel_shader
Definition: diguyDx9GraphicsShaderProgram.h:64
virtual int load_pixel_shader_source(const char *filename_base)
This function is the pixel shader (AKA fragment shader in OpenGL) equivalent of load_vertex_shader_so...
virtual int bind()
This function will be called by DI-Guy when this program is being bound for rendering.
char * load_shader_source(const char *shader_filename)
bool m_pixel_shader_loaded
Definition: diguyDx9GraphicsShaderProgram.h:66
A class that represents the unique per-character non-shared joint of a character. A diguyCharacter is...
Definition: diguyGraphicsLink.h:45
virtual int link()
This function will be called by DI-Guy when it is time for the shader program to be linked...
diguyDx9GraphicsShaderProgram(void *internal_data)
virtual void set_apply_matrices_flag(int apply_matrices_flag)
This class implements shader programs for use with DI-Guy character graphics.
Definition: diguyGraphicsShaderProgram.h:94
bool m_linked
Definition: diguyDx9GraphicsShaderProgram.h:68
virtual int reload()
Forces the underlying shader to reload. Returns 0 on success.