push as is, half baked broken twn_models.c
This commit is contained in:
@ -228,6 +228,8 @@ typedef struct ElementIndexedBillboard {
|
||||
} ElementIndexedBillboard;
|
||||
|
||||
|
||||
/* state */
|
||||
|
||||
bool render_init(void);
|
||||
|
||||
/* renders the background, then the primitives in all render queues */
|
||||
@ -236,26 +238,20 @@ void render(void);
|
||||
/* clears all render queues */
|
||||
void render_clear(void);
|
||||
|
||||
/* fills two existing arrays with the geometry data of a circle */
|
||||
/* the size of indices must be at least 3 times the number of vertices */
|
||||
void create_circle_geometry(Vec2 position,
|
||||
float radius,
|
||||
size_t num_vertices,
|
||||
Vec2 vertices[]);
|
||||
void setup_viewport(int x, int y, int width, int height);
|
||||
|
||||
struct QuadBatch {
|
||||
size_t size; /* how many primitives are in current batch */
|
||||
TextureKey texture_key;
|
||||
TextureMode mode; /* how color should be applied */
|
||||
bool constant_colored; /* whether colored batch is uniformly colored */
|
||||
bool repeat; /* whether repeat is needed */
|
||||
bool textured;
|
||||
} collect_quad_batch(const Primitive2D primitives[], size_t len);
|
||||
void render_quad_batch(const Primitive2D primitives[], struct QuadBatch batch);
|
||||
struct QuadBatch collect_sprite_batch(const Primitive2D primitives[], size_t len);
|
||||
struct QuadBatch collect_rect_batch(const Primitive2D primitives[], size_t len);
|
||||
void render_sprite_batch(const Primitive2D primitives[], struct QuadBatch batch);
|
||||
void render_rect_batch(const Primitive2D primitives[], struct QuadBatch batch);
|
||||
void clear_draw_buffer(void);
|
||||
void finally_clear_draw_buffer(DeferredCommandClear command);
|
||||
|
||||
void swap_buffers(void);
|
||||
|
||||
void set_depth_range(double low, double high);
|
||||
|
||||
void start_render_frame(void);
|
||||
void end_render_frame(void);
|
||||
|
||||
void finally_draw_command(DeferredCommandDraw command);
|
||||
void issue_deferred_draw_commands(void);
|
||||
|
||||
/* text */
|
||||
|
||||
@ -279,21 +275,32 @@ void delete_vertex_buffer(VertexBuffer buffer);
|
||||
|
||||
void specify_vertex_buffer(VertexBuffer buffer, void const *data, size_t bytes);
|
||||
|
||||
/* uses present in 1.5 buffer mapping feature */
|
||||
VertexBufferBuilder build_vertex_buffer(VertexBuffer buffer, size_t bytes);
|
||||
|
||||
void finish_vertex_builder(VertexBufferBuilder *builder);
|
||||
|
||||
/* state */
|
||||
/* 2d */
|
||||
|
||||
void setup_viewport(int x, int y, int width, int height);
|
||||
/* fills two existing arrays with the geometry data of a circle */
|
||||
/* the size of indices must be at least 3 times the number of vertices */
|
||||
void create_circle_geometry(Vec2 position,
|
||||
float radius,
|
||||
size_t num_vertices,
|
||||
Vec2 vertices[]);
|
||||
|
||||
void clear_draw_buffer(void);
|
||||
void finally_clear_draw_buffer(DeferredCommandClear command);
|
||||
|
||||
void swap_buffers(void);
|
||||
|
||||
void set_depth_range(double low, double high);
|
||||
struct QuadBatch {
|
||||
size_t size; /* how many primitives are in current batch */
|
||||
TextureKey texture_key;
|
||||
TextureMode mode; /* how color should be applied */
|
||||
bool constant_colored; /* whether colored batch is uniformly colored */
|
||||
bool repeat; /* whether repeat is needed */
|
||||
bool textured;
|
||||
} collect_quad_batch(const Primitive2D primitives[], size_t len);
|
||||
void render_quad_batch(const Primitive2D primitives[], struct QuadBatch batch);
|
||||
struct QuadBatch collect_sprite_batch(const Primitive2D primitives[], size_t len);
|
||||
struct QuadBatch collect_rect_batch(const Primitive2D primitives[], size_t len);
|
||||
void render_sprite_batch(const Primitive2D primitives[], struct QuadBatch batch);
|
||||
void render_rect_batch(const Primitive2D primitives[], struct QuadBatch batch);
|
||||
|
||||
VertexBuffer get_quad_element_buffer(void);
|
||||
|
||||
@ -318,30 +325,29 @@ void push_quad_payload_to_vertex_buffer_builder(struct QuadBatch batch,
|
||||
Vec2 uv0, Vec2 uv1, Vec2 uv2, Vec2 uv3,
|
||||
Color color);
|
||||
|
||||
void finally_draw_text(FontData const *font_data,
|
||||
size_t len,
|
||||
Color color,
|
||||
VertexBuffer buffer);
|
||||
|
||||
/* 3d */
|
||||
|
||||
void finally_draw_uncolored_space_traingle_batch(MeshBatch const *batch,
|
||||
TextureKey texture_key);
|
||||
|
||||
void finally_draw_billboard_batch(MeshBatch const *batch,
|
||||
TextureKey texture_key);
|
||||
|
||||
void finally_draw_text(FontData const *font_data,
|
||||
size_t len,
|
||||
Color color,
|
||||
VertexBuffer buffer);
|
||||
|
||||
void render_skybox(void);
|
||||
void finally_render_skybox(DeferredCommandDrawSkybox);
|
||||
|
||||
void start_render_frame(void);
|
||||
void end_render_frame(void);
|
||||
|
||||
void finally_draw_command(DeferredCommandDraw command);
|
||||
|
||||
void issue_deferred_draw_commands(void);
|
||||
|
||||
bool model_load_workers_thread(void);
|
||||
bool models_load_workers_finished(void);
|
||||
bool models_load_workers_thread(void);
|
||||
void finally_draw_models(void);
|
||||
void free_model_cache(void);
|
||||
void model_state_deinit(void);
|
||||
void models_state_init(void);
|
||||
void models_state_deinit(void);
|
||||
void models_update_pre_textures(void);
|
||||
void models_update_post_textures(void);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user