big rendering overhaul (cleaning and api abstraction)
This commit is contained in:
@ -99,7 +99,7 @@ void render_circle(const CirclePrimitive *circle) {
|
||||
|
||||
command.vertices = (AttributeArrayPointer) {
|
||||
.arity = 2,
|
||||
.type = GL_FLOAT,
|
||||
.type = TWN_FLOAT,
|
||||
.stride = sizeof (Vec2),
|
||||
.offset = 0,
|
||||
.buffer = buffer
|
||||
@ -112,7 +112,11 @@ void render_circle(const CirclePrimitive *circle) {
|
||||
command.element_count = (num_vertices - 2) * 3;
|
||||
command.range_end = (num_vertices - 2) * 3;
|
||||
|
||||
use_texture_mode(circle->color.a == 255 ? TEXTURE_MODE_OPAQUE : TEXTURE_MODE_GHOSTLY);
|
||||
command.texture_mode = circle->color.a == 255 ? TEXTURE_MODE_OPAQUE : TEXTURE_MODE_GHOSTLY;
|
||||
command.pipeline = PIPELINE_2D;
|
||||
|
||||
command.depth_range_high = depth_range_high;
|
||||
command.depth_range_low = depth_range_low;
|
||||
|
||||
DeferredCommand final_command = {
|
||||
.type = DEFERRED_COMMAND_TYPE_DRAW,
|
||||
|
Reference in New Issue
Block a user