1 /*
2  * License Applicability. Except to the extent portions of this file are
3  * made subject to an alternative license as permitted in the SGI Free
4  * Software License B, Version 2.0 (the "License"), the contents of this
5  * file are subject only to the provisions of the License. You may not use
6  * this file except in compliance with the License. You may obtain a copy
7  * of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
8  * Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
9  *
10  * http://oss.sgi.com/projects/FreeB
11  *
12  * Note that, as provided in the License, the Software is distributed on an
13  * "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
14  * DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
15  * CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
16  * PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
17  *
18  * NOTE:  The Original Code (as defined below) has been licensed to Sun
19  * Microsystems, Inc. ("Sun") under the SGI Free Software License B
20  * (Version 1.1), shown above ("SGI License").   Pursuant to Section
21  * 3.2(3) of the SGI License, Sun is distributing the Covered Code to
22  * you under an alternative license ("Alternative License").  This
23  * Alternative License includes all of the provisions of the SGI License
24  * except that Section 2.2 and 11 are omitted.  Any differences between
25  * the Alternative License and the SGI License are offered solely by Sun
26  * and not by SGI.
27  *
28  * Original Code. The Original Code is: OpenGL Sample Implementation,
29  * Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
30  * Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
31  * Copyright in any portions created by third parties is as indicated
32  * elsewhere herein. All Rights Reserved.
33  *
34  * Additional Notice Provisions: The application programming interfaces
35  * established by SGI in conjunction with the Original Code are The
36  * OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
37  * April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
38  * 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
39  * Window System(R) (Version 1.3), released October 19, 1998. This software
40  * was created using the OpenGL(R) version 1.2.1 Sample Implementation
41  * published by SGI, but has not been independently verified as being
42  * compliant with the OpenGL(R) version 1.2.1 Specification.
43  */
44 
45 package jogamp.opengl.glu.registry;
46 
47 import com.jogamp.opengl.glu.GLU;
48 
49 /**
50  *
51  * @author  Administrator
52  */
53 public class Registry {
54 
55   /** Creates a new instance of Registry */
Registry()56   public Registry() {
57   }
58 
gluGetString(final int name)59   public static String gluGetString(final int name) {
60     if( name == GLU.GLU_VERSION ) {
61       return( "1.3" );
62     } else if( name == GLU.GLU_EXTENSIONS ) {
63       return( "GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess " );
64     }
65     return( null );
66   }
67 
gluCheckExtension( final String extName, final String extString )68   public static boolean gluCheckExtension( final String extName, final String extString ) {
69     if( extName == null || extString == null ) {
70       return( false );
71     }
72     if ((extString.indexOf(extName + " ") >= 0) ||
73         extString.endsWith(extName) ||
74         extString.equals(extName)) {
75         return true;
76     }
77     return false;
78   }
79 }
80