diff options
Diffstat (limited to 'src/renderer')
-rw-r--r-- | src/renderer/archive/render_types.h | 30 | ||||
-rw-r--r-- | src/renderer/render_types.h | 33 |
2 files changed, 42 insertions, 21 deletions
diff --git a/src/renderer/archive/render_types.h b/src/renderer/archive/render_types.h index 13a6651..f5ea986 100644 --- a/src/renderer/archive/render_types.h +++ b/src/renderer/archive/render_types.h @@ -94,20 +94,20 @@ KITC_DECL_TYPED_ARRAY(animation_clip) // creates "material_darray" #endif // // lights -// typedef struct point_light { -// vec3 position; -// f32 constant, linear, quadratic; -// vec3 ambient; -// vec3 diffuse; -// vec3 specular; -// } point_light; - -// typedef struct directional_light { -// vec3 direction; -// vec3 ambient; -// vec3 diffuse; -// vec3 specular; -// } directional_light; +typedef struct point_light { + vec3 position; + f32 constant, linear, quadratic; + vec3 ambient; + vec3 diffuse; + vec3 specular; +} point_light; + +typedef struct directional_light { + vec3 direction; + vec3 ambient; + vec3 diffuse; + vec3 specular; +} directional_light; // void point_light_upload_uniforms(shader shader, point_light *light, char index); // void dir_light_upload_uniforms(shader shader, directional_light *light); @@ -207,4 +207,4 @@ typedef struct model { // // typedef enum pipeline_kind { // // GRAPHICS, // // COMPUTE, -// // } pipeline_kind;
\ No newline at end of file +// // } pipeline_kind; diff --git a/src/renderer/render_types.h b/src/renderer/render_types.h index 08b9e94..3763967 100644 --- a/src/renderer/render_types.h +++ b/src/renderer/render_types.h @@ -116,10 +116,31 @@ KITC_DECL_TYPED_ARRAY(animation_clip) /** @brief Describes all the data required for the renderer to start executing draws */ typedef struct render_entity { - buffer_handle index_buffer; - u32 index_count; - u32 index_offset; - buffer_handle vertex_buffer; - material* material; + /* buffer_handle index_buffer; */ + /* u32 index_count; */ + /* u32 index_offset; */ + /* buffer_handle vertex_buffer; */ + model_handle model; transform tf; -} render_entity;
\ No newline at end of file +} render_entity; + +#ifndef TYPED_RENDER_ENTITY_ARRAY +KITC_DECL_TYPED_ARRAY(render_entity) +#define TYPED_RENDER_ENTITY_ARRAY +#endif + +// --- Lights +typedef struct point_light { + vec3 position; + f32 constant, linear, quadratic; + vec3 ambient; + vec3 diffuse; + vec3 specular; +} point_light; + +typedef struct directional_light { + vec3 direction; + vec3 ambient; + vec3 diffuse; + vec3 specular; +} directional_light; |