2323
2424package processing .opengl ;
2525
26- import java .awt .Canvas ;
2726import java .awt .Font ;
2827import java .awt .FontMetrics ;
2928import java .awt .Shape ;
3635import java .nio .ByteBuffer ;
3736import java .nio .FloatBuffer ;
3837import java .nio .IntBuffer ;
39- //import java.util.concurrent.CountDownLatch;
40-
41-
4238
4339import com .jogamp .opengl .GL ;
4440import com .jogamp .opengl .GL2 ;
5046import com .jogamp .opengl .GLCapabilitiesImmutable ;
5147import com .jogamp .opengl .GLContext ;
5248import com .jogamp .opengl .GLDrawable ;
53- //import javax.media.opengl.GLEventListener;
54- //import javax.media.opengl.GLFBODrawable;
55- import com .jogamp .opengl .GLProfile ;
56- //import javax.media.opengl.awt.GLCanvas;
5749import com .jogamp .opengl .fixedfunc .GLMatrixFunc ;
5850import com .jogamp .opengl .glu .GLU ;
5951import com .jogamp .opengl .glu .GLUtessellator ;
6456import processing .opengl .PGL ;
6557import processing .opengl .PGraphicsOpenGL ;
6658
67- //import com.jogamp.newt.awt.NewtCanvasAWT;
68- //import com.jogamp.newt.opengl.GLWindow;
69- //import com.jogamp.opengl.FBObject;
70-
7159
7260public class PJOGL extends PGL {
7361 // OpenGL profile to use (2, 3 or 4)
74- public static int PROFILE = 2 ;
75-
76- // Enables/disables Retina support on OSX
77- public static boolean RETINA = false ;
62+ public static int profile = 2 ;
7863
7964 // The two windowing toolkits available to use in JOGL:
8065 public static final int AWT = 0 ; // http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing
@@ -93,12 +78,6 @@ public class PJOGL extends PGL {
9378 /** The rendering context (holds rendering state info) */
9479 public GLContext context ;
9580
96- /** The canvas where OpenGL rendering takes place */
97- public Canvas canvas ;
98-
99- /** Selected GL profile */
100- public static GLProfile profile ;
101-
10281 // ........................................................
10382
10483 // Additional parameters
@@ -1193,7 +1172,7 @@ public void keyTyped(com.jogamp.newt.event.KeyEvent e) {
11931172
11941173 @ Override
11951174 protected void enableTexturing (int target ) {
1196- if (PROFILE == 2 ) enable (target );
1175+ if (profile == 2 ) enable (target );
11971176 if (target == TEXTURE_2D ) {
11981177 texturingTargets [0 ] = true ;
11991178 } else if (target == TEXTURE_RECTANGLE ) {
@@ -1204,7 +1183,7 @@ protected void enableTexturing(int target) {
12041183
12051184 @ Override
12061185 protected void disableTexturing (int target ) {
1207- if (PROFILE == 2 ) disable (target );
1186+ if (profile == 2 ) disable (target );
12081187 if (target == TEXTURE_2D ) {
12091188 texturingTargets [0 ] = false ;
12101189 } else if (target == TEXTURE_RECTANGLE ) {
@@ -1243,7 +1222,7 @@ protected Object getDerivedFont(Object font, float size) {
12431222
12441223 @ Override
12451224 protected String [] loadVertexShader (String filename , int version ) {
1246- if (2 < PROFILE && version < 150 ) {
1225+ if (2 < profile && version < 150 ) {
12471226 String [] fragSrc0 = pg .parent .loadStrings (filename );
12481227 return convertFragmentSource (fragSrc0 , version , 150 );
12491228 } else {
@@ -1254,7 +1233,7 @@ protected String[] loadVertexShader(String filename, int version) {
12541233
12551234 @ Override
12561235 protected String [] loadFragmentShader (String filename , int version ) {
1257- if (2 < PROFILE && version < 150 ) {
1236+ if (2 < profile && version < 150 ) {
12581237 String [] vertSrc0 = pg .parent .loadStrings (filename );
12591238 return convertVertexSource (vertSrc0 , version , 150 );
12601239 } else {
@@ -1266,7 +1245,7 @@ protected String[] loadFragmentShader(String filename, int version) {
12661245 @ Override
12671246 protected String [] loadFragmentShader (URL url , int version ) {
12681247 try {
1269- if (2 < PROFILE && version < 150 ) {
1248+ if (2 < profile && version < 150 ) {
12701249 String [] fragSrc0 = PApplet .loadStrings (url .openStream ());
12711250 return convertFragmentSource (fragSrc0 , version , 150 );
12721251 } else {
@@ -1282,7 +1261,7 @@ protected String[] loadFragmentShader(URL url, int version) {
12821261 @ Override
12831262 protected String [] loadVertexShader (URL url , int version ) {
12841263 try {
1285- if (2 < PROFILE && version < 150 ) {
1264+ if (2 < profile && version < 150 ) {
12861265 String [] vertSrc0 = PApplet .loadStrings (url .openStream ());
12871266 return convertVertexSource (vertSrc0 , version , 150 );
12881267 } else {
0 commit comments