Added basic shader parsing
This commit is contained in:
parent
3c3f4da051
commit
2f648d7af8
2 changed files with 17 additions and 0 deletions
16
te_scripts.c
16
te_scripts.c
|
@ -40,6 +40,22 @@ static glident_t blendmodes[] = {
|
|||
{"GL_ONE_MINUS_DST_COLOR", GL_ONE_MINUS_DST_COLOR}
|
||||
};
|
||||
|
||||
int SHADER_BlendModeForName(char *name) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i< 10 ; i++)
|
||||
{
|
||||
if (!Q_strcasecmp (blendmodes[i].name, name) )
|
||||
return blendmodes[i].value;
|
||||
}
|
||||
if (i == 10)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int SC_BlendModeForName(char *name) {
|
||||
int i;
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ char *SC_ParseIdent();
|
|||
int SC_ParseToken();
|
||||
|
||||
int SC_BlendModeForName(char *name);
|
||||
int SHADER_BlendModeForName(char *name);
|
||||
|
||||
extern int line_num;
|
||||
|
||||
|
|
Loading…
Reference in a new issue