Browse Source

add some notes and skeleton for scene abstraction

main
cinnaboot 5 years ago
parent
commit
5948f7b2e0
  1. 3
      src/shader.h
  2. 26
      src/tangerine.h

3
src/shader.h

@ -54,6 +54,7 @@ struct GLVertexAttrib
char* name;
};
// TODO: add a note explaining usage when we implement complex entities
struct GLBufferToAttribMapping
{
GLVertexAttrib* attrib;
@ -86,6 +87,8 @@ struct GLBuffer
GLuint id;
GLenum target;
GLenum data_type;
// FIXME: we should initialize both of these to UINT_MAX because '0' is a
// valid location and index
GLuint location; // NOTE: if used as backing for vertex attribute
GLuint binding_idx; // NOTE: if used as backing from uniform buffer object
char* name;

26
src/tangerine.h

@ -72,6 +72,32 @@ struct RenderGroup
char* name;
};
#if 0
struct Scene
{
MemoryArena* rg_arena;
u32 num_render_groups;
u32 max_render_groups;
RenderGroup* render_groups;
u32 num_point_lights;
u32 max_point_lights;
PointLight* p_lights;
u32 num_d_lights;
u32 max_d_lights;
DirectionalLight* d_lights;
u32 num_spot_lights;
u32 max_spot_lights;
SpotLight* s_lights;
Node root_node;
Camera cam;
};
#endif
struct GLClearColor
{
GLfloat R;

Loading…
Cancel
Save