blob: e76d1028873eb65d8c307742875d7de9b3913e1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "immediate.h"
#include "maths.h"
#include "primitives.h"
#include "ral_types.h"
#include "render.h"
void imm_draw_sphere(vec3 pos, f32 radius, vec4 colour) {
// Create the vertices
geometry_data geometry = geo_create_uvsphere(radius, 16, 16);
geo_set_vertex_colours(&geometry, colour);
// Upload to GPU
mat4 model = mat4_translation(pos);
// Set pipeline
// Draw
}
|