mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-29 02:03:03 +08:00
libobs/graphics: Remove some unnecessary checks
These checks are redundant because the base function they all lead to does the same check.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user