12 #ifndef diguyDx9GraphicsShaderProgram_h__
13 #define diguyDx9GraphicsShaderProgram_h__
18 #include <dx9_headers.h>
42 const float* mat_data);
44 const float* color_data);
50 const char* shader_filename,
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...
Definition: diguyDx9GraphicsShaderProgram.cpp:442
char * load_shader_source(const char *shader_filename)
Definition: diguyDx9GraphicsShaderProgram.cpp:404
void free_shader_source(char *source_source)
Definition: diguyDx9GraphicsShaderProgram.cpp:421
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...
Definition: diguyDx9GraphicsShaderProgram.cpp:189
LPD3DXBUFFER m_pixel_code
Definition: diguyDx9GraphicsShaderProgram.h:59
char m_vertex_shader_filename[512]
Definition: diguyDx9GraphicsShaderProgram.h:56
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...
Definition: diguyDx9GraphicsShaderProgram.cpp:474
LPDIRECT3DVERTEXSHADER9 m_vertex_shader
Definition: diguyDx9GraphicsShaderProgram.h:55
virtual int link()
This function will be called by DI-Guy when it is time for the shader program to be linked...
Definition: diguyDx9GraphicsShaderProgram.cpp:250
char m_pixel_shader_filename[512]
Definition: diguyDx9GraphicsShaderProgram.h:61
~diguyDx9GraphicsShaderProgram()
Definition: diguyDx9GraphicsShaderProgram.cpp:94
diguyGraphicsShaderProgram * diguyDx9GraphicsShaderProgram_create_func(void *internal_data)
Create function declaration.
Definition: diguyDx9GraphicsShaderProgram.cpp:523
int load_and_compile_shader(const char *shader_filename, bool &shader_loaded)
Definition: diguyDx9GraphicsShaderProgram.cpp:367
Definition: diguyDx9GraphicsShaderProgram.h:23
LPD3DXBUFFER m_vertex_code
Definition: diguyDx9GraphicsShaderProgram.h:54
bool m_vertex_shader_loaded
Definition: diguyDx9GraphicsShaderProgram.h:57
LPDIRECT3DPIXELSHADER9 m_pixel_shader
Definition: diguyDx9GraphicsShaderProgram.h:60
virtual int unbind()
In general variables that were set in bind() should be unset or unbound here.
Definition: diguyDx9GraphicsShaderProgram.cpp:315
bool m_pixel_shader_loaded
Definition: diguyDx9GraphicsShaderProgram.h:62
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...
Definition: diguyDx9GraphicsShaderProgram.cpp:127
A class that represents the unique per-character non-shared joint of a character. A diguyCharacter is...
Definition: diguyGraphicsLink.h:47
virtual int bind()
This function will be called by DI-Guy when this program is being bound for rendering.
Definition: diguyDx9GraphicsShaderProgram.cpp:284
diguyDx9GraphicsShaderProgram(void *internal_data)
4 Header files and forward declarations
Definition: diguyDx9GraphicsShaderProgram.cpp:53
This class implements shader programs for use with DI-Guy character graphics.
Definition: diguyGraphicsShaderProgram.h:94
bool m_linked
Definition: diguyDx9GraphicsShaderProgram.h:64
virtual int reload()
Forces the underlying shader to reload. Returns 0 on success.
Definition: diguyDx9GraphicsShaderProgram.cpp:346
virtual void set_apply_matrices_flag(int apply_matrices_flag)
Definition: diguyDx9GraphicsShaderProgram.cpp:505