Added toggleable draw modes, GL_TRIANGLES, GL_POINTS and GL_LINES along with initial work on debug rendering
parent
8210ba663c
commit
4a091cea9a
@ -0,0 +1,10 @@ |
||||
//include version.glsl |
||||
|
||||
uniform vec3 wireframe_color; |
||||
|
||||
out vec4 frag_color; |
||||
|
||||
void main() |
||||
{ |
||||
frag_color = vec4(wireframe_color, 1.0); |
||||
} |
@ -0,0 +1,10 @@ |
||||
//include version.glsl |
||||
|
||||
uniform mat4 mvp; |
||||
|
||||
in vec3 vPosition; |
||||
|
||||
void main() |
||||
{ |
||||
gl_Position = mvp * vec4(vPosition, 1.0); |
||||
} |
@ -1,26 +1,28 @@ |
||||
#ifndef model_H |
||||
#define model_H |
||||
#ifndef MODEL_H |
||||
#define MODEL_H |
||||
|
||||
#include "linmath.h" |
||||
#include "geometry.h" |
||||
|
||||
struct Camera; |
||||
struct Material_Param; |
||||
|
||||
struct Model |
||||
{ |
||||
int node; |
||||
int geometry_index; |
||||
int material; |
||||
int node; |
||||
int geometry_index; |
||||
int material; |
||||
struct Material_Param* material_params; |
||||
}; |
||||
|
||||
struct Model* model_get(int index); |
||||
void model_init(void); |
||||
int model_create(int node, const char* geo_name, const char* material_name); |
||||
void model_remove(int index); |
||||
void model_cleanup(void); |
||||
void model_render_all(struct Camera* camera); |
||||
int model_set_material_param(struct Model* model, const char* name, void* value); |
||||
int model_get_material_param(struct Model* model, const char* name, void* value_out); |
||||
struct Model* model_get_all(void); |
||||
void model_init(void); |
||||
int model_create(int node, const char* geo_name, const char* material_name); |
||||
void model_remove(int index); |
||||
void model_cleanup(void); |
||||
void model_render_all(struct Camera* camera, enum Geometry_Draw_Mode draw_mode); |
||||
int model_set_material_param(struct Model* model, const char* name, void* value); |
||||
int model_get_material_param(struct Model* model, const char* name, void* value_out); |
||||
|
||||
#endif |
||||
|
Loading…
Reference in new issue