glsl2: Conditionally define preprocessor tokens for optional extensions
The only optional extension currently supported by the compiler is GL_EXT_texture_array.
This commit is contained in:
parent
2d12236117
commit
06143ea094
7 changed files with 25 additions and 12 deletions
|
|
@ -68,16 +68,13 @@ load_text_file(void *ctx, const char *file_name)
|
|||
return text;
|
||||
}
|
||||
|
||||
int
|
||||
preprocess(void *talloc_ctx, const char **shader, char **info_log);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
void *ctx = talloc(NULL, void*);
|
||||
const char *shader = load_text_file(ctx, NULL);
|
||||
char *info_log = talloc_strdup(ctx, "");
|
||||
int ret = preprocess(ctx, &shader, &info_log);
|
||||
int ret = preprocess(ctx, &shader, &info_log, NULL);
|
||||
|
||||
printf("%s", shader);
|
||||
fprintf(stderr, "%s", info_log);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue