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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user