summaryrefslogtreecommitdiffstats
path: root/src/demos/hwShadowmapsSimple
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-10 01:51:47 +0200
committerSven Gothel <[email protected]>2014-07-10 01:51:47 +0200
commit5a00a46bd2c494116b0cd73f98f9fe08bec8528f (patch)
tree5f776c3ac784ddf067d239652490877507e9fcf3 /src/demos/hwShadowmapsSimple
parent548fee0b3d65605ff5cbcbe750564eda1bc611d7 (diff)
Adapt to JOGL commit ec2d94ca26ddab8ec67135ebc5f2d0a43f6a4c25 (Bug 1031: Remove Deprecated Classes and Methods)
Diffstat (limited to 'src/demos/hwShadowmapsSimple')
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
index a53c140..890d906 100644
--- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
+++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
@@ -58,7 +58,8 @@ import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLException;
-import javax.media.opengl.GLPbuffer;
+import javax.media.opengl.GLOffscreenAutoDrawable;
+import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.AWTGLAutoDrawable;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
@@ -133,7 +134,7 @@ public void shutdownDemo() {
super.shutdownDemo();
}
- private GLPbuffer pbuffer;
+ private GLOffscreenAutoDrawable pbuffer;
private GLU glu;
private GLUT glut;
@@ -285,6 +286,7 @@ public void init(GLAutoDrawable drawable) {
// init pbuffer
GLCapabilities caps = new GLCapabilities(gl.getGLProfile());
caps.setDoubleBuffered(false);
+ caps.setPBuffer(true);
if (!GLDrawableFactory.getFactory(gl.getGLProfile()).canCreateGLPbuffer(null, gl.getGLProfile())) {
unavailableExtension("Can not create pbuffer");
@@ -293,7 +295,8 @@ public void init(GLAutoDrawable drawable) {
pbuffer.destroy();
pbuffer = null;
}
- pbuffer = GLDrawableFactory.getFactory(gl.getGLProfile()).createGLPbuffer(null, caps, null, TEX_SIZE, TEX_SIZE, drawable.getContext());
+ pbuffer = GLDrawableFactory.getFactory(GLProfile.getDefault()).createOffscreenAutoDrawable(null, caps, null, TEX_SIZE, TEX_SIZE);
+ pbuffer.setSharedContext(drawable.getContext());
pbuffer.addGLEventListener(new PbufferListener());
doViewAll = true;