glsl/apps: Explicitly add ARB_draw_buffers and ARB_texture_rectangle.
authorMichal Krol <michal@vmware.com>
Thu, 10 Dec 2009 11:39:37 +0000 (12:39 +0100)
committerMichal Krol <michal@vmware.com>
Thu, 10 Dec 2009 11:39:37 +0000 (12:39 +0100)
src/glsl/apps/compile.c
src/glsl/apps/process.c

index 03e6e58d604c12af0f5f94881af6f971aee401b2..63c2099e87405e434a089a7b7b7b52bfc706c2f1 100644 (file)
@@ -151,6 +151,17 @@ main(int argc,
       return 0;
    }
 
+   if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") ||
+       sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) {
+      fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
+
+      printf("Error: %s\n", sl_pp_context_error_message(context));
+      sl_pp_context_destroy(context);
+      free(tokens);
+      fclose(out);
+      return 0;
+   }
+
    if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) {
       fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
 
index 2cec9a997190dd7ddc67dee9fa7969f58e85117c..6c5c7bc420f4ac87f254c512ae8c605f04ff4ca9 100644 (file)
@@ -121,6 +121,17 @@ main(int argc,
       return -1;
    }
 
+   if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") ||
+       sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) {
+      fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
+
+      printf("Error: %s\n", sl_pp_context_error_message(context));
+      sl_pp_context_destroy(context);
+      free(tokens);
+      fclose(out);
+      return 0;
+   }
+
    if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) {
       fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));