twn_rendering -> twn_draw
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
#include "twn_util.h"
|
||||
#include "twn_engine_context_c.h"
|
||||
#include "twn_rendering_c.h"
|
||||
#include "twn_rendering.h"
|
||||
#include "twn_draw_c.h"
|
||||
#include "twn_draw.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stb_ds.h>
|
||||
|
||||
|
||||
void push_circle(Vec2 position, float radius, Color color) {
|
||||
void draw_circle(Vec2 position, float radius, Color color) {
|
||||
CirclePrimitive circle = {
|
||||
.radius = radius,
|
||||
.color = color,
|
||||
@ -25,11 +25,11 @@ void push_circle(Vec2 position, float radius, Color color) {
|
||||
/* TODO: caching and reuse scheme */
|
||||
/* vertices_out and indices_out MUST BE FREED */
|
||||
void create_circle_geometry(Vec2 position,
|
||||
Color color,
|
||||
float radius,
|
||||
size_t num_vertices,
|
||||
SDL_Vertex **vertices_out,
|
||||
int **indices_out)
|
||||
Color color,
|
||||
float radius,
|
||||
size_t num_vertices,
|
||||
SDL_Vertex **vertices_out,
|
||||
int **indices_out)
|
||||
{
|
||||
SDL_Vertex *vertices = cmalloc(sizeof *vertices * (num_vertices + 1));
|
||||
int *indices = cmalloc(sizeof *indices * (num_vertices * 3));
|
||||
|
Reference in New Issue
Block a user