mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
libobs: Fix warnings assigning values to vec3
Because a vec3 structure can contain a __m128 variable and not the expected three floats x, y, and z, you must use vec3_set when setting a value for a vec3 structure to ensure that it uses the proper intrinsics internally if necessary.
This commit is contained in:
parent
8922f2503f
commit
c8dfce886b
@ -2120,8 +2120,12 @@ void obs_source_draw_set_color_matrix(const struct matrix4 *color_matrix,
|
||||
const struct vec3 *color_range_min,
|
||||
const struct vec3 *color_range_max)
|
||||
{
|
||||
static const struct vec3 color_range_min_def = {0.0f, 0.0f, 0.0f};
|
||||
static const struct vec3 color_range_max_def = {1.0f, 1.0f, 1.0f};
|
||||
struct vec3 color_range_min_def;
|
||||
struct vec3 color_range_max_def;
|
||||
|
||||
vec3_set(&color_range_min_def, 0.0f, 0.0f, 0.0f);
|
||||
vec3_set(&color_range_max_def, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
gs_effect_t *effect = gs_get_effect();
|
||||
gs_eparam_t *matrix;
|
||||
gs_eparam_t *range_min;
|
||||
|
Loading…
Reference in New Issue
Block a user