libobs/graphics: Add int vector support to shaders

This commit is contained in:
John Bradley
2015-05-22 12:53:36 -05:00
committed by jp9000
parent 310f390e1e
commit 431a02459d
3 changed files with 15 additions and 0 deletions

View File

@@ -284,6 +284,9 @@ enum gs_shader_param_type {
GS_SHADER_PARAM_VEC2,
GS_SHADER_PARAM_VEC3,
GS_SHADER_PARAM_VEC4,
GS_SHADER_PARAM_INT2,
GS_SHADER_PARAM_INT3,
GS_SHADER_PARAM_INT4,
GS_SHADER_PARAM_MATRIX4X4,
GS_SHADER_PARAM_TEXTURE,
};

View File

@@ -28,6 +28,12 @@ enum gs_shader_param_type get_shader_param_type(const char *type)
return GS_SHADER_PARAM_VEC3;
else if (strcmp(type, "float4") == 0)
return GS_SHADER_PARAM_VEC4;
else if (strcmp(type, "int2") == 0)
return GS_SHADER_PARAM_INT2;
else if (strcmp(type, "int3") == 0)
return GS_SHADER_PARAM_INT3;
else if (strcmp(type, "int4") == 0)
return GS_SHADER_PARAM_INT4;
else if (astrcmp_n(type, "texture", 7) == 0)
return GS_SHADER_PARAM_TEXTURE;
else if (strcmp(type, "float4x4") == 0)