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:
Ian Romanick
2010-06-30 16:27:22 -07:00
parent 2d12236117
commit 06143ea094
7 changed files with 25 additions and 12 deletions
+1 -4
View File
@@ -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);