From 9fa3b045a3e119a617bd9316447dd118bb64b2b6 Mon Sep 17 00:00:00 2001 From: Lain Date: Fri, 7 Mar 2025 16:01:35 -0800 Subject: [PATCH] libobs/graphics: Remove some unnecessary checks These checks are redundant because the base function they all lead to does the same check. --- libobs/graphics/graphics.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/libobs/graphics/graphics.c b/libobs/graphics/graphics.c index f0b55b95e..6283d8257 100644 --- a/libobs/graphics/graphics.c +++ b/libobs/graphics/graphics.c @@ -651,10 +651,6 @@ gs_vertbuffer_t *gs_render_save(void) void gs_vertex2f(float x, float y) { struct vec3 v3; - - if (!gs_valid("gs_verte")) - return; - vec3_set(&v3, x, y, 0.0f); gs_vertex3v(&v3); } @@ -662,10 +658,6 @@ void gs_vertex2f(float x, float y) void gs_vertex3f(float x, float y, float z) { struct vec3 v3; - - if (!gs_valid("gs_vertex3f")) - return; - vec3_set(&v3, x, y, z); gs_vertex3v(&v3); } @@ -673,10 +665,6 @@ void gs_vertex3f(float x, float y, float z) void gs_normal3f(float x, float y, float z) { struct vec3 v3; - - if (!gs_valid("gs_normal3f")) - return; - vec3_set(&v3, x, y, z); gs_normal3v(&v3); } @@ -709,10 +697,6 @@ void gs_color(uint32_t color) void gs_texcoord(float x, float y, int unit) { struct vec2 v2; - - if (!gs_valid("gs_texcoord")) - return; - vec2_set(&v2, x, y); gs_texcoord2v(&v2, unit); } @@ -720,10 +704,6 @@ void gs_texcoord(float x, float y, int unit) void gs_vertex2v(const struct vec2 *v) { struct vec3 v3; - - if (!gs_valid("gs_vertex2v")) - return; - vec3_set(&v3, v->x, v->y, 0.0f); gs_vertex3v(&v3); }