From 7dc9c5601d5689dcbc003ca51cfe826942ea3e6b Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Wed, 5 Aug 2009 10:29:26 -0700
Subject: Fix: Remove PFD_ defines. Add GL Option: AllowNonGLExtensions <bool>
 to allow non GL extensions to be passed. Allow ifndef/define pattern to have
 any characters at the end

---
 src/java/com/sun/gluegen/opengl/GLConfiguration.java | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'src/java/com/sun/gluegen/opengl/GLConfiguration.java')

diff --git a/src/java/com/sun/gluegen/opengl/GLConfiguration.java b/src/java/com/sun/gluegen/opengl/GLConfiguration.java
index 4e8c0c3..9352bcb 100755
--- a/src/java/com/sun/gluegen/opengl/GLConfiguration.java
+++ b/src/java/com/sun/gluegen/opengl/GLConfiguration.java
@@ -59,7 +59,8 @@ public class GLConfiguration extends ProcAddressConfiguration {
   // This directive is off by default but can help automatically
   // indicate which extensions have been folded into the core OpenGL
   // namespace, and if not, then why not
-  private boolean autoUnifyExtensions;
+  private boolean autoUnifyExtensions=false;
+  private boolean allowNonGLExtensions=false;
 
   public GLConfiguration(GLEmitter emitter) {
     super();
@@ -82,6 +83,10 @@ public class GLConfiguration extends ProcAddressConfiguration {
         String sym = readString("RenameExtensionIntoCore", tok, filename, lineNo);
         extensionsRenamedIntoCore.add(sym);
       }
+    else if (cmd.equalsIgnoreCase("AllowNonGLExtensions"))
+      {
+        allowNonGLExtensions = readBoolean("AllowNonGLExtensions", tok, filename, lineNo).booleanValue();
+      }
     else if (cmd.equalsIgnoreCase("AutoUnifyExtensions"))
       {
         autoUnifyExtensions = readBoolean("AutoUnifyExtensions", tok, filename, lineNo).booleanValue();
@@ -249,6 +254,13 @@ public class GLConfiguration extends ProcAddressConfiguration {
     return autoUnifyExtensions;
   }
 
+  /** If true, accept all non encapsulated defines and functions,
+    * as it is mandatory for GL declarations. */
+  public boolean getAllowNonGLExtensions() {
+    return allowNonGLExtensions;
+  }
+
+
   /** shall the non unified (uniq) vendor extensions be dropped ?  */
   public boolean getDropUniqVendorExtensions(String extName) {
       return dropUniqVendorExtensions.contains(extName);
-- 
cgit v1.2.3