diff options
author | Kenneth Russel <[email protected]> | 2008-11-25 00:54:14 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-11-25 00:54:14 +0000 |
commit | cc770d96bada835c19a0b38ad9cb49fb8b91d23a (patch) | |
tree | b85d2c265c14ecb5f5684495b574c2aa76c5c48d | |
parent | ae68900b0b84e7dbd97fa734000a8816bec38980 (diff) |
Replaced implementation of GLU Registry.gluCheckExtension with
something CVM-compatible
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1803 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | src/classes/com/sun/opengl/impl/glu/registry/Registry.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/classes/com/sun/opengl/impl/glu/registry/Registry.java b/src/classes/com/sun/opengl/impl/glu/registry/Registry.java index cbba638a4..488a3c0f2 100644 --- a/src/classes/com/sun/opengl/impl/glu/registry/Registry.java +++ b/src/classes/com/sun/opengl/impl/glu/registry/Registry.java @@ -44,7 +44,6 @@ package com.sun.opengl.impl.glu.registry; -// breaks CVM: import java.util.regex.*; import javax.media.opengl.glu.GLU; /** @@ -70,12 +69,11 @@ public class Registry { if( extName == null || extString == null ) { return( false ); } - // breaks CVM: return( Pattern.compile( extName + "\\b" ).matcher( extString ).find() ); - // Use gl.isFunctionAvailable() .. or find an alternative. - // I don't recommend the extension name queries anyways, since they are kind of buggy. - // But available function sets allows a better 'clue' of what is supported and what not - IMHO. - // However .. I have commented the regex stuff out, since it breaks CVM compilation, - // due to it's reference in glu-base (latest change ..) - return false; + if ((extString.indexOf(extName + " ") >= 0) || + extString.endsWith(extName) || + extString.equals(extName)) { + return true; + } + return false; } } |