fix circle rendering over new impl
This commit is contained in:
@ -867,7 +867,7 @@ static void load_cubemap_side(const char *path, GLenum target) {
|
||||
|
||||
void render_circle(const CirclePrimitive *circle) {
|
||||
static Vec2 vertices[CIRCLE_VERTICES_MAX];
|
||||
int num_vertices = CIRCLE_VERTICES_MAX - 1;
|
||||
int num_vertices = MIN((int)circle->radius, CIRCLE_VERTICES_MAX);
|
||||
|
||||
create_circle_geometry(circle->position,
|
||||
circle->radius,
|
||||
@ -891,8 +891,8 @@ void render_circle(const CirclePrimitive *circle) {
|
||||
command.color = circle->color;
|
||||
|
||||
command.element_buffer = get_circle_element_buffer();
|
||||
command.element_count = num_vertices * 3;
|
||||
command.range_end = num_vertices * 3;
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user