Index: WorldWind/.idea/misc.xml
===================================================================
--- WorldWind/.idea/misc.xml (revision 500)
+++ WorldWind/.idea/misc.xml (working copy)
@@ -1,8 +1,5 @@
-
-
-
@@ -47,20 +44,6 @@
-
*
@@ -419,11 +421,11 @@
throw new IllegalArgumentException(msg);
}
- javax.media.opengl.GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
- gl.glPushAttrib(javax.media.opengl.GL.GL_ENABLE_BIT | javax.media.opengl.GL.GL_CURRENT_BIT);
+ gl.glPushAttrib(GL2.GL_ENABLE_BIT | GL2.GL_CURRENT_BIT);
- gl.glMatrixMode(javax.media.opengl.GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPushMatrix();
gl.glTranslated(this.center.x, this.center.y, this.center.z);
javax.media.opengl.glu.GLUquadric quadric = dc.getGLU().gluNewQuadric();
Index: WorldWind/src/gov/nasa/worldwind/geom/Box.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/geom/Box.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/geom/Box.java (working copy)
@@ -10,7 +10,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.util.*;
/**
@@ -998,13 +998,13 @@
Vec4 c = this.s.add3(this.t).multiply3(0.5);
Vec4 d = this.t.subtract3(this.s).multiply3(0.5);
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
ogsh.pushAttrib(gl, GL.GL_COLOR_BUFFER_BIT // For alpha enable, blend enable, alpha func, blend func.
- | GL.GL_CURRENT_BIT // For current color.
- | GL.GL_LINE_BIT // For line width.
- | GL.GL_TRANSFORM_BIT // For matrix mode.
- | GL.GL_DEPTH_BUFFER_BIT); // For depth test enable, depth func.
+ | GL2.GL_CURRENT_BIT // For current color.
+ | GL2.GL_LINE_BIT // For line width.
+ | GL2.GL_TRANSFORM_BIT // For matrix mode.
+ | GL2.GL_DEPTH_BUFFER_BIT); // For depth test enable, depth func.
try
{
gl.glLineWidth(1f);
@@ -1030,7 +1030,7 @@
{
Vec4 e = a.add3(this.r);
Vec4 f = d.add3(this.r);
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
dc.getView().pushReferenceCenter(dc, this.bottomCenter);
OGLStackHandler ogsh = new OGLStackHandler();
@@ -1070,7 +1070,7 @@
protected void drawOutline(DrawContext dc, Vec4 a, Vec4 b, Vec4 c, Vec4 d)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glBegin(GL.GL_LINE_LOOP);
gl.glVertex3d(a.x, a.y, a.z);
gl.glVertex3d(b.x, b.y, b.z);
Index: WorldWind/src/gov/nasa/worldwind/awt/AWTInputHandler.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/awt/AWTInputHandler.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/awt/AWTInputHandler.java (working copy)
@@ -11,7 +11,7 @@
import gov.nasa.worldwind.pick.*;
import gov.nasa.worldwind.util.Logging;
-import javax.media.opengl.GLJPanel;
+import javax.media.opengl.awt.GLJPanel;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
Index: WorldWind/src/gov/nasa/worldwind/awt/WorldWindowGLJPanel.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/awt/WorldWindowGLJPanel.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/awt/WorldWindowGLJPanel.java (working copy)
@@ -14,6 +14,8 @@
import gov.nasa.worldwind.pick.PickedObjectList;
import gov.nasa.worldwind.util.*;
+import javax.media.opengl.awt.GLCanvas;
+import javax.media.opengl.awt.GLJPanel;
import javax.media.opengl.*;
import java.beans.*;
import java.util.*;
@@ -60,7 +62,7 @@
*/
protected static GLCapabilities getCaps()
{
- GLCapabilities caps = new GLCapabilities();
+ GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
caps.setAlphaBits(8);
caps.setRedBits(8);
@@ -110,8 +112,6 @@
* @param shareWith a WorldWindow
with which to share graphics resources. May be null, in which case
* resources are not shared.
*
- * @see GLJPanel#GLJPanel(javax.media.opengl.GLCapabilities, javax.media.opengl.GLCapabilitiesChooser,
- * javax.media.opengl.GLContext)
*/
public WorldWindowGLJPanel(WorldWindow shareWith)
{
@@ -150,7 +150,6 @@
* @param chooser a chooser object that customizes the specified capabilities. May be null, in which case a
* default chooser is used.
*
- * @see GLJPanel#GLJPanel(GLCapabilities, GLCapabilitiesChooser, GLContext)
*/
public WorldWindowGLJPanel(WorldWindow shareWith, GLCapabilities capabilities,
GLCapabilitiesChooser chooser)
Index: WorldWind/src/gov/nasa/worldwind/awt/WorldWindowGLCanvas.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/awt/WorldWindowGLCanvas.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/awt/WorldWindowGLCanvas.java (working copy)
@@ -14,6 +14,7 @@
import gov.nasa.worldwind.pick.PickedObjectList;
import gov.nasa.worldwind.util.*;
+import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.*;
import java.awt.*;
import java.beans.*;
@@ -63,7 +64,7 @@
*/
protected static GLCapabilities getCaps()
{
- GLCapabilities caps = new GLCapabilities();
+ GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
caps.setAlphaBits(8);
caps.setRedBits(8);
@@ -113,7 +114,6 @@
* @param shareWith a WorldWindow
with which to share graphics resources. May be null, in which case
* resources are not shared.
*
- * @see GLCanvas#GLCanvas(GLCapabilities, GLCapabilitiesChooser, GLContext, GraphicsDevice)
*/
public WorldWindowGLCanvas(WorldWindow shareWith)
{
@@ -149,7 +149,6 @@
* @param device the GraphicsDevice
on which to create the window. May be null, in which case the
* default screen device of the local {@link GraphicsEnvironment} is used.
*
- * @see GLCanvas#GLCanvas(GLCapabilities, GLCapabilitiesChooser, GLContext, GraphicsDevice)
*/
public WorldWindowGLCanvas(WorldWindow shareWith, java.awt.GraphicsDevice device)
{
@@ -189,7 +188,6 @@
* @param chooser a chooser object that customizes the specified capabilities. May be null, in which case a
* default chooser is used.
*
- * @see GLCanvas#GLCanvas(GLCapabilities, GLCapabilitiesChooser, GLContext, GraphicsDevice)
*/
public WorldWindowGLCanvas(WorldWindow shareWith, java.awt.GraphicsDevice device,
GLCapabilities capabilities, GLCapabilitiesChooser chooser)
Index: WorldWind/src/gov/nasa/worldwind/layers/TiledImageLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/TiledImageLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/TiledImageLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.j2d.TextRenderer;
+import com.jogamp.opengl.util.awt.TextRenderer;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.geom.*;
@@ -17,12 +17,14 @@
import org.w3c.dom.*;
import javax.imageio.ImageIO;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import javax.xml.xpath.XPath;
+import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import java.util.*;
+import java.util.List;
import java.util.concurrent.PriorityBlockingQueue;
/**
@@ -629,19 +631,19 @@
sortedTiles = this.currentTiles.toArray(sortedTiles);
Arrays.sort(sortedTiles, levelComparer);
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
if (this.isUseTransparentTextures() || this.getOpacity() < 1)
{
- gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL.GL_POLYGON_BIT | GL.GL_CURRENT_BIT);
+ gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL2.GL_POLYGON_BIT | GL2.GL_CURRENT_BIT);
this.setBlendingFunction(dc);
}
else
{
- gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL.GL_POLYGON_BIT);
+ gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL2.GL_POLYGON_BIT);
}
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
+ gl.glPolygonMode(GL.GL_FRONT, GL2.GL_FILL);
gl.glEnable(GL.GL_CULL_FACE);
gl.glCullFace(GL.GL_BACK);
@@ -687,7 +689,7 @@
// color as a premultiplied color, so that any incoming premultiplied color will be properly combined with the
// base color.
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
double alpha = this.getOpacity();
gl.glColor4d(alpha, alpha, alpha, alpha);
@@ -766,7 +768,7 @@
{
java.awt.Rectangle viewport = dc.getView().getViewport();
TextRenderer textRenderer = OGLTextRenderer.getOrCreateTextRenderer(dc.getTextRendererCache(),
- java.awt.Font.decode("Arial-Plain-13"));
+ Font.decode("Arial-Plain-13"));
dc.getGL().glDisable(GL.GL_DEPTH_TEST);
dc.getGL().glDisable(GL.GL_BLEND);
@@ -794,8 +796,8 @@
protected void drawBoundingVolumes(DrawContext dc, ArrayList tiles)
{
float[] previousColor = new float[4];
- dc.getGL().glGetFloatv(GL.GL_CURRENT_COLOR, previousColor, 0);
- dc.getGL().glColor3d(0, 1, 0);
+ dc.getGL().getGL2().glGetFloatv(GL2.GL_CURRENT_COLOR, previousColor, 0);
+ dc.getGL().getGL2().glColor3d(0, 1, 0);
for (TextureTile tile : tiles)
{
@@ -804,10 +806,10 @@
}
Box c = Sector.computeBoundingBox(dc.getGlobe(), dc.getVerticalExaggeration(), this.levels.getSector());
- dc.getGL().glColor3d(1, 1, 0);
+ dc.getGL().getGL2().glColor3d(1, 1, 0);
c.render(dc);
- dc.getGL().glColor4fv(previousColor, 0);
+ dc.getGL().getGL2().glColor4fv(previousColor, 0);
}
//**************************************************************//
Index: WorldWind/src/gov/nasa/worldwind/layers/CompassLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/CompassLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/CompassLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.View;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.exception.WWRuntimeException;
@@ -15,7 +15,7 @@
import gov.nasa.worldwind.util.*;
import gov.nasa.worldwind.view.orbit.OrbitView;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.io.*;
@@ -296,7 +296,7 @@
if (this.getIconFilePath() == null)
return;
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
try
@@ -348,7 +348,7 @@
if (iconTexture != null)
{
gl.glEnable(GL.GL_TEXTURE_2D);
- iconTexture.bind();
+ iconTexture.bind(dc.getGL());
gl.glColor4d(1d, 1d, 1d, this.getOpacity());
gl.glEnable(GL.GL_BLEND);
@@ -532,7 +532,7 @@
}
iconTexture = TextureIO.newTexture(iconStream, false, null);
- iconTexture.bind();
+ iconTexture.bind(dc.getGL());
this.iconWidth = iconTexture.getWidth();
this.iconHeight = iconTexture.getHeight();
dc.getTextureCache().put(this.getIconFilePath(), iconTexture);
Index: WorldWind/src/gov/nasa/worldwind/layers/rpf/RPFTiledImageLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/rpf/RPFTiledImageLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/rpf/RPFTiledImageLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers.rpf;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.WorldWind;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.cache.FileStore;
@@ -16,6 +16,7 @@
import gov.nasa.worldwind.retrieve.*;
import gov.nasa.worldwind.util.*;
+import javax.media.opengl.*;
import java.awt.image.*;
import java.io.*;
import java.nio.ByteBuffer;
@@ -677,7 +678,7 @@
{
try
{
- return TextureIO.newTextureData(url, useMipMaps, null);
+ return TextureIO.newTextureData(GLContext.getCurrentGL().getGLProfile(), url, useMipMaps, null);
}
catch (Exception e)
{
Index: WorldWind/src/gov/nasa/worldwind/layers/ScalebarLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/ScalebarLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/ScalebarLayer.java (working copy)
@@ -5,14 +5,14 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.j2d.TextRenderer;
+import com.jogamp.opengl.util.awt.TextRenderer;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.geom.*;
import gov.nasa.worldwind.pick.PickSupport;
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.awt.geom.*;
@@ -326,13 +326,13 @@
// Rendering
public void draw(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
try
{
- ogsh.pushAttrib(gl, GL.GL_TRANSFORM_BIT);
+ ogsh.pushAttrib(gl, GL2.GL_TRANSFORM_BIT);
gl.glDisable(GL.GL_DEPTH_TEST);
@@ -461,8 +461,8 @@
// Draw scale rectangle
private void drawRectangle(DrawContext dc, double width, double height)
{
- GL gl = dc.getGL();
- gl.glBegin(GL.GL_POLYGON);
+ GL2 gl = dc.getGL().getGL2();
+ gl.glBegin(GL2.GL_POLYGON);
gl.glVertex3d(0, height ,0);
gl.glVertex3d(0, 0 ,0);
gl.glVertex3d(width, 0 ,0);
@@ -474,7 +474,7 @@
// Draw scale graphic
private void drawScale(DrawContext dc, double width, double height)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glBegin(GL.GL_LINE_STRIP);
gl.glVertex3d(0, height ,0);
gl.glVertex3d(0, 0 ,0);
Index: WorldWind/src/gov/nasa/worldwind/layers/TextureTile.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/TextureTile.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/TextureTile.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.cache.*;
@@ -72,7 +72,9 @@
long size = super.getSizeInBytes();
if (this.textureData != null)
+ {
size += this.textureData.getEstimatedMemorySize();
+ }
return size;
}
@@ -351,7 +353,7 @@
}
this.setTexture(dc.getTextureCache(), t);
- t.bind();
+ t.bind(dc.getGL());
this.setTextureParameters(dc, t);
@@ -446,7 +448,7 @@
}
if (t != null)
- t.bind();
+ t.bind(dc.getGL());
return t != null;
}
@@ -470,7 +472,7 @@
{
if (t.getMustFlipVertically())
{
- GL gl = GLContext.getCurrent().getGL();
+ GL2 gl = GLContext.getCurrent().getGL().getGL2();
if (!textureIdentityActive)
{
gl.glMatrixMode(GL.GL_TEXTURE);
@@ -495,7 +497,7 @@
return;
// Apply necessary transforms to the fallback texture.
- GL gl = GLContext.getCurrent().getGL();
+ GL2 gl = GLContext.getCurrent().getGL().getGL2();
if (!textureIdentityActive)
{
gl.glMatrixMode(GL.GL_TEXTURE);
@@ -533,8 +535,8 @@
double sShift = oneOverTwoToTheN * (this.getColumn() % twoToTheN);
double tShift = oneOverTwoToTheN * (this.getRow() % twoToTheN);
- dc.getGL().glTranslated(sShift, tShift, 0);
- dc.getGL().glScaled(oneOverTwoToTheN, oneOverTwoToTheN, 1);
+ dc.getGL().getGL2().glTranslated(sShift, tShift, 0);
+ dc.getGL().getGL2().glScaled(oneOverTwoToTheN, oneOverTwoToTheN, 1);
}
@Override
Index: WorldWind/src/gov/nasa/worldwind/layers/SkyGradientLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/SkyGradientLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/SkyGradientLayer.java (working copy)
@@ -11,7 +11,7 @@
import gov.nasa.worldwind.render.DrawContext;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
/**
@@ -133,12 +133,12 @@
@Override
public void doRender(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
try
{
- ogsh.pushAttrib(gl, GL.GL_TRANSFORM_BIT);
+ ogsh.pushAttrib(gl, GL2.GL_TRANSFORM_BIT);
int[] dlId = (int[]) dc.getGpuResourceCache().get(this.displayListCacheKey);
if (!this.isValid(dc))
@@ -167,7 +167,7 @@
protected void applyDrawTransform(DrawContext dc, OGLStackHandler ogsh)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
View view = dc.getView();
ogsh.pushModelview(gl);
// Place sky - TODO: find another ellipsoid friendlier way (the sky dome is not exactly normal...
@@ -181,7 +181,7 @@
protected void applyDrawProjection(DrawContext dc, OGLStackHandler ogsh)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
View view = dc.getView();
double viewportWidth = view.getViewport().getWidth();
double viewportHeight = view.getViewport().getHeight();
@@ -262,7 +262,7 @@
protected int[] makeSkyDome(DrawContext dc, float radius, double startLat, double endLat,
int slices, int stacks, float zenithOpacity, float gradientBias)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
int[] dlResource = (int[]) dc.getGpuResourceCache().get(this.displayListCacheKey);
if (dlResource != null)
@@ -274,7 +274,7 @@
try
{
- gl.glNewList(dlResource[0], GL.GL_COMPILE);
+ gl.glNewList(dlResource[0], GL2.GL_COMPILE);
this.drawSkyDome(dc, radius, startLat, endLat, slices, stacks, zenithOpacity, gradientBias);
gl.glEndList();
}
@@ -308,7 +308,7 @@
double latitude, longitude, latitudeTop = endLat;
// GL setup
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
// TODO: Simplify code
double linear, linearTop, k, kTop, colorFactorZ, colorFactorZTop = 0;
@@ -317,7 +317,7 @@
// bottom fade
latitude = startLat - Math.max((endLat - startLat) / 4, 3);
- gl.glBegin(GL.GL_QUAD_STRIP);
+ gl.glBegin(GL2.GL_QUAD_STRIP);
for (int slice = 0; slice <= slices; slice++)
{
longitude = 180 - ((float) slice / slices * (float) 360);
@@ -348,7 +348,7 @@
colorFactorHTop = 1 - colorFactorZTop; // coef horizon color
alphaFactorTop = 1 - Math.pow(linearTop, 4) * (1 - zenithOpacity); // coef alpha transparency
// Draw stack
- gl.glBegin(GL.GL_QUAD_STRIP);
+ gl.glBegin(GL2.GL_QUAD_STRIP);
for (int slice = 0; slice <= slices; slice++)
{
longitude = 180 - ((float) slice / slices * (float) 360);
@@ -371,7 +371,7 @@
}
// Top fade
- gl.glBegin(GL.GL_QUAD_STRIP);
+ gl.glBegin(GL2.GL_QUAD_STRIP);
for (int slice = 0; slice <= slices; slice++)
{
longitude = 180 - ((float) slice / slices * (float) 360);
Index: WorldWind/src/gov/nasa/worldwind/layers/WorldMapLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/WorldMapLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/WorldMapLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.exception.WWRuntimeException;
@@ -14,7 +14,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.io.*;
import java.util.ArrayList;
@@ -341,7 +341,7 @@
if (this.getIconFilePath() == null)
return;
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
try
@@ -393,7 +393,7 @@
// Draw world map icon
gl.glColor4d(1d, 1d, 1d, this.getOpacity());
gl.glEnable(GL.GL_TEXTURE_2D);
- iconTexture.bind();
+ iconTexture.bind(gl);
TextureCoords texCoords = iconTexture.getImageTexCoords();
dc.drawUnitQuad(texCoords);
@@ -590,7 +590,7 @@
}
iconTexture = TextureIO.newTexture(iconStream, false, null);
- iconTexture.bind();
+ iconTexture.bind(dc.getGL());
this.iconWidth = iconTexture.getWidth();
this.iconHeight = iconTexture.getHeight();
dc.getTextureCache().put(this.getIconFilePath(), iconTexture);
Index: WorldWind/src/gov/nasa/worldwind/layers/CrosshairLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/CrosshairLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/CrosshairLayer.java (working copy)
@@ -5,14 +5,14 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.exception.WWRuntimeException;
import gov.nasa.worldwind.geom.Vec4;
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.Logging;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.io.*;
@@ -193,7 +193,7 @@
if (this.getIconFilePath() == null)
return;
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
boolean attribsPushed = false;
boolean modelviewPushed = false;
@@ -203,10 +203,10 @@
{
gl.glPushAttrib(GL.GL_DEPTH_BUFFER_BIT
| GL.GL_COLOR_BUFFER_BIT
- | GL.GL_ENABLE_BIT
- | GL.GL_TRANSFORM_BIT
- | GL.GL_VIEWPORT_BIT
- | GL.GL_CURRENT_BIT);
+ | GL2.GL_ENABLE_BIT
+ | GL2.GL_TRANSFORM_BIT
+ | GL2.GL_VIEWPORT_BIT
+ | GL2.GL_CURRENT_BIT);
attribsPushed = true;
Texture iconTexture = dc.getTextureCache().getTexture(this.getIconFilePath());
@@ -222,7 +222,7 @@
}
gl.glEnable(GL.GL_TEXTURE_2D);
- iconTexture.bind();
+ iconTexture.bind(dc.getGL());
gl.glColor4d(1d, 1d, 1d, this.getOpacity());
gl.glEnable(GL.GL_BLEND);
@@ -235,14 +235,14 @@
// Load a parallel projection with xy dimensions (viewportWidth, viewportHeight)
// into the GL projection matrix.
java.awt.Rectangle viewport = dc.getView().getViewport();
- gl.glMatrixMode(javax.media.opengl.GL.GL_PROJECTION);
+ gl.glMatrixMode(javax.media.opengl.GL2.GL_PROJECTION);
gl.glPushMatrix();
projectionPushed = true;
gl.glLoadIdentity();
double maxwh = width > height ? width : height;
gl.glOrtho(0d, viewport.width, 0d, viewport.height, -0.6 * maxwh, 0.6 * maxwh);
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPushMatrix();
modelviewPushed = true;
gl.glLoadIdentity();
@@ -263,12 +263,12 @@
if (projectionPushed)
{
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glPopMatrix();
}
if (modelviewPushed)
{
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPopMatrix();
}
if (attribsPushed)
@@ -350,7 +350,7 @@
}
iconTexture = TextureIO.newTexture(iconStream, false, null);
- iconTexture.bind();
+ iconTexture.bind(dc.getGL());
this.iconWidth = iconTexture.getWidth();
this.iconHeight = iconTexture.getHeight();
dc.getTextureCache().put(this.getIconFilePath(), iconTexture);
Index: WorldWind/src/gov/nasa/worldwind/layers/StarsConvertor.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/StarsConvertor.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/StarsConvertor.java (working copy)
@@ -5,7 +5,6 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.geom.Vec4;
import gov.nasa.worldwind.util.*;
@@ -206,7 +205,7 @@
starsReader.close();
- ByteBuffer buf = BufferUtil.newByteBuffer(tmpBuffer.size() * 4);
+ ByteBuffer buf = ByteBuffer.allocate(tmpBuffer.size() * 4);
buf.order(ByteOrder.LITTLE_ENDIAN);
FloatBuffer fBuf = buf.asFloatBuffer();
Index: WorldWind/src/gov/nasa/worldwind/layers/RenderableLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/RenderableLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/RenderableLayer.java (working copy)
@@ -397,9 +397,9 @@
if (renderable != null)
{
// float[] inColor = new float[4];
-// dc.getGL().glGetFloatv(GL.GL_CURRENT_COLOR, inColor, 0);
+// dc.getGL().glGetFloatv(GL2.GL_CURRENT_COLOR, inColor, 0);
java.awt.Color color = dc.getUniquePickColor();
- dc.getGL().glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
+ dc.getGL().getGL2().glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
try
{
Index: WorldWind/src/gov/nasa/worldwind/layers/SkyColorLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/SkyColorLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/SkyColorLayer.java (working copy)
@@ -9,7 +9,7 @@
import gov.nasa.worldwind.render.DrawContext;
import gov.nasa.worldwind.util.Logging;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
/**
@@ -110,7 +110,7 @@
float fadeFactor = (alt < this.fadeBottomAltitude) ? 1f :
(float)((this.fadeTopAltitude - alt) / (this.fadeTopAltitude - this.fadeBottomAltitude));
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
boolean attribsPushed = false;
boolean modelviewPushed = false;
@@ -121,10 +121,10 @@
// GL setup
gl.glPushAttrib(GL.GL_DEPTH_BUFFER_BIT
| GL.GL_COLOR_BUFFER_BIT
- | GL.GL_ENABLE_BIT
- | GL.GL_TRANSFORM_BIT
- | GL.GL_VIEWPORT_BIT
- | GL.GL_CURRENT_BIT);
+ | GL2.GL_ENABLE_BIT
+ | GL2.GL_TRANSFORM_BIT
+ | GL2.GL_VIEWPORT_BIT
+ | GL2.GL_CURRENT_BIT);
attribsPushed = true;
gl.glEnable(GL.GL_BLEND);
@@ -134,13 +134,13 @@
// Load a parallel projection with xy dimensions (viewportWidth, viewportHeight)
// into the GL projection matrix.
Rectangle viewport = dc.getView().getViewport();
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glPushMatrix();
projectionPushed = true;
gl.glLoadIdentity();
gl.glOrtho(0d, viewport.width, 0d, viewport.height, -1, 1);
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPushMatrix();
modelviewPushed = true;
gl.glLoadIdentity();
@@ -160,12 +160,12 @@
{
if (projectionPushed)
{
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glPopMatrix();
}
if (modelviewPushed)
{
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPopMatrix();
}
if (attribsPushed)
Index: WorldWind/src/gov/nasa/worldwind/layers/BasicTiledImageLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/BasicTiledImageLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/BasicTiledImageLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.WorldWind;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.cache.FileStore;
@@ -19,6 +19,7 @@
import gov.nasa.worldwind.util.*;
import org.w3c.dom.*;
+import javax.media.opengl.*;
import javax.swing.*;
import java.awt.*;
import java.io.*;
@@ -383,13 +384,16 @@
attributes.setBuildMipmaps(useMipMaps);
ByteBuffer buffer = DDSCompressor.compressImageURL(url, attributes);
- return TextureIO.newTextureData(WWIO.getInputStreamFromByteBuffer(buffer), useMipMaps, null);
+ return TextureIO.newTextureData(GLContext.getCurrentGL().getGLProfile(),
+ WWIO.getInputStreamFromByteBuffer(buffer),
+ useMipMaps, null);
}
// If the caller has disabled texture compression, or if the texture data is already a DDS file, then read
// the texture data without converting it.
else
{
- return TextureIO.newTextureData(url, useMipMaps, null);
+ return TextureIO.newTextureData(GLContext.getCurrentGL().getGLProfile(),
+ url, useMipMaps, null);
}
}
catch (Exception e)
Index: WorldWind/src/gov/nasa/worldwind/layers/TerrainProfileLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/TerrainProfileLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/TerrainProfileLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers;
-import com.sun.opengl.util.j2d.TextRenderer;
+import com.jogamp.opengl.util.awt.TextRenderer;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.event.*;
@@ -15,7 +15,7 @@
import gov.nasa.worldwind.util.*;
import gov.nasa.worldwind.view.orbit.OrbitView;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.awt.geom.*;
import java.beans.PropertyChangeEvent;
@@ -815,7 +815,7 @@
if (this.positions == null || (this.minElevation == 0 && this.maxElevation == 0))
return;
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
boolean attribsPushed = false;
boolean modelviewPushed = false;
@@ -825,10 +825,10 @@
{
gl.glPushAttrib(GL.GL_DEPTH_BUFFER_BIT
| GL.GL_COLOR_BUFFER_BIT
- | GL.GL_ENABLE_BIT
- | GL.GL_TRANSFORM_BIT
- | GL.GL_VIEWPORT_BIT
- | GL.GL_CURRENT_BIT);
+ | GL2.GL_ENABLE_BIT
+ | GL2.GL_TRANSFORM_BIT
+ | GL2.GL_VIEWPORT_BIT
+ | GL2.GL_CURRENT_BIT);
attribsPushed = true;
gl.glDisable(GL.GL_TEXTURE_2D); // no textures
@@ -846,14 +846,14 @@
// Load a parallel projection with xy dimensions (viewportWidth, viewportHeight)
// into the GL projection matrix.
- gl.glMatrixMode(javax.media.opengl.GL.GL_PROJECTION);
+ gl.glMatrixMode(javax.media.opengl.GL2.GL_PROJECTION);
gl.glPushMatrix();
projectionPushed = true;
gl.glLoadIdentity();
double maxwh = width > height ? width : height;
gl.glOrtho(0d, viewport.width, 0d, viewport.height, -0.6 * maxwh, 0.6 * maxwh);
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPushMatrix();
modelviewPushed = true;
gl.glLoadIdentity();
@@ -916,7 +916,7 @@
// Add graph to the pickable list for 'un-minimize' click
this.pickSupport.addPickableObject(colorCode, this);
gl.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
- gl.glBegin(GL.GL_POLYGON);
+ gl.glBegin(GL2.GL_POLYGON);
gl.glVertex3d(0, 0, 0);
gl.glVertex3d(width, 0, 0);
gl.glVertex3d(width, height, 0);
@@ -937,12 +937,12 @@
{
if (projectionPushed)
{
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glPopMatrix();
}
if (modelviewPushed)
{
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPopMatrix();
}
if (attribsPushed)
@@ -960,7 +960,7 @@
backColor.getGreen(), backColor.getBlue(), (int) (backColor.getAlpha() * .5))); // Increased transparency
// Grid - minimal
float[] colorRGB = this.color.getRGBColorComponents(null);
- dc.getGL().glColor4d(colorRGB[0], colorRGB[1], colorRGB[2], this.getOpacity());
+ dc.getGL().getGL2().glColor4d(colorRGB[0], colorRGB[1], colorRGB[2], this.getOpacity());
drawVerticalLine(dc, dimension, 0);
drawVerticalLine(dc, dimension, dimension.getWidth());
drawHorizontalLine(dc, dimension, 0);
@@ -970,7 +970,7 @@
protected void drawGraph(DrawContext dc, Dimension dimension)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
// Adjust min/max elevation for the graph
double min = this.minElevation;
double max = this.maxElevation;
@@ -1110,7 +1110,7 @@
protected void drawGUI(DrawContext dc, Dimension dimension)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
int buttonSize = 16;
int hs = buttonSize / 2;
int buttonBorder = 4;
@@ -1179,11 +1179,11 @@
protected void drawFilledRectangle(DrawContext dc, Vec4 origin, Dimension dimension, Color color)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glColor4ub((byte) color.getRed(), (byte) color.getGreen(),
(byte) color.getBlue(), (byte) color.getAlpha());
gl.glDisable(GL.GL_TEXTURE_2D); // no textures
- gl.glBegin(GL.GL_POLYGON);
+ gl.glBegin(GL2.GL_POLYGON);
gl.glVertex3d(origin.x, origin.y, 0);
gl.glVertex3d(origin.x + dimension.getWidth(), origin.y, 0);
gl.glVertex3d(origin.x + dimension.getWidth(), origin.y + dimension.getHeight(), 0);
@@ -1194,7 +1194,7 @@
protected void drawLine(DrawContext dc, double x1, double y1, double x2, double y2)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glBegin(GL.GL_LINE_STRIP);
gl.glVertex3d(x1, y1, 0);
gl.glVertex3d(x2, y2, 0);
Index: WorldWind/src/gov/nasa/worldwind/layers/CachedRenderableLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/CachedRenderableLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/CachedRenderableLayer.java (working copy)
@@ -12,7 +12,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.util.Collection;
/**
@@ -280,9 +280,10 @@
if (renderable != null)
{
float[] inColor = new float[4];
- dc.getGL().glGetFloatv(GL.GL_CURRENT_COLOR, inColor, 0);
+ dc.getGL().glGetFloatv(GL2.GL_CURRENT_COLOR, inColor, 0);
java.awt.Color color = dc.getUniquePickColor();
- dc.getGL().glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
+ dc.getGL().getGL2().glColor3ub((byte) color.getRed(), (byte) color.getGreen(),
+ (byte) color.getBlue());
try
{
@@ -295,7 +296,7 @@
continue; // go on to next renderable
}
- dc.getGL().glColor4fv(inColor, 0);
+ dc.getGL().getGL2().glColor4fv(inColor, 0);
if (renderable instanceof Locatable)
{
Index: WorldWind/src/gov/nasa/worldwind/layers/StarsLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/StarsLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/StarsLayer.java (working copy)
@@ -11,7 +11,7 @@
import gov.nasa.worldwind.render.DrawContext;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.io.*;
import java.nio.*;
@@ -198,7 +198,7 @@
if (this.starsBuffer == null)
return;
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
try
@@ -220,7 +220,7 @@
gl.glRotatef((float) -this.latitudeOffset.degrees, 1.0f, 0.0f, 0.0f);
// Draw
- ogsh.pushClientAttrib(gl, GL.GL_CLIENT_VERTEX_ARRAY_BIT);
+ ogsh.pushClientAttrib(gl, GL2.GL_CLIENT_VERTEX_ARRAY_BIT);
if (dc.getGLRuntimeCapabilities().isUseVertexBufferObject())
{
@@ -241,9 +241,9 @@
protected void drawWithVertexArray(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
- gl.glInterleavedArrays(GL.GL_C3F_V3F, 0, this.starsBuffer);
+ gl.glInterleavedArrays(GL2.GL_C3F_V3F, 0, this.starsBuffer);
gl.glDrawArrays(GL.GL_POINTS, 0, this.numStars);
}
@@ -258,10 +258,10 @@
return false;
}
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboId[0]);
- gl.glInterleavedArrays(GL.GL_C3F_V3F, 0, 0);
+ gl.glInterleavedArrays(GL2.GL_C3F_V3F, 0, 0);
gl.glDrawArrays(GL.GL_POINTS, 0, this.numStars);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
@@ -275,7 +275,7 @@
*/
protected void fillVbo(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
//Create a new bufferId
int glBuf[] = new int[1];
Index: WorldWind/src/gov/nasa/worldwind/layers/mercator/BasicMercatorTiledImageLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/mercator/BasicMercatorTiledImageLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/mercator/BasicMercatorTiledImageLayer.java (working copy)
@@ -6,7 +6,7 @@
package gov.nasa.worldwind.layers.mercator;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.cache.*;
@@ -16,6 +16,7 @@
import gov.nasa.worldwind.util.*;
import javax.imageio.ImageIO;
+import javax.media.opengl.GLContext;
import java.awt.image.*;
import java.io.*;
import java.net.*;
@@ -197,7 +198,7 @@
{
try
{
- return TextureIO.newTextureData(url, useMipMaps, null);
+ return TextureIO.newTextureData(GLContext.getCurrentGL().getGLProfile(), url, useMipMaps, null);
}
catch (Exception e)
{
Index: WorldWind/src/gov/nasa/worldwind/layers/mercator/MercatorTiledImageLayer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/layers/mercator/MercatorTiledImageLayer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/layers/mercator/MercatorTiledImageLayer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.layers.mercator;
-import com.sun.opengl.util.j2d.TextRenderer;
+import com.jogamp.opengl.util.awt.TextRenderer;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.geom.*;
import gov.nasa.worldwind.globes.Globe;
@@ -15,7 +15,7 @@
import gov.nasa.worldwind.util.*;
import javax.imageio.ImageIO;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
@@ -549,22 +549,22 @@
sortedTiles = this.currentTiles.toArray(sortedTiles);
Arrays.sort(sortedTiles, levelComparer);
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
if (this.isUseTransparentTextures() || this.getOpacity() < 1)
{
- gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL.GL_POLYGON_BIT
- | GL.GL_CURRENT_BIT);
+ gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL2.GL_POLYGON_BIT
+ | GL2.GL_CURRENT_BIT);
gl.glColor4d(1d, 1d, 1d, this.getOpacity());
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
}
else
{
- gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL.GL_POLYGON_BIT);
+ gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT | GL2.GL_POLYGON_BIT);
}
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
+ gl.glPolygonMode(GL.GL_FRONT, GL2.GL_FILL);
gl.glEnable(GL.GL_CULL_FACE);
gl.glCullFace(GL.GL_BACK);
@@ -667,7 +667,7 @@
{
java.awt.Rectangle viewport = dc.getView().getViewport();
TextRenderer textRenderer = OGLTextRenderer.getOrCreateTextRenderer(dc.getTextRendererCache(),
- java.awt.Font.decode("Arial-Plain-13"));
+ Font.decode("Arial-Plain-13"));
dc.getGL().glDisable(GL.GL_DEPTH_TEST);
dc.getGL().glDisable(GL.GL_BLEND);
@@ -698,8 +698,8 @@
ArrayList tiles)
{
float[] previousColor = new float[4];
- dc.getGL().glGetFloatv(GL.GL_CURRENT_COLOR, previousColor, 0);
- dc.getGL().glColor3d(0, 1, 0);
+ dc.getGL().getGL2().glGetFloatv(GL2.GL_CURRENT_COLOR, previousColor, 0);
+ dc.getGL().getGL2().glColor3d(0, 1, 0);
for (MercatorTextureTile tile : tiles)
{
@@ -708,10 +708,10 @@
Cylinder c = Sector.computeBoundingCylinder(dc.getGlobe(),
dc.getVerticalExaggeration(), this.levels.getSector());
- dc.getGL().glColor3d(1, 1, 0);
+ dc.getGL().getGL2().glColor3d(1, 1, 0);
c.render(dc);
- dc.getGL().glColor4fv(previousColor, 0);
+ dc.getGL().getGL2().glColor4fv(previousColor, 0);
}
// ============== Image Composition ======================= //
Index: WorldWind/src/gov/nasa/worldwind/terrain/SectorGeometryList.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/terrain/SectorGeometryList.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/terrain/SectorGeometryList.java (working copy)
@@ -10,7 +10,7 @@
import gov.nasa.worldwind.render.DrawContext;
import gov.nasa.worldwind.util.Logging;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.util.*;
import java.util.List;
@@ -125,8 +125,8 @@
this.pickSupport.clearPickList();
this.pickSupport.beginPicking(dc);
- GL gl = dc.getGL();
- gl.glShadeModel(GL.GL_FLAT);
+ GL2 gl = dc.getGL().getGL2();
+ gl.glShadeModel(GL2.GL_FLAT);
try
{
@@ -135,7 +135,7 @@
for (SectorGeometry sector : this)
{
Color color = dc.getUniquePickColor();
- dc.getGL().glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
+ gl.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
sector.render(dc);
// lat/lon/elevation not used in this case
this.pickSupport.addPickableObject(color.getRGB(), sector, Position.ZERO, true);
@@ -152,7 +152,7 @@
finally
{
this.endRendering(dc);
- gl.glShadeModel(GL.GL_SMOOTH); // restore to default explicitly to avoid more expensive pushAttrib
+ gl.glShadeModel(GL2.GL_SMOOTH); // restore to default explicitly to avoid more expensive pushAttrib
gl.glDepthFunc(GL.GL_LESS); // restore to default explicitly to avoid more expensive pushAttrib
this.pickSupport.endPicking(dc);
@@ -187,8 +187,8 @@
this.pickSupport.clearPickList();
this.pickSupport.beginPicking(dc);
- GL gl = dc.getGL();
- gl.glShadeModel(GL.GL_FLAT);
+ GL2 gl = dc.getGL().getGL2();
+ gl.glShadeModel(GL2.GL_FLAT);
try
{
@@ -197,7 +197,7 @@
for (SectorGeometry sector : this)
{
Color color = dc.getUniquePickColor();
- dc.getGL().glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
+ gl.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
sector.render(dc);
// lat/lon/elevation not used in this case
this.pickSupport.addPickableObject(color.getRGB(), sector, Position.ZERO, true);
@@ -251,7 +251,7 @@
finally
{
this.endRendering(dc);
- gl.glShadeModel(GL.GL_SMOOTH); // restore to default explicitly to avoid more expensive pushAttrib
+ gl.glShadeModel(GL2.GL_SMOOTH); // restore to default explicitly to avoid more expensive pushAttrib
gl.glDepthFunc(GL.GL_LESS); // restore to default explicitly to avoid more expensive pushAttrib
this.pickSupport.endPicking(dc);
Index: WorldWind/src/gov/nasa/worldwind/terrain/BasicElevationModel.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/terrain/BasicElevationModel.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/terrain/BasicElevationModel.java (working copy)
@@ -5,7 +5,6 @@
*/
package gov.nasa.worldwind.terrain;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.cache.*;
@@ -576,7 +575,7 @@
{
WWIO.saveBuffer(buffer, tempFile);
BufferedImage image = ImageIO.read(tempFile);
- ByteBuffer byteBuffer = BufferUtil.newByteBuffer(image.getWidth() * image.getHeight() * 2);
+ ByteBuffer byteBuffer = ByteBuffer.allocate(image.getWidth() * image.getHeight() * 2);
byteBuffer.order(java.nio.ByteOrder.LITTLE_ENDIAN);
ShortBuffer bilBuffer = byteBuffer.asShortBuffer();
Index: WorldWind/src/gov/nasa/worldwind/terrain/RectangularTessellator.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/terrain/RectangularTessellator.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/terrain/RectangularTessellator.java (working copy)
@@ -5,8 +5,7 @@
*/
package gov.nasa.worldwind.terrain;
-import com.sun.opengl.util.BufferUtil;
-import com.sun.opengl.util.j2d.TextRenderer;
+import com.jogamp.opengl.util.awt.TextRenderer;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.cache.*;
@@ -17,7 +16,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.nio.*;
import java.util.*;
@@ -619,7 +618,7 @@
//Re-use the RenderInfo vertices buffer. If it has not been set or the density has changed, create a new buffer
if (tile.ri == null || tile.ri.vertices == null || density != tile.ri.density)
{
- verts = BufferUtil.newFloatBuffer(numVertices * 3);
+ verts = FloatBuffer.allocate(numVertices * 3);
}
else
{
@@ -756,8 +755,8 @@
public void beginRendering(DrawContext dc)
{
- dc.getGL().glPushClientAttrib(GL.GL_CLIENT_VERTEX_ARRAY_BIT);
- dc.getGL().glEnableClientState(GL.GL_VERTEX_ARRAY);
+ dc.getGL().getGL2().glPushClientAttrib(GL2.GL_CLIENT_VERTEX_ARRAY_BIT);
+ dc.getGL().getGL2().glEnableClientState(GL2.GL_VERTEX_ARRAY);
// Tiles don't push their reference center, they set it, so push the reference center once here so it can be
// restored later, in endRendering.
@@ -767,7 +766,7 @@
public void endRendering(DrawContext dc)
{
dc.getView().popReferenceCenter(dc);
- dc.getGL().glPopClientAttrib();
+ dc.getGL().getGL2().glPopClientAttrib();
}
protected long render(DrawContext dc, RectTile tile, int numTextureUnits)
@@ -800,14 +799,14 @@
protected void renderVA(DrawContext dc, RectTile tile, int numTextureUnits)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glVertexPointer(3, GL.GL_FLOAT, 0, tile.ri.vertices.rewind());
for (int i = 0; i < numTextureUnits; i++)
{
gl.glClientActiveTexture(GL.GL_TEXTURE0 + i);
- gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
+ gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
Object texCoords = dc.getValue(AVKey.TEXTURE_COORDINATES);
if (texCoords != null && texCoords instanceof DoubleBuffer)
gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, ((DoubleBuffer) texCoords).rewind());
@@ -845,7 +844,7 @@
return false;
}
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
// Bind vertices
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, verticesVboId[0]);
@@ -862,7 +861,7 @@
for (int i = 0; i < numTextureUnits; i++)
{
gl.glClientActiveTexture(GL.GL_TEXTURE0 + i);
- gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
+ gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, texCoordsVboId[0]);
gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);
@@ -883,7 +882,7 @@
protected int[] fillIndexListVbo(DrawContext dc, int density, IntBuffer indices)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
Object indexListVboCacheKey = indexListsVboCacheKeys.get(density);
int[] indexListVboId = (int[])
@@ -969,16 +968,16 @@
dc.getView().pushReferenceCenter(dc, tile.ri.referenceCenter);
- javax.media.opengl.GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glPushAttrib(
- GL.GL_DEPTH_BUFFER_BIT | GL.GL_POLYGON_BIT | GL.GL_ENABLE_BIT | GL.GL_CURRENT_BIT);
+ GL.GL_DEPTH_BUFFER_BIT | GL2.GL_POLYGON_BIT | GL2.GL_ENABLE_BIT | GL2.GL_CURRENT_BIT);
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
gl.glDisable(javax.media.opengl.GL.GL_DEPTH_TEST);
gl.glEnable(javax.media.opengl.GL.GL_CULL_FACE);
gl.glCullFace(javax.media.opengl.GL.GL_BACK);
gl.glColor4d(1d, 1d, 1d, 0.2);
- gl.glPolygonMode(javax.media.opengl.GL.GL_FRONT, javax.media.opengl.GL.GL_LINE);
+ gl.glPolygonMode(javax.media.opengl.GL.GL_FRONT, javax.media.opengl.GL2.GL_LINE);
if (showTriangles)
{
@@ -986,9 +985,9 @@
try
{
- ogsh.pushClientAttrib(gl, GL.GL_CLIENT_VERTEX_ARRAY_BIT);
+ ogsh.pushClientAttrib(gl, GL2.GL_CLIENT_VERTEX_ARRAY_BIT);
- gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
+ gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
gl.glVertexPointer(3, GL.GL_FLOAT, 0, tile.ri.vertices.rewind());
gl.glDrawElements(javax.media.opengl.GL.GL_TRIANGLE_STRIP, tile.ri.indices.limit(),
@@ -1010,10 +1009,10 @@
protected void renderPatchBoundary(DrawContext dc, RectTile tile)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
- ogsh.pushAttrib(gl, GL.GL_ENABLE_BIT | GL.GL_CURRENT_BIT | GL.GL_POLYGON_BIT);
+ ogsh.pushAttrib(gl, GL2.GL_ENABLE_BIT | GL2.GL_CURRENT_BIT | GL2.GL_POLYGON_BIT);
try
{
gl.glDisable(GL.GL_BLEND);
@@ -1022,12 +1021,12 @@
gl.glDisable(GL.GL_DEPTH_TEST);
gl.glEnable(GL.GL_CULL_FACE);
gl.glCullFace(GL.GL_BACK);
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_LINE);
+ gl.glPolygonMode(GL.GL_FRONT, GL2.GL_LINE);
Vec4[] corners = tile.sector.computeCornerPoints(dc.getGlobe(), dc.getVerticalExaggeration());
gl.glColor4d(1d, 0, 0, 1d);
- gl.glBegin(javax.media.opengl.GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
gl.glVertex3d(corners[0].x, corners[0].y, corners[0].z);
gl.glVertex3d(corners[1].x, corners[1].y, corners[1].z);
gl.glVertex3d(corners[2].x, corners[2].y, corners[2].z);
@@ -1056,12 +1055,12 @@
TextRenderer textRenderer = OGLTextRenderer.getOrCreateTextRenderer(dc.getTextRendererCache(),
java.awt.Font.decode("Arial-Plain-15"));
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler ogsh = new OGLStackHandler();
try
{
- ogsh.pushAttrib(gl, GL.GL_ENABLE_BIT);
+ ogsh.pushAttrib(gl, GL2.GL_ENABLE_BIT);
dc.getGL().glDisable(GL.GL_DEPTH_TEST);
dc.getGL().glDisable(GL.GL_BLEND);
@@ -1168,8 +1167,8 @@
else
{
//Otherwise create new buffers
- colorsOdd = BufferUtil.newByteBuffer(verticesSize);
- colorsEven = BufferUtil.newByteBuffer(verticesSize);
+ colorsOdd = ByteBuffer.allocate(verticesSize);
+ colorsEven = ByteBuffer.allocate(verticesSize);
oddRowColorList.put(density, colorsOdd);
evenRowColorList.put(density, colorsEven);
@@ -1206,15 +1205,15 @@
tile.maxColorCode = dc.getUniquePickColor().getRGB();
- javax.media.opengl.GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
if (null != tile.ri.referenceCenter)
dc.getView().pushReferenceCenter(dc, tile.ri.referenceCenter);
- gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
- gl.glEnableClientState(GL.GL_COLOR_ARRAY);
+ gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
+ gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
// If using VBOs, bind the vertices VBO and the indices VBO but not the tex coords VBOs.
if (dc.getGLRuntimeCapabilities().isUseVertexBufferObject() && this.bindVbos(dc, tile, 0))
@@ -1827,7 +1826,7 @@
density = 1;
int coordCount = (density + 3) * (density + 3);
- DoubleBuffer p = BufferUtil.newDoubleBuffer(2 * coordCount);
+ DoubleBuffer p = DoubleBuffer.allocate(2 * coordCount);
double deltaLat = rt.sector.getDeltaLatRadians() / density;
double deltaLon = rt.sector.getDeltaLonRadians() / density;
@@ -1911,7 +1910,7 @@
final float one = 0.999999f;
int coordCount = (density + 3) * (density + 3);
- FloatBuffer p = BufferUtil.newFloatBuffer(2 * coordCount);
+ FloatBuffer p = FloatBuffer.allocate(2 * coordCount);
double delta = 1d / density;
int k = 2 * (density + 3);
for (int j = 0; j < density; j++)
@@ -1986,7 +1985,7 @@
int sideSize = density + 2;
int indexCount = 2 * sideSize * sideSize + 4 * sideSize - 2;
- java.nio.IntBuffer buffer = BufferUtil.newIntBuffer(indexCount);
+ java.nio.IntBuffer buffer = IntBuffer.allocate(indexCount);
int k = 0;
for (int i = 0; i < sideSize; i++)
{
Index: WorldWind/src/gov/nasa/worldwind/formats/vpf/VPFSurfaceLine.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/formats/vpf/VPFSurfaceLine.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/formats/vpf/VPFSurfaceLine.java (working copy)
@@ -62,7 +62,7 @@
{
// Apply the geographic to surface tile coordinate transform.
Matrix modelview = sdc.getModelviewMatrix();
- dc.getGL().glMultMatrixd(modelview.toArray(new double[16], 0, false), 0);
+ dc.getGL().getGL2().glMultMatrixd(modelview.toArray(new double[16], 0, false), 0);
}
@Override
Index: WorldWind/src/gov/nasa/worldwind/formats/vpf/VPFSurfaceArea.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/formats/vpf/VPFSurfaceArea.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/formats/vpf/VPFSurfaceArea.java (working copy)
@@ -11,7 +11,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import java.nio.IntBuffer;
import java.util.*;
@@ -134,7 +134,7 @@
{
// Apply the geographic to surface tile coordinate transform.
Matrix modelview = sdc.getModelviewMatrix();
- dc.getGL().glMultMatrixd(modelview.toArray(new double[16], 0, false), 0);
+ dc.getGL().getGL2().glMultMatrixd(modelview.toArray(new double[16], 0, false), 0);
}
@Override
@@ -157,14 +157,14 @@
// Apply interior attributes using a reference location of (0, 0), because VPFSurfaceArea's coordinates
// are not offset with respect to a reference location.
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
this.applyInteriorState(dc, sdc, this.getActiveAttributes(), this.getInteriorTexture(), LatLon.ZERO);
int[] dlResource = (int[]) dc.getGpuResourceCache().get(this.interiorDisplayListCacheKey);
if (dlResource == null)
{
- dlResource = new int[] {dc.getGL().glGenLists(1), 1};
- gl.glNewList(dlResource[0], GL.GL_COMPILE);
+ dlResource = new int[] {dc.getGL().getGL2().glGenLists(1), 1};
+ gl.glNewList(dlResource[0], GL2.GL_COMPILE);
// Tessellate the interior vertices using a reference location of (0, 0), because VPFSurfaceArea's
// coordinates do not need to be offset with respect to a reference location.
Integer numBytes = this.tessellateInterior(dc);
Index: WorldWind/src/gov/nasa/worldwind/formats/shapefile/Shapefile.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/formats/shapefile/Shapefile.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/formats/shapefile/Shapefile.java (working copy)
@@ -6,7 +6,6 @@
package gov.nasa.worldwind.formats.shapefile;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.Exportable;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.exception.*;
@@ -1532,7 +1531,7 @@
DoubleBuffer doubleBuffer;
try
{
- doubleBuffer = BufferUtil.newDoubleBuffer(2 * totalPointsEstimate);
+ doubleBuffer = DoubleBuffer.allocate(2 * totalPointsEstimate);
}
catch (OutOfMemoryError e)
{
Index: WorldWind/src/gov/nasa/worldwind/formats/geojson/GeoJSONCoordinateParser.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/formats/geojson/GeoJSONCoordinateParser.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/formats/geojson/GeoJSONCoordinateParser.java (working copy)
@@ -5,7 +5,6 @@
*/
package gov.nasa.worldwind.formats.geojson;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.formats.json.*;
import gov.nasa.worldwind.util.Logging;
@@ -121,7 +120,7 @@
protected DoubleBuffer allocatePositionBuffer(int capacity)
{
- return BufferUtil.newDoubleBuffer(capacity);
+ return DoubleBuffer.allocate(capacity);
}
protected void expandPositionBuffer(int minCapacity)
Index: WorldWind/src/gov/nasa/worldwind/util/TextureAtlasElement.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/TextureAtlasElement.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/TextureAtlasElement.java (working copy)
@@ -6,7 +6,7 @@
package gov.nasa.worldwind.util;
-import com.sun.opengl.util.texture.TextureCoords;
+import com.jogamp.opengl.util.texture.TextureCoords;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.render.DrawContext;
Index: WorldWind/src/gov/nasa/worldwind/util/GLUTessellatorSupport.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/GLUTessellatorSupport.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/GLUTessellatorSupport.java (working copy)
@@ -7,7 +7,7 @@
import gov.nasa.worldwind.geom.Vec4;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import java.util.*;
@@ -127,7 +127,7 @@
*
* @throws IllegalArgumentException if the GL is null.
*/
- public static GLUtessellatorCallback createOGLDrawPrimitivesCallback(GL gl)
+ public static GLUtessellatorCallback createOGLDrawPrimitivesCallback(GL2 gl)
{
if (gl == null)
{
@@ -141,9 +141,9 @@
protected static class OGLDrawPrimitivesCallback extends GLUtessellatorCallbackAdapter
{
- protected final GL gl;
+ protected final GL2 gl;
- public OGLDrawPrimitivesCallback(GL gl)
+ public OGLDrawPrimitivesCallback(GL2 gl)
{
if (gl == null)
{
Index: WorldWind/src/gov/nasa/worldwind/util/TextureAtlas.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/TextureAtlas.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/TextureAtlas.java (working copy)
@@ -6,12 +6,13 @@
package gov.nasa.worldwind.util;
-import com.sun.opengl.impl.packrect.*;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.packrect.*;
+import com.jogamp.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.awt.*;
import gov.nasa.worldwind.exception.WWRuntimeException;
import gov.nasa.worldwind.render.DrawContext;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.awt.image.*;
import java.util.*;
@@ -55,6 +56,11 @@
disposeBackingImage();
}
+ public boolean canCompact()
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
/**
* {@inheritDoc}
*
@@ -76,10 +82,13 @@
*
* @throws WWRuntimeException if this backing store cannot fit the rectangle in its layout.
*/
- public void additionFailed(Rect cause, int attemptNumber)
+ public boolean additionFailed(Rect cause, int attemptNumber)
{
- if (!isEvictOldElements() || !removeLeastRecentlyUsedEntry())
+ if (!isEvictOldElements() || !removeLeastRecentlyUsedEntry()){
throw new WWRuntimeException(Logging.getMessage("TextureAtlas.AtlasIsFull"));
+ }
+ return true;
+
}
/**
@@ -96,8 +105,7 @@
/**
* {@inheritDoc}
*
- * Calls {@link TextureAtlas#moveEntry(java.awt.image.BufferedImage, com.sun.opengl.impl.packrect.Rect,
- * java.awt.image.BufferedImage, com.sun.opengl.impl.packrect.Rect)}, casting the specified backing stores to
+ * Calls and cast the specified backing stores to
* BufferedImages.
*/
public void move(Object oldBackingStore, Rect oldLocation, Object newBackingStore, Rect newLocation)
@@ -775,7 +783,7 @@
Texture texture = this.syncTexture(dc);
if (texture != null)
{
- texture.bind();
+ texture.bind(dc.getGL());
return true;
}
else
@@ -1172,7 +1180,7 @@
protected Texture makeTextureWithBackingImage(DrawContext dc)
{
BufferedImage backingImage = (BufferedImage) this.rectPacker.getBackingStore();
- Texture texture = TextureIO.newTexture(backingImage, this.isUseMipMaps());
+ Texture texture = AWTTextureIO.newTexture(dc.getGL().getGLProfile(), backingImage, this.isUseMipMaps());
this.setTexture(dc, texture);
this.setTextureParameters(dc);
@@ -1208,8 +1216,9 @@
// system.
BufferedImage backingImage = (BufferedImage) this.rectPacker.getBackingStore();
BufferedImage subImage = backingImage.getSubimage(rect.x, rect.y, rect.width, rect.height);
- TextureData subTextureData = TextureIO.newTextureData(subImage, false); // No need for sub-image mip-maps.
- texture.updateSubImage(subTextureData, 0, rect.x, rect.y);
+ TextureData subTextureData = AWTTextureIO.newTextureData(dc.getGL().getGLProfile(),
+ subImage, false); // No need for sub-image mip-maps.
+ texture.updateSubImage(dc.getGL(),subTextureData, 0, rect.x, rect.y);
}
else
{
@@ -1218,7 +1227,8 @@
// respecify the texture parameters, because Texture.updateImage overwrites the texture parameters with
// default values.
BufferedImage backingImage = (BufferedImage) this.rectPacker.getBackingStore();
- texture.updateImage(TextureIO.newTextureData(backingImage, this.isUseMipMaps()));
+ texture.updateImage(dc.getGL(),AWTTextureIO.newTextureData(dc.getGL().getGLProfile(),
+ backingImage, this.isUseMipMaps()));
this.setTextureParameters(dc);
}
Index: WorldWind/src/gov/nasa/worldwind/util/WWIO.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/WWIO.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/WWIO.java (working copy)
@@ -10,7 +10,6 @@
*/
package gov.nasa.worldwind.util;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.Configuration;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.exception.WWRuntimeException;
@@ -800,7 +799,7 @@
bytesRead += count;
}
}
- ByteBuffer buffer = BufferUtil.newByteBuffer(bytes.length); // to get a jogl-compatible buffer
+ ByteBuffer buffer = ByteBuffer.allocate(bytes.length); // to get a jogl-compatible buffer
return buffer.put(bytes);
}
Index: WorldWind/src/gov/nasa/worldwind/util/GeometryBuilder.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/GeometryBuilder.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/GeometryBuilder.java (working copy)
@@ -5,7 +5,6 @@
*/
package gov.nasa.worldwind.util;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.geom.*;
import javax.media.opengl.GL;
@@ -155,8 +154,8 @@
throw new IllegalArgumentException(message);
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(ICOSAHEDRON_INDEX_COUNT);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * ICOSAHEDRON_VERTEX_COUNT);
+ IntBuffer indexBuffer = IntBuffer.allocate(ICOSAHEDRON_INDEX_COUNT);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * ICOSAHEDRON_VERTEX_COUNT);
indexBuffer.put(icosahedronIndexArray, 0, ICOSAHEDRON_INDEX_COUNT);
vertexBuffer.put(icosahedronVertexArray, 0, 3 * ICOSAHEDRON_VERTEX_COUNT);
@@ -296,8 +295,8 @@
throw new IllegalArgumentException(message);
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(BOX_INDEX_COUNT);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * BOX_VERTEX_COUNT);
+ IntBuffer indexBuffer = IntBuffer.allocate(BOX_INDEX_COUNT);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * BOX_VERTEX_COUNT);
indexBuffer.put(boxIndexArray, 0, BOX_INDEX_COUNT);
vertexBuffer.put(boxVertexArray, 0, 3 * BOX_VERTEX_COUNT);
@@ -355,8 +354,8 @@
throw new IllegalArgumentException(message);
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(BOX_INDEX_COUNT / 6);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * BOX_VERTEX_COUNT / 6);
+ IntBuffer indexBuffer = IntBuffer.allocate(BOX_INDEX_COUNT / 6);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * BOX_VERTEX_COUNT / 6);
// fill subset of index buffer
int[] subArray = new int[BOX_INDEX_COUNT / 6];
@@ -498,8 +497,8 @@
throw new IllegalArgumentException(message);
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(PYRAMID_INDEX_COUNT);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * PYRAMID_VERTEX_COUNT);
+ IntBuffer indexBuffer = IntBuffer.allocate(PYRAMID_INDEX_COUNT);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * PYRAMID_VERTEX_COUNT);
indexBuffer.put(pyramidIndexArray, 0, PYRAMID_INDEX_COUNT);
vertexBuffer.put(pyramidVertexArray, 0, 3 * PYRAMID_VERTEX_COUNT);
@@ -564,8 +563,8 @@
faceVertexCount = 4;
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(faceIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * faceVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(faceIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * faceVertexCount);
// fill subset of index buffer
int[] subArray = new int[faceIndexCount];
@@ -694,8 +693,8 @@
int cylinderIndexCount = 12 * slices;
int cylinderVertexCount = 4 * slices + 4;
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(cylinderIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * cylinderVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(cylinderIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * cylinderVertexCount);
// VERTICES
@@ -859,8 +858,8 @@
cylinderVertexCount = 2 * slices + 2;
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(cylinderIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * cylinderVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(cylinderIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * cylinderVertexCount);
// VERTICES
@@ -1031,8 +1030,8 @@
int wedgeIndexCount = 12 * slices + 12;
int wedgeVertexCount = 4 * (slices + 1) + 2 + 8;
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(wedgeIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * wedgeVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(wedgeIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * wedgeVertexCount);
// VERTICES
@@ -1236,8 +1235,8 @@
wedgeVertexCount = 2 * slices + 2;
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(wedgeIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * wedgeVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(wedgeIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * wedgeVertexCount);
// VERTICES
@@ -1428,8 +1427,8 @@
int coneIndexCount = 12 * slices;
int coneVertexCount = 4 * slices + 4;
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(coneIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * coneVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(coneIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * coneVertexCount);
// VERTICES
@@ -1574,8 +1573,8 @@
coneVertexCount = 2 * slices + 2;
}
- IntBuffer indexBuffer = BufferUtil.newIntBuffer(coneIndexCount);
- FloatBuffer vertexBuffer = BufferUtil.newFloatBuffer(3 * coneVertexCount);
+ IntBuffer indexBuffer = IntBuffer.allocate(coneIndexCount);
+ FloatBuffer vertexBuffer = FloatBuffer.allocate(3 * coneVertexCount);
// VERTICES
@@ -6373,7 +6372,7 @@
if (slices <= 1)
{
// The buffer contains one coordinate pair.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(2);
+ FloatBuffer buffer = FloatBuffer.allocate(2);
buffer.put(x + majorRadius);
buffer.put(y);
buffer.rewind();
@@ -6384,7 +6383,7 @@
float angle = 0;
// The buffer contains one coordinate pair per slice.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(2 * slices);
+ FloatBuffer buffer = FloatBuffer.allocate(2 * slices);
// Add each vertex on the circumference of the ellipse, starting at zero and ending one step before 360.
for (int i = 0; i < slices; i++, angle += step)
@@ -6474,7 +6473,7 @@
if (slices <= 1)
{
// The buffer contains one coordinate pair.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(2);
+ FloatBuffer buffer = FloatBuffer.allocate(2);
buffer.put(x + majorRadius);
buffer.put(y);
buffer.rewind();
@@ -6537,7 +6536,7 @@
float angle = startAngle + leaderAngle / 2f;
// The buffer contains one coordinate pair per slice, and three coordinate pairs for the leader.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(2 * slices + 6);
+ FloatBuffer buffer = FloatBuffer.allocate(2 * slices + 6);
// Start in the leader right corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + (float) Math.cos(startAngle + leaderAngle / 2f) * majorRadius);
buffer.put(y + (float) Math.sin(startAngle + leaderAngle / 2f) * minorRadius);
@@ -6597,7 +6596,7 @@
}
// The buffer contains eight coordinate pairs: two pairs for each corner.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(8);
+ FloatBuffer buffer = FloatBuffer.allocate(8);
// Lower left corner.
buffer.put(x);
buffer.put(y);
@@ -6686,7 +6685,7 @@
float piOver2 = (float) Math.PI / 2f;
// The buffer contains four coordinate pairs for each corner, and two coordinate pairs per corner vertex.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(16 + 8 * (cornerSlices - 1));
+ FloatBuffer buffer = FloatBuffer.allocate(16 + 8 * (cornerSlices - 1));
// Lower left corner.
buffer.put(x);
buffer.put(y + cornerRadius);
@@ -6792,7 +6791,7 @@
leaderWidth = width;
// The buffer contains seven xy coordinate pairs: two pairs for each corner and three pairs for the leader.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(14);
+ FloatBuffer buffer = FloatBuffer.allocate(14);
// Start in the leader right corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + width / 2f + leaderWidth / 2f);
buffer.put(y);
@@ -6825,7 +6824,7 @@
leaderWidth = width;
// The buffer contains seven xy coordinate pairs: two pairs for each corner and three pairs for the leader.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(14);
+ FloatBuffer buffer = FloatBuffer.allocate(14);
// Start in the leader left corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + width / 2f - leaderWidth / 2f);
buffer.put(y + height);
@@ -6861,7 +6860,7 @@
}
// The buffer contains seven xy coordinate pairs: two pairs for each corner and three pairs for the leader.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(14);
+ FloatBuffer buffer = FloatBuffer.allocate(14);
// Start in the leader bottom corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x);
buffer.put(y + height / 2f - leaderWidth / 2f);
@@ -6897,7 +6896,7 @@
}
// The buffer contains seven xy coordinate pairs: two pairs for each corner and three pairs for the leader.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(14);
+ FloatBuffer buffer = FloatBuffer.allocate(14);
// Start in the leader top corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + width);
buffer.put(y + height / 2f + leaderWidth / 2f);
@@ -7040,7 +7039,7 @@
// The buffer contains two coordinate pairs for each corner, three coordinate pairs for the leader, and two
// coordinate pairs per corner vertex.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(22 + 8 * (cornerSlices - 1));
+ FloatBuffer buffer = FloatBuffer.allocate(22 + 8 * (cornerSlices - 1));
// Start in the leader right corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + width / 2f + leaderWidth / 2f);
buffer.put(y);
@@ -7092,7 +7091,7 @@
// The buffer contains two coordinate pairs for each corner, three coordinate pairs for the leader, and two
// coordinate pairs per corner vertex.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(22 + 8 * (cornerSlices - 1));
+ FloatBuffer buffer = FloatBuffer.allocate(22 + 8 * (cornerSlices - 1));
// Start in the leader left corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + width / 2f - leaderWidth / 2f);
buffer.put(y + height);
@@ -7144,7 +7143,7 @@
// The buffer contains two coordinate pairs for each corner, three coordinate pairs for the leader, and two
// coordinate pairs per corner vertex.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(22 + 8 * (cornerSlices - 1));
+ FloatBuffer buffer = FloatBuffer.allocate(22 + 8 * (cornerSlices - 1));
// Start in the leader bottom corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x);
buffer.put(y + height / 2f - leaderWidth / 2f);
@@ -7196,7 +7195,7 @@
// The buffer contains two coordinate pairs for each corner, three coordinate pairs for the leader, and two
// coordinate pairs per corner vertex.
- FloatBuffer buffer = BufferUtil.newFloatBuffer(22 + 8 * (cornerSlices - 1));
+ FloatBuffer buffer = FloatBuffer.allocate(22 + 8 * (cornerSlices - 1));
// Start in the leader top corner to ensure the vertices can be drawn as a triangle fan.
buffer.put(x + width);
buffer.put(y + height / 2f + leaderWidth / 2f);
@@ -7368,7 +7367,7 @@
{
IntBuffer copy;
- copy = BufferUtil.newIntBuffer(newLength);
+ copy = IntBuffer.allocate(newLength);
original.rewind();
copy.put(original);
@@ -7379,7 +7378,7 @@
{
FloatBuffer copy;
- copy = BufferUtil.newFloatBuffer(newLength);
+ copy = FloatBuffer.allocate(newLength);
original.rewind();
copy.put(original);
Index: WorldWind/src/gov/nasa/worldwind/util/OGLStackHandler.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/OGLStackHandler.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/OGLStackHandler.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.util;
-import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
/**
* @author tag
@@ -34,40 +34,40 @@
|| this.texturePushed;
}
- public void pushAttrib(GL gl, int mask)
+ public void pushAttrib(GL2 gl, int mask)
{
gl.glPushAttrib(mask);
this.attribsPushed = true;
}
- public void pushClientAttrib(GL gl, int mask)
+ public void pushClientAttrib(GL2 gl, int mask)
{
gl.glPushClientAttrib(mask);
this.clientAttribsPushed = true;
}
- public void pushModelview(GL gl)
+ public void pushModelview(GL2 gl)
{
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPushMatrix();
this.modelviewPushed = true;
}
- public void pushProjection(GL gl)
+ public void pushProjection(GL2 gl)
{
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glPushMatrix();
this.projectionPushed = true;
}
- public void pushTexture(GL gl)
+ public void pushTexture(GL2 gl)
{
- gl.glMatrixMode(GL.GL_TEXTURE);
+ gl.glMatrixMode(GL2.GL_TEXTURE);
gl.glPushMatrix();
this.texturePushed = true;
}
- public void pop(GL gl)
+ public void pop(GL2 gl)
{
if (this.attribsPushed)
{
@@ -83,45 +83,45 @@
if (this.modelviewPushed)
{
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glPopMatrix();
this.modelviewPushed = false;
}
if (this.projectionPushed)
{
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glPopMatrix();
this.projectionPushed = false;
}
if (this.texturePushed)
{
- gl.glMatrixMode(GL.GL_TEXTURE);
+ gl.glMatrixMode(GL2.GL_TEXTURE);
gl.glPopMatrix();
this.texturePushed = false;
}
}
- public void pushModelviewIdentity(GL gl)
+ public void pushModelviewIdentity(GL2 gl)
{
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
this.modelviewPushed = true;
gl.glPushMatrix();
gl.glLoadIdentity();
}
- public void pushProjectionIdentity(GL gl)
+ public void pushProjectionIdentity(GL2 gl)
{
- gl.glMatrixMode(GL.GL_PROJECTION);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
this.projectionPushed = true;
gl.glPushMatrix();
gl.glLoadIdentity();
}
- public void pushTextureIdentity(GL gl)
+ public void pushTextureIdentity(GL2 gl)
{
- gl.glMatrixMode(GL.GL_TEXTURE);
+ gl.glMatrixMode(GL2.GL_TEXTURE);
this.texturePushed = true;
gl.glPushMatrix();
gl.glLoadIdentity();
Index: WorldWind/src/gov/nasa/worldwind/util/BufferWrapper.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/BufferWrapper.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/BufferWrapper.java (working copy)
@@ -8,7 +8,7 @@
import gov.nasa.worldwind.avlist.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.nio.*;
/**
@@ -1245,7 +1245,7 @@
public int getGLDataType()
{
- return GL.GL_INT;
+ return GL2.GL_INT;
}
public long getSizeInBytes()
@@ -1687,7 +1687,7 @@
public int getGLDataType()
{
- return GL.GL_DOUBLE;
+ return GL2.GL_DOUBLE;
}
public long getSizeInBytes()
Index: WorldWind/src/gov/nasa/worldwind/util/OGLTextRenderer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/OGLTextRenderer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/OGLTextRenderer.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.util;
-import com.sun.opengl.util.j2d.TextRenderer;
+import com.jogamp.opengl.util.awt.TextRenderer;
import gov.nasa.worldwind.render.TextRendererCache;
/**
Index: WorldWind/src/gov/nasa/worldwind/util/OGLUtil.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/OGLUtil.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/OGLUtil.java (working copy)
@@ -7,7 +7,7 @@
import gov.nasa.worldwind.geom.Vec4;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
/**
* A collection of OpenGL utility methods, all static.
@@ -17,19 +17,19 @@
*/
public class OGLUtil
{
- public final static int DEFAULT_TEX_ENV_MODE = GL.GL_MODULATE;
- public final static int DEFAULT_TEXTURE_GEN_MODE = GL.GL_EYE_LINEAR;
+ public final static int DEFAULT_TEX_ENV_MODE = GL2.GL_MODULATE;
+ public final static int DEFAULT_TEXTURE_GEN_MODE = GL2.GL_EYE_LINEAR;
public final static double[] DEFAULT_TEXTURE_GEN_S_OBJECT_PLANE = new double[] {1, 0, 0, 0};
public final static double[] DEFAULT_TEXTURE_GEN_T_OBJECT_PLANE = new double[] {0, 1, 0, 0};
public final static int DEFAULT_SRC0_RGB = GL.GL_TEXTURE;
- public final static int DEFAULT_SRC1_RGB = GL.GL_PREVIOUS;
- public final static int DEFAULT_SRC2_RGB = GL.GL_CONSTANT;
+ public final static int DEFAULT_SRC1_RGB = GL2.GL_PREVIOUS;
+ public final static int DEFAULT_SRC2_RGB = GL2.GL_CONSTANT;
public final static int DEFAULT_SRC0_ALPHA = GL.GL_TEXTURE;
- public final static int DEFAULT_SRC1_ALPHA = GL.GL_PREVIOUS;
- public final static int DEFAULT_SRC2_ALPHA = GL.GL_CONSTANT;
- public final static int DEFAULT_COMBINE_ALPHA = GL.GL_MODULATE;
- public final static int DEFAULT_COMBINE_RGB = GL.GL_MODULATE;
+ public final static int DEFAULT_SRC1_ALPHA = GL2.GL_PREVIOUS;
+ public final static int DEFAULT_SRC2_ALPHA = GL2.GL_CONSTANT;
+ public final static int DEFAULT_COMBINE_ALPHA = GL2.GL_MODULATE;
+ public final static int DEFAULT_COMBINE_RGB = GL2.GL_MODULATE;
protected static final String GL_EXT_BLEND_FUNC_SEPARATE = "GL_EXT_blend_func_separate";
@@ -46,7 +46,7 @@
*
* @throws IllegalArgumentException if the GL is null.
*/
- public static void applyBlending(GL gl, boolean havePremultipliedColors)
+ public static void applyBlending(GL2 gl, boolean havePremultipliedColors)
{
if (gl == null)
{
@@ -55,7 +55,7 @@
throw new IllegalArgumentException(message);
}
- gl.glEnable(GL.GL_ALPHA_TEST);
+ gl.glEnable(GL2.GL_ALPHA_TEST);
gl.glAlphaFunc(GL.GL_GREATER, 0.0f);
if (havePremultipliedColors)
@@ -98,7 +98,7 @@
* @throws IllegalArgumentException if the GL is null, if the Color is null, if the opacity is less than 0, or if
* the opacity is greater than 1.
*/
- public static void applyColor(GL gl, java.awt.Color color, double opacity, boolean premultiplyColors)
+ public static void applyColor(GL2 gl, java.awt.Color color, double opacity, boolean premultiplyColors)
{
if (gl == null)
{
@@ -148,7 +148,7 @@
* @throws IllegalArgumentException if the GL is null, if the Color is null, if the opacity is less than 0, or if
* the opacity is greater than 1.
*/
- public static void applyColor(GL gl, java.awt.Color color, boolean premultiplyColors)
+ public static void applyColor(GL2 gl, java.awt.Color color, boolean premultiplyColors)
{
if (gl == null)
{
@@ -189,7 +189,7 @@
*
* @throws IllegalArgumentException if the GL is null.
*/
- public static void applyLightingDirectionalFromViewer(GL gl, int light, Vec4 direction)
+ public static void applyLightingDirectionalFromViewer(GL2 gl, int light, Vec4 direction)
{
if (gl == null)
{
@@ -206,15 +206,15 @@
float[] specular = {1f, 1f, 1f, 0f};
float[] position = {(float) direction.x, (float) direction.y, (float) direction.z, 0.0f};
- gl.glLightfv(light, GL.GL_AMBIENT, ambient, 0);
- gl.glLightfv(light, GL.GL_DIFFUSE, diffuse, 0);
- gl.glLightfv(light, GL.GL_SPECULAR, specular, 0);
+ gl.glLightfv(light, GL2.GL_AMBIENT, ambient, 0);
+ gl.glLightfv(light, GL2.GL_DIFFUSE, diffuse, 0);
+ gl.glLightfv(light, GL2.GL_SPECULAR, specular, 0);
OGLStackHandler ogsh = new OGLStackHandler();
ogsh.pushModelviewIdentity(gl);
try
{
- gl.glLightfv(light, GL.GL_POSITION, position, 0);
+ gl.glLightfv(light, GL2.GL_POSITION, position, 0);
}
finally
{
@@ -268,69 +268,69 @@
{
// Alpha pixel format.
case GL.GL_ALPHA:
- case GL.GL_ALPHA4:
- case GL.GL_ALPHA8:
- case GL.GL_ALPHA12:
- case GL.GL_ALPHA16:
- case GL.GL_COMPRESSED_ALPHA:
+ case GL2.GL_ALPHA4:
+ case GL2.GL_ALPHA8:
+ case GL2.GL_ALPHA12:
+ case GL2.GL_ALPHA16:
+ case GL2.GL_COMPRESSED_ALPHA:
return GL.GL_ALPHA;
// Luminance pixel format.
- case GL.GL_COMPRESSED_LUMINANCE:
+ case GL2.GL_COMPRESSED_LUMINANCE:
case GL.GL_LUMINANCE:
- case GL.GL_LUMINANCE4:
- case GL.GL_LUMINANCE8:
- case GL.GL_LUMINANCE12:
- case GL.GL_LUMINANCE16:
- case GL.GL_SLUMINANCE:
- case GL.GL_SLUMINANCE8:
+ case GL2.GL_LUMINANCE4:
+ case GL2.GL_LUMINANCE8:
+ case GL2.GL_LUMINANCE12:
+ case GL2.GL_LUMINANCE16:
+ case GL2.GL_SLUMINANCE:
+ case GL2.GL_SLUMINANCE8:
return GL.GL_LUMINANCE;
// Luminance-alpha pixel format.
- case GL.GL_COMPRESSED_LUMINANCE_ALPHA:
+ case GL2.GL_COMPRESSED_LUMINANCE_ALPHA:
case GL.GL_LUMINANCE_ALPHA:
- case GL.GL_LUMINANCE4_ALPHA4:
- case GL.GL_LUMINANCE6_ALPHA2:
- case GL.GL_LUMINANCE8_ALPHA8:
- case GL.GL_LUMINANCE12_ALPHA4:
- case GL.GL_LUMINANCE12_ALPHA12:
- case GL.GL_LUMINANCE16_ALPHA16:
- case GL.GL_SLUMINANCE_ALPHA:
- case GL.GL_SLUMINANCE8_ALPHA8:
+ case GL2.GL_LUMINANCE4_ALPHA4:
+ case GL2.GL_LUMINANCE6_ALPHA2:
+ case GL2.GL_LUMINANCE8_ALPHA8:
+ case GL2.GL_LUMINANCE12_ALPHA4:
+ case GL2.GL_LUMINANCE12_ALPHA12:
+ case GL2.GL_LUMINANCE16_ALPHA16:
+ case GL2.GL_SLUMINANCE_ALPHA:
+ case GL2.GL_SLUMINANCE8_ALPHA8:
return GL.GL_LUMINANCE_ALPHA;
// Unspecified single component (red) pixel format.
- case GL.GL_COMPRESSED_INTENSITY:
- case GL.GL_DEPTH_COMPONENT:
+ case GL2.GL_COMPRESSED_INTENSITY:
+ case GL2.GL_DEPTH_COMPONENT:
case GL.GL_DEPTH_COMPONENT16:
case GL.GL_DEPTH_COMPONENT24:
case GL.GL_DEPTH_COMPONENT32:
- case GL.GL_INTENSITY:
- case GL.GL_INTENSITY4:
- case GL.GL_INTENSITY8:
- case GL.GL_INTENSITY12:
- case GL.GL_INTENSITY16:
- return GL.GL_RED;
+ case GL2.GL_INTENSITY:
+ case GL2.GL_INTENSITY4:
+ case GL2.GL_INTENSITY8:
+ case GL2.GL_INTENSITY12:
+ case GL2.GL_INTENSITY16:
+ return GL2.GL_RED;
// RGB pixel format.
- case GL.GL_COMPRESSED_RGB:
- case GL.GL_R3_G3_B2:
+ case GL2.GL_COMPRESSED_RGB:
+ case GL2.GL_R3_G3_B2:
case GL.GL_RGB:
- case GL.GL_RGB4:
- case GL.GL_RGB5:
+ case GL2.GL_RGB4:
+ case GL2.GL_RGB5:
case GL.GL_RGB8:
case GL.GL_RGB10:
- case GL.GL_RGB12:
- case GL.GL_RGB16:
+ case GL2.GL_RGB12:
+ case GL2.GL_RGB16:
case GL.GL_SRGB:
- case GL.GL_SRGB8:
+ case GL2.GL_SRGB8:
return GL.GL_RGB;
// RGBA pixel format.
- case GL.GL_COMPRESSED_RGBA:
+ case GL2.GL_COMPRESSED_RGBA:
case GL.GL_RGBA:
- case GL.GL_RGBA2:
+ case GL2.GL_RGBA2:
case GL.GL_RGBA4:
case GL.GL_RGB5_A1:
case GL.GL_RGBA8:
case GL.GL_RGB10_A2:
- case GL.GL_RGBA12:
- case GL.GL_RGBA16:
+ case GL2.GL_RGBA12:
+ case GL2.GL_RGBA16:
case GL.GL_SRGB_ALPHA:
case GL.GL_SRGB8_ALPHA8:
return GL.GL_RGBA;
@@ -420,56 +420,56 @@
switch (internalFormat)
{
// 4 bits per pixel.
- case GL.GL_ALPHA4:
- case GL.GL_LUMINANCE4:
- case GL.GL_INTENSITY4:
+ case GL2.GL_ALPHA4:
+ case GL2.GL_LUMINANCE4:
+ case GL2.GL_INTENSITY4:
return numPixels / 2;
// 8 bits per pixel.
case GL.GL_ALPHA:
- case GL.GL_ALPHA8:
+ case GL2.GL_ALPHA8:
case GL.GL_LUMINANCE:
- case GL.GL_LUMINANCE8:
- case GL.GL_LUMINANCE4_ALPHA4:
- case GL.GL_LUMINANCE6_ALPHA2:
- case GL.GL_INTENSITY:
- case GL.GL_INTENSITY8:
- case GL.GL_R3_G3_B2:
- case GL.GL_RGBA2:
- case GL.GL_SLUMINANCE:
- case GL.GL_SLUMINANCE8:
+ case GL2.GL_LUMINANCE8:
+ case GL2.GL_LUMINANCE4_ALPHA4:
+ case GL2.GL_LUMINANCE6_ALPHA2:
+ case GL2.GL_INTENSITY:
+ case GL2.GL_INTENSITY8:
+ case GL2.GL_R3_G3_B2:
+ case GL2.GL_RGBA2:
+ case GL2.GL_SLUMINANCE:
+ case GL2.GL_SLUMINANCE8:
return numPixels;
// 12 bits per pixel.
- case GL.GL_ALPHA12:
- case GL.GL_LUMINANCE12:
- case GL.GL_INTENSITY12:
- case GL.GL_RGB4:
+ case GL2.GL_ALPHA12:
+ case GL2.GL_LUMINANCE12:
+ case GL2.GL_INTENSITY12:
+ case GL2.GL_RGB4:
return 12 * numPixels / 8;
// 16 bits per pixel.
- case GL.GL_ALPHA16:
+ case GL2.GL_ALPHA16:
case GL.GL_DEPTH_COMPONENT16:
- case GL.GL_LUMINANCE16:
+ case GL2.GL_LUMINANCE16:
case GL.GL_LUMINANCE_ALPHA:
- case GL.GL_LUMINANCE8_ALPHA8:
- case GL.GL_LUMINANCE12_ALPHA4:
- case GL.GL_INTENSITY16:
- case GL.GL_RGB5: // Assume the driver allocates 16 bits per pixel for GL_RGB5.
+ case GL2.GL_LUMINANCE8_ALPHA8:
+ case GL2.GL_LUMINANCE12_ALPHA4:
+ case GL2.GL_INTENSITY16:
+ case GL2.GL_RGB5: // Assume the driver allocates 16 bits per pixel for GL_RGB5.
case GL.GL_RGBA4:
case GL.GL_RGB5_A1:
- case GL.GL_SLUMINANCE_ALPHA:
- case GL.GL_SLUMINANCE8_ALPHA8:
+ case GL2.GL_SLUMINANCE_ALPHA:
+ case GL2.GL_SLUMINANCE8_ALPHA8:
return 2 * numPixels;
// 24 bits per pixel.
- case GL.GL_DEPTH_COMPONENT:
+ case GL2.GL_DEPTH_COMPONENT:
case GL.GL_DEPTH_COMPONENT24:
- case GL.GL_LUMINANCE12_ALPHA12:
+ case GL2.GL_LUMINANCE12_ALPHA12:
case GL.GL_RGB:
case GL.GL_RGB8:
case GL.GL_SRGB:
- case GL.GL_SRGB8:
+ case GL2.GL_SRGB8:
return 3 * numPixels;
// 32 bits per pixel.
case GL.GL_DEPTH_COMPONENT32:
- case GL.GL_LUMINANCE16_ALPHA16:
+ case GL2.GL_LUMINANCE16_ALPHA16:
case GL.GL_RGB10: // Assume the driver allocates 32 bits per pixel for GL_RGB10.
case GL.GL_RGBA:
case GL.GL_RGBA8:
@@ -478,22 +478,22 @@
case GL.GL_SRGB8_ALPHA8:
return 4 * numPixels;
// 36 bits per pixel.
- case GL.GL_RGB12:
+ case GL2.GL_RGB12:
return 36 * numPixels / 8;
// 48 bits per pixel.
- case GL.GL_RGB16:
- case GL.GL_RGBA12:
+ case GL2.GL_RGB16:
+ case GL2.GL_RGBA12:
return 6 * numPixels;
// 64 bits per pixel.
- case GL.GL_RGBA16:
+ case GL2.GL_RGBA16:
return 8 * numPixels;
// Compressed internal formats. Don't try to estimate a size for compressed formats.
- case GL.GL_COMPRESSED_ALPHA:
- case GL.GL_COMPRESSED_LUMINANCE:
- case GL.GL_COMPRESSED_LUMINANCE_ALPHA:
- case GL.GL_COMPRESSED_INTENSITY:
- case GL.GL_COMPRESSED_RGB:
- case GL.GL_COMPRESSED_RGBA:
+ case GL2.GL_COMPRESSED_ALPHA:
+ case GL2.GL_COMPRESSED_LUMINANCE:
+ case GL2.GL_COMPRESSED_LUMINANCE_ALPHA:
+ case GL2.GL_COMPRESSED_INTENSITY:
+ case GL2.GL_COMPRESSED_RGB:
+ case GL2.GL_COMPRESSED_RGBA:
return 0;
default:
return 0;
Index: WorldWind/src/gov/nasa/worldwind/util/OGLRenderToTextureSupport.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/OGLRenderToTextureSupport.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/OGLRenderToTextureSupport.java (working copy)
@@ -5,10 +5,10 @@
*/
package gov.nasa.worldwind.util;
-import com.sun.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.Texture;
import gov.nasa.worldwind.render.DrawContext;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
/**
* OGLRenderToTextureSupport encapsulates the pattern of rendering GL commands to a destination texture. Currently only
@@ -221,7 +221,7 @@
throw new IllegalArgumentException(message);
}
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
this.drawRegion = new java.awt.Rectangle(x, y, width, height);
@@ -230,9 +230,9 @@
this.stackHandler.pushAttrib(gl,
GL.GL_COLOR_BUFFER_BIT // For clear color.
| GL.GL_DEPTH_BUFFER_BIT // For depth test and depth mask.
- | GL.GL_SCISSOR_BIT // For scissor test and scissor box.
- | GL.GL_TRANSFORM_BIT // For matrix mode.
- | GL.GL_VIEWPORT_BIT); // For viewport state.
+ | GL2.GL_SCISSOR_BIT // For scissor test and scissor box.
+ | GL2.GL_TRANSFORM_BIT // For matrix mode.
+ | GL2.GL_VIEWPORT_BIT); // For viewport state.
this.stackHandler.pushTextureIdentity(gl);
this.stackHandler.pushProjectionIdentity(gl);
@@ -288,7 +288,7 @@
this.endFramebufferObjectRendering(dc);
}
- this.stackHandler.pop(dc.getGL());
+ this.stackHandler.pop(dc.getGL().getGL2());
this.drawRegion = null;
this.colorTarget = null;
}
@@ -349,8 +349,8 @@
// changing the textures' defining parameters.
// 2. Enables specification of a destination (x, y) offset in texels. This offset corresponds to the
// viewport (x, y) specified by the caller in beginRendering().
- texture.enable();
- texture.bind();
+ texture.enable(gl);
+ texture.bind(gl);
gl.glCopyTexSubImage2D(
texture.getTarget(), // target
0, // level
@@ -359,23 +359,23 @@
}
finally
{
- texture.disable();
+ texture.disable(gl);
}
}
protected void updateMipmaps(DrawContext dc, Texture texture)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
- texture.enable();
- texture.bind();
- gl.glGenerateMipmapEXT(texture.getTarget());
+ texture.enable(gl);
+ texture.bind(gl);
+ gl.glGenerateMipmap(texture.getTarget());
}
finally
{
- texture.disable();
+ texture.disable(gl);
}
}
@@ -392,8 +392,8 @@
int[] framebuffers = new int[1];
GL gl = dc.getGL();
- gl.glGenFramebuffersEXT(1, framebuffers, 0);
- gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, framebuffers[0]);
+ gl.glGenFramebuffers(1, framebuffers, 0);
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, framebuffers[0]);
this.framebufferObject = framebuffers[0];
if (this.framebufferObject == 0)
@@ -410,8 +410,8 @@
int[] framebuffers = new int[] {this.framebufferObject};
GL gl = dc.getGL();
- gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, 0);
- gl.glDeleteFramebuffersEXT(1, framebuffers, 0);
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
+ gl.glDeleteFramebuffers(1, framebuffers, 0);
this.framebufferObject = 0;
}
@@ -423,28 +423,28 @@
// Attach the texture as color attachment 0 to the framebuffer.
if (texture != null)
{
- gl.glFramebufferTexture2DEXT(GL.GL_FRAMEBUFFER_EXT, GL.GL_COLOR_ATTACHMENT0_EXT, GL.GL_TEXTURE_2D,
- texture.getTextureObject(), 0);
+ gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER, GL.GL_COLOR_ATTACHMENT0, GL.GL_TEXTURE_2D,
+ texture.getTextureObject(gl), 0);
this.checkFramebufferStatus(dc);
}
// If the texture is null, detach color attachment 0 from the framebuffer.
else
{
- gl.glFramebufferTexture2DEXT(GL.GL_FRAMEBUFFER_EXT, GL.GL_COLOR_ATTACHMENT0_EXT, GL.GL_TEXTURE_2D, 0, 0);
+ gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER, GL.GL_COLOR_ATTACHMENT0, GL.GL_TEXTURE_2D, 0, 0);
}
}
protected void checkFramebufferStatus(DrawContext dc)
{
- int status = dc.getGL().glCheckFramebufferStatusEXT(GL.GL_FRAMEBUFFER_EXT);
+ int status = dc.getGL().glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
switch (status)
{
// Framebuffer is configured correctly and supported on this hardware.
- case GL.GL_FRAMEBUFFER_COMPLETE_EXT:
+ case GL.GL_FRAMEBUFFER_COMPLETE:
break;
// Framebuffer is configured correctly, but not supported on this hardware.
- case GL.GL_FRAMEBUFFER_UNSUPPORTED_EXT:
+ case GL.GL_FRAMEBUFFER_UNSUPPORTED:
throw new IllegalStateException(getFramebufferStatusString(status));
// Framebuffer is configured incorrectly. This should never happen, but we check anyway.
default:
@@ -456,29 +456,32 @@
{
switch (status)
{
- case GL.GL_FRAMEBUFFER_COMPLETE_EXT:
+ case GL.GL_FRAMEBUFFER_COMPLETE:
return Logging.getMessage("OGL.FramebufferComplete");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
return Logging.getMessage("OGL.FramebufferIncompleteAttachment");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
return Logging.getMessage("OGL.FramebufferIncompleteDimensions");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
return Logging.getMessage("OGL.FramebufferIncompleteDrawBuffer");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT:
- return Logging.getMessage("OGL.FramebufferIncompleteDuplicateAttachment");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT:
+ // TODO: JOGL 2
+ /*case GL2.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT:
+ return Logging.getMessage("OGL.FramebufferIncompleteDuplicateAttachment");*/
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
return Logging.getMessage("OGL.FramebufferIncompleteFormats");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT:
+ // TODO: JOGL 2
+ /*
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT:
return Logging.getMessage("OGL.FramebufferIncompleteLayerCount");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT:
- return Logging.getMessage("OGL.FramebufferIncompleteLayerTargets");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS:
+ return Logging.getMessage("OGL.FramebufferIncompleteLayerTargets");*/
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
return Logging.getMessage("OGL.FramebufferIncompleteMissingAttachment");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT:
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
return Logging.getMessage("OGL.FramebufferIncompleteMultisample");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
return Logging.getMessage("OGL.FramebufferIncompleteReadBuffer");
- case GL.GL_FRAMEBUFFER_UNSUPPORTED_EXT:
+ case GL2.GL_FRAMEBUFFER_UNSUPPORTED:
return Logging.getMessage("OGL.FramebufferUnsupported");
default:
return null;
Index: WorldWind/src/gov/nasa/worldwind/util/VecBuffer.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/VecBuffer.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/VecBuffer.java (working copy)
@@ -948,7 +948,7 @@
throw new IllegalArgumentException(message);
}
- dc.getGL().glColorPointer(this.coordsPerVec, this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
+ dc.getGL().getGL2().glColorPointer(this.coordsPerVec, this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
}
/**
@@ -978,7 +978,7 @@
throw new IllegalArgumentException(message);
}
- dc.getGL().glNormalPointer(this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
+ dc.getGL().getGL2().glNormalPointer(this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
}
/**
@@ -1008,7 +1008,7 @@
throw new IllegalArgumentException(message);
}
- dc.getGL().glVertexPointer(this.coordsPerVec, this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
+ dc.getGL().getGL2().glVertexPointer(this.coordsPerVec, this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
}
/**
@@ -1039,7 +1039,7 @@
throw new IllegalArgumentException(message);
}
- dc.getGL().glTexCoordPointer(this.coordsPerVec, this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
+ dc.getGL().getGL2().glTexCoordPointer(this.coordsPerVec, this.buffer.getGLDataType(), 0, this.buffer.getBackingBuffer());
}
/**
Index: WorldWind/src/gov/nasa/worldwind/util/WWMath.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/WWMath.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/WWMath.java (working copy)
@@ -5,7 +5,6 @@
*/
package gov.nasa.worldwind.util;
-import com.sun.opengl.util.BufferUtil;
import gov.nasa.worldwind.View;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.geom.*;
@@ -1208,7 +1207,7 @@
}
int numIndices = (height - 1) * (2 * width) + (2 * (height - 2));
- IntBuffer buffer = BufferUtil.newIntBuffer(numIndices);
+ IntBuffer buffer = IntBuffer.allocate(numIndices);
int pos;
for (int y = 0; y < height - 1; y++)
@@ -1264,7 +1263,7 @@
}
int numIndices = 2 * (width + height - 2);
- IntBuffer buffer = BufferUtil.newIntBuffer(numIndices);
+ IntBuffer buffer = IntBuffer.allocate(numIndices);
for (int x = 0; x < width; x++)
{
@@ -1331,7 +1330,7 @@
// If the normal buffer is null, create a new one with the capacity to store the same number of vertices as
// the vertex buffer. Otherwise, initialize the normal buffer by setting all normal coordinate to zero.
if (normals == null)
- normals = BufferUtil.newFloatBuffer(3 * numVertices);
+ normals = FloatBuffer.allocate(3 * numVertices);
else
{
for (int i = 0; i < numVertices; i++)
Index: WorldWind/src/gov/nasa/worldwind/util/tree/BasicTreeLayout.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/tree/BasicTreeLayout.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/tree/BasicTreeLayout.java (working copy)
@@ -6,8 +6,8 @@
package gov.nasa.worldwind.util.tree;
-import com.sun.opengl.util.j2d.TextRenderer;
-import com.sun.opengl.util.texture.TextureCoords;
+import com.jogamp.opengl.util.awt.TextRenderer;
+import com.jogamp.opengl.util.texture.TextureCoords;
import gov.nasa.worldwind.WWObjectImpl;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.event.*;
@@ -15,7 +15,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
import java.awt.*;
import java.awt.geom.*;
import java.beans.*;
@@ -698,11 +698,11 @@
*/
protected void pickTextAndIcon(DrawContext dc, Iterable nodes)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
- gl.glBegin(GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
for (NodeLayout layout : nodes)
{
@@ -737,7 +737,7 @@
*/
protected void drawText(DrawContext dc, Iterable nodes)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
TreeAttributes attributes = this.getActiveAttributes();
Color color = attributes.getColor();
@@ -746,7 +746,7 @@
TextRenderer textRenderer = OGLTextRenderer.getOrCreateTextRenderer(dc.getTextRendererCache(),
attributes.getFont(), true, false, false);
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
+ gl.glPolygonMode(GL2.GL_FRONT, GL2.GL_FILL);
try
{
@@ -821,12 +821,12 @@
*/
protected void drawIcons(DrawContext dc, Iterable nodes)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
- gl.glEnable(GL.GL_TEXTURE_2D);
+ gl.glPolygonMode(GL2.GL_FRONT, GL2.GL_FILL);
+ gl.glEnable(GL2.GL_TEXTURE_2D);
TreeAttributes attributes = this.getActiveAttributes();
Dimension iconSize = attributes.getIconSize();
@@ -886,8 +886,8 @@
}
finally
{
- gl.glDisable(GL.GL_TEXTURE_2D);
- gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
+ gl.glDisable(GL2.GL_TEXTURE_2D);
+ gl.glBindTexture(GL2.GL_TEXTURE_2D, 0);
}
}
@@ -905,7 +905,7 @@
// 2) Draw check marks for selected nodes
// 3) Draw checkbox outlines
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
Dimension symbolSize;
@@ -927,7 +927,7 @@
// separate line loop
if (dc.isPickingMode())
{
- gl.glBegin(GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
}
try
{
@@ -943,7 +943,7 @@
if (!dc.isPickingMode())
{
// Draw a hollow box uses a line loop
- gl.glBegin(GL.GL_LINE_LOOP);
+ gl.glBegin(GL2.GL_LINE_LOOP);
try
{
gl.glVertex2f(x + width, y + symbolSize.height + 0.5f);
@@ -1001,16 +1001,16 @@
Dimension selectedSymbolSize = this.getSelectedSymbolSize();
TreeAttributes attributes = this.getActiveAttributes();
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
Color[] colors = attributes.getCheckBoxColor();
try
{
gl.glLineWidth(1f);
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
+ gl.glPolygonMode(GL2.GL_FRONT, GL2.GL_FILL);
// Fill box with a diagonal gradient
- gl.glBegin(GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
for (NodeLayout layout : nodes)
{
@@ -1054,14 +1054,14 @@
Color color = attributes.getColor();
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
// Draw checkmarks for selected nodes
OGLUtil.applyColor(gl, color, 1, false);
try
{
- gl.glEnable(GL.GL_LINE_SMOOTH);
- gl.glBegin(GL.GL_LINES);
+ gl.glEnable(GL2.GL_LINE_SMOOTH);
+ gl.glBegin(GL2.GL_LINES);
for (NodeLayout layout : nodes)
{
@@ -1086,7 +1086,7 @@
finally
{
gl.glEnd(); // Lines
- gl.glDisable(GL.GL_LINE_SMOOTH);
+ gl.glDisable(GL2.GL_LINE_SMOOTH);
}
}
@@ -1098,7 +1098,7 @@
*/
protected void drawTriangles(DrawContext dc, Iterable nodes)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
Dimension symbolSize = this.getNodeStateSymbolSize();
@@ -1114,15 +1114,15 @@
Color color = attributes.getColor();
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
+ gl.glPolygonMode(GL2.GL_FRONT, GL2.GL_FILL);
gl.glLineWidth(1f);
OGLUtil.applyColor(gl, color, 1, false);
- gl.glBegin(GL.GL_TRIANGLES);
+ gl.glBegin(GL2.GL_TRIANGLES);
}
else
{
- gl.glBegin(GL.GL_QUADS); // Draw pick areas as rectangles, not triangles
+ gl.glBegin(GL2.GL_QUADS); // Draw pick areas as rectangles, not triangles
}
try
Index: WorldWind/src/gov/nasa/worldwind/util/tree/ScrollFrame.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/tree/ScrollFrame.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/tree/ScrollFrame.java (working copy)
@@ -6,8 +6,8 @@
package gov.nasa.worldwind.util.tree;
-import com.sun.opengl.util.j2d.TextRenderer;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.awt.TextRenderer;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.event.SelectEvent;
@@ -15,7 +15,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import javax.media.opengl.glu.GLU;
import java.awt.*;
import java.awt.event.*;
@@ -966,6 +966,7 @@
protected Texture createTileTexture(int width, int height)
{
TextureData td = new TextureData(
+ GLContext.getCurrentGL().getGLProfile(),
GL.GL_RGBA8, // internal format
width, height, // dimension
0, // border
@@ -993,7 +994,7 @@
};
Texture t = TextureIO.newTexture(td);
- t.bind();
+ t.bind(GLContext.getCurrentGL());
return t;
}
@@ -1512,11 +1513,11 @@
*/
protected void drawContentTiles(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
+ gl.glPolygonMode(GL.GL_FRONT, GL2.GL_FILL);
gl.glEnable(GL.GL_TEXTURE_2D);
// Set up blending with pre-multiplied colors
@@ -1526,7 +1527,7 @@
if (texture == null)
return;
- texture.bind();
+ texture.bind(gl);
for (ContentTile tile : tiles)
{
@@ -1594,7 +1595,7 @@
*/
protected void drawFrame(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler oglStack = new OGLStackHandler();
try
@@ -1756,7 +1757,7 @@
*/
protected void drawTitleBar(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
FrameAttributes attributes = this.getActiveAttributes();
@@ -1807,7 +1808,7 @@
{
// This method is never called during picked, so picking mode is not handled here
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
FrameAttributes attributes = this.getActiveAttributes();
int iconSpace = attributes.getIconSpace();
@@ -1860,7 +1861,7 @@
{
// This method is never called during picked, so picking mode is not handled here
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
FrameAttributes attributes = this.getActiveAttributes();
String frameTitle = this.getFrameTitle();
@@ -1991,7 +1992,7 @@
*/
protected void drawMinimizeButton(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler oglStack = new OGLStackHandler();
try
@@ -2065,17 +2066,17 @@
protected void beginDrawing(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
GLU glu = dc.getGLU();
this.BEogsh.pushAttrib(gl, GL.GL_DEPTH_BUFFER_BIT
| GL.GL_COLOR_BUFFER_BIT
- | GL.GL_ENABLE_BIT
- | GL.GL_CURRENT_BIT
- | GL.GL_POLYGON_BIT // For polygon mode
- | GL.GL_LINE_BIT // For line width
- | GL.GL_TRANSFORM_BIT
- | GL.GL_SCISSOR_BIT);
+ | GL2.GL_ENABLE_BIT
+ | GL2.GL_CURRENT_BIT
+ | GL2.GL_POLYGON_BIT // For polygon mode
+ | GL2.GL_LINE_BIT // For line width
+ | GL2.GL_TRANSFORM_BIT
+ | GL2.GL_SCISSOR_BIT);
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
@@ -2105,7 +2106,7 @@
this.pickSupport.resolvePick(dc, dc.getPickPoint(), dc.getCurrentLayer());
}
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
this.BEogsh.pop(gl);
}
Index: WorldWind/src/gov/nasa/worldwind/util/tree/ScrollBar.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/tree/ScrollBar.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/tree/ScrollBar.java (working copy)
@@ -12,7 +12,7 @@
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
import java.awt.event.*;
@@ -785,24 +785,24 @@
*/
protected void draw(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
OGLStackHandler oglStack = new OGLStackHandler();
try
{
oglStack.pushAttrib(gl,
GL.GL_COLOR_BUFFER_BIT
- | GL.GL_CURRENT_BIT
- | GL.GL_LINE_BIT
- | GL.GL_POLYGON_BIT);
+ | GL2.GL_CURRENT_BIT
+ | GL2.GL_LINE_BIT
+ | GL2.GL_POLYGON_BIT);
gl.glLineWidth(1f);
OGLUtil.applyColor(gl, this.getLineColor(), this.getOpacity(), false);
- gl.glPolygonMode(GL.GL_FRONT, GL.GL_LINE);
+ gl.glPolygonMode(GL.GL_FRONT, GL2.GL_LINE);
try
{
- gl.glBegin(GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
// Draw scroll bar frame
this.drawQuad(dc, this.bounds);
@@ -815,7 +815,7 @@
gl.glEnd();
}
- gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
+ gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
// Draw background gradient
String gradientDirection;
@@ -833,7 +833,7 @@
this.drawQuad(dc, this.scrollKnobBounds);
gl.glEnd();
- gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
+ gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
if (AVKey.VERTICAL.equals(this.getOrientation()))
{
this.drawTriangle(dc, 90, this.scrollUpControlBounds, arrowInsets);
@@ -858,13 +858,13 @@
*/
protected void doPick(DrawContext dc)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
this.pickSupport.clearPickList();
this.pickSupport.beginPicking(dc);
- gl.glBegin(GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
this.drawPickableQuad(dc, this.scrollDownControl, this.scrollDownControlBounds);
this.drawPickableQuad(dc, this.scrollUpControl, this.scrollUpControlBounds);
@@ -893,7 +893,7 @@
*/
protected void drawPickableQuad(DrawContext dc, Object pickObject, Rectangle bounds)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
Color color = dc.getUniquePickColor();
int colorCode = color.getRGB();
@@ -912,7 +912,7 @@
*/
protected void drawQuad(DrawContext dc, Rectangle bounds)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
int minX = (int) bounds.getMinX();
int minY = (int) bounds.getMinY();
@@ -936,7 +936,7 @@
*/
protected void drawTriangle(DrawContext dc, float rotation, Rectangle bounds, Insets insets)
{
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
try
{
Index: WorldWind/src/gov/nasa/worldwind/util/tree/TreeUtil.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/tree/TreeUtil.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/tree/TreeUtil.java (working copy)
@@ -11,7 +11,7 @@
import gov.nasa.worldwind.render.DrawContext;
import gov.nasa.worldwind.util.*;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
/**
@@ -39,7 +39,7 @@
throw new IllegalArgumentException(message);
}
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
Color color = dc.getUniquePickColor();
int colorCode = color.getRGB();
@@ -55,7 +55,7 @@
* @param gl GL
* @param bounds Bounds of the rectangle, in GL coordinates.
*/
- public static void drawRect(GL gl, Rectangle bounds)
+ public static void drawRect(GL2 gl, Rectangle bounds)
{
if (gl == null)
{
@@ -74,7 +74,7 @@
gl.glRecti(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height);
}
- public static void drawRectWithGradient(GL gl, Rectangle bounds, Color color1, Color color2, double opacity, String gradientDirection)
+ public static void drawRectWithGradient(GL2 gl, Rectangle bounds, Color color1, Color color2, double opacity, String gradientDirection)
{
if (gl == null)
{
@@ -90,7 +90,7 @@
throw new IllegalArgumentException(message);
}
- gl.glBegin(GL.GL_QUADS);
+ gl.glBegin(GL2.GL_QUADS);
if (AVKey.HORIZONTAL.equals(gradientDirection))
{
Index: WorldWind/src/gov/nasa/worldwind/util/VecBufferSequence.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/VecBufferSequence.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/VecBufferSequence.java (working copy)
@@ -7,7 +7,7 @@
import gov.nasa.worldwind.render.DrawContext;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
/**
* VecBufferSequence provides storage and retrieval of a sequence of logical VecBuffers in a single VecBuffer that
@@ -309,7 +309,7 @@
throw new IllegalArgumentException(message);
}
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
if (this.haveMultiDrawArrays(dc))
{
Index: WorldWind/src/gov/nasa/worldwind/util/webview/WindowsWebView.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/webview/WindowsWebView.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/webview/WindowsWebView.java (working copy)
@@ -6,7 +6,7 @@
package gov.nasa.worldwind.util.webview;
-import com.sun.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.Texture;
import gov.nasa.worldwind.Configuration;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.exception.WWRuntimeException;
Index: WorldWind/src/gov/nasa/worldwind/util/webview/MacWebView.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/webview/MacWebView.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/webview/MacWebView.java (working copy)
@@ -5,7 +5,7 @@
*/
package gov.nasa.worldwind.util.webview;
-import com.sun.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.Texture;
import gov.nasa.worldwind.Configuration;
import gov.nasa.worldwind.avlist.AVList;
import gov.nasa.worldwind.render.*;
Index: WorldWind/src/gov/nasa/worldwind/util/webview/WebViewTexture.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/util/webview/WebViewTexture.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/util/webview/WebViewTexture.java (working copy)
@@ -5,13 +5,13 @@
*/
package gov.nasa.worldwind.util.webview;
-import com.sun.opengl.util.BufferUtil;
-import com.sun.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.*;
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.Logging;
-import javax.media.opengl.GL;
+import javax.media.opengl.*;
import java.awt.*;
+import java.nio.ByteBuffer;
import java.util.logging.Level;
/**
@@ -70,7 +70,8 @@
{
// Allocate a texture with the proper dimensions and texture internal format, but with no data.
TextureData td = new TextureData(
- GL.GL_RGBA, // texture internal format
+ dc.getGL().getGLProfile(),
+ GL.GL_RGBA,
this.frameSize.width, // texture image with
this.frameSize.height, // texture image height
0, // border
@@ -79,20 +80,20 @@
false, // mipmap
false, // dataIsCompressed
this.flipVertically,
- BufferUtil.newByteBuffer(4 * this.frameSize.width * this.frameSize.height), // buffer
+ ByteBuffer.allocate(4 * this.frameSize.width * this.frameSize.height),
null); // flusher
t = TextureIO.newTexture(td);
dc.getTextureCache().put(imageSource, t);
- t.bind();
+ t.bind(dc.getGL());
// Configure the texture to use nearest-neighbor filtering. This ensures that the texels are aligned exactly
// with screen pixels, and eliminates blurry artifacts from linear filtering.
- GL gl = dc.getGL();
+ GL2 gl = dc.getGL().getGL2();
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
- gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_BORDER);
- gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_BORDER);
+ gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP_TO_BORDER);
+ gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP_TO_BORDER);
}
catch (Exception e)
{
Index: WorldWind/src/gov/nasa/worldwind/WorldWindowGLAutoDrawable.java
===================================================================
--- WorldWind/src/gov/nasa/worldwind/WorldWindowGLAutoDrawable.java (revision 500)
+++ WorldWind/src/gov/nasa/worldwind/WorldWindowGLAutoDrawable.java (working copy)
@@ -150,8 +150,9 @@
throw new IllegalArgumentException(msg);
}
- if (this.drawable != null)
- this.drawable.repaint(); // Queue a JOGL repaint request.
+ // TODO: JOGL 2 drawable.repaint
+ //if (this.drawable != null)
+ // this.drawable.repaint(); // Queue a JOGL repaint request.
}
public GLContext getContext()
@@ -202,6 +203,11 @@
// this.drawable.setGL(new DebugGL(this.drawable.getGL())); // uncomment to use the debug drawable
}
+ public void dispose(GLAutoDrawable drawable)
+ {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
@SuppressWarnings( {"UnusedParameters"})
protected void reinitialize(GLAutoDrawable glAutoDrawable)
{
@@ -271,7 +277,8 @@
{
public void actionPerformed(ActionEvent actionEvent)
{
- drawable.repaint();
+ // TODO: JOGL 2 drawable.repaint
+ //drawable.repaint();
redrawTimer = null;
}
});
@@ -414,7 +421,7 @@
}
/**
- * See {@link GLEventListener#displayChanged(GLAutoDrawable, boolean, boolean)}.
+ * See .
*
* @param glAutoDrawable the drawable
*/
@@ -426,8 +433,9 @@
@Override
public void redraw()
{
- if (this.drawable != null)
- this.drawable.repaint();
+ // TODO: JOGL 2 drawable.repaint
+ //if (this.drawable != null)
+ // this.drawable.repaint();
}
public void redrawNow()
Index: WorldWind/src/com/zebraimaging/ZebraInputHandler.java
===================================================================
--- WorldWind/src/com/zebraimaging/ZebraInputHandler.java (revision 500)
+++ WorldWind/src/com/zebraimaging/ZebraInputHandler.java (working copy)
@@ -3,7 +3,7 @@
import gov.nasa.worldwind.WorldWindow;
import gov.nasa.worldwind.awt.*;
-import javax.media.opengl.GLCanvas;
+import javax.media.opengl.awt.GLCanvas;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
Index: WorldWind/build.xml
===================================================================
--- WorldWind/build.xml (revision 500)
+++ WorldWind/build.xml (working copy)
@@ -53,10 +53,10 @@
includeantruntime="false"
memoryMaximumSize="512m">
-
-
+
+
-
+
@@ -82,10 +82,10 @@
-
-
+
+
-
+
@@ -100,7 +100,7 @@
description="Builds the World Wind core JAR file 'worldwind.jar'.">
-
+