r46949 - in /packages/scilab/branches/5.5/debian: changelog patches/jogl-2.2.diff patches/series
sylvestre at users.alioth.debian.org
sylvestre at users.alioth.debian.org
Thu Nov 6 13:54:34 UTC 2014
Author: sylvestre
Date: Thu Nov 6 13:54:33 2014
New Revision: 46949
URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=46949
Log:
Fix FTBFS with Jogl 2.2 (Closes: #765118)
Added:
packages/scilab/branches/5.5/debian/patches/jogl-2.2.diff
Modified:
packages/scilab/branches/5.5/debian/changelog
packages/scilab/branches/5.5/debian/patches/series
Modified: packages/scilab/branches/5.5/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/branches/5.5/debian/changelog?rev=46949&op=diff
==============================================================================
--- packages/scilab/branches/5.5/debian/changelog (original)
+++ packages/scilab/branches/5.5/debian/changelog Thu Nov 6 13:54:33 2014
@@ -1,3 +1,9 @@
+scilab (5.5.1-3) unstable; urgency=medium
+
+ * Fix FTBFS with Jogl 2.2 (Closes: #765118)
+
+ -- Sylvestre Ledru <sylvestre at debian.org> Thu, 06 Nov 2014 10:54:21 +0100
+
scilab (5.5.1-2) unstable; urgency=medium
* Fix a typo in the patch m4-java-ppc64el.patch
Added: packages/scilab/branches/5.5/debian/patches/jogl-2.2.diff
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/branches/5.5/debian/patches/jogl-2.2.diff?rev=46949&op=file
==============================================================================
--- packages/scilab/branches/5.5/debian/patches/jogl-2.2.diff (added)
+++ packages/scilab/branches/5.5/debian/patches/jogl-2.2.diff Thu Nov 6 13:54:33 2014
@@ -0,0 +1,89 @@
+--- scilab.orig/modules/scirenderer/src/org/scilab/forge/scirenderer/implementation/jogl/JoGLCanvas.java
++++ scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/implementation/jogl/JoGLCanvas.java
+@@ -19,12 +19,14 @@ import org.scilab.forge.scirenderer.implementation.jogl.renderer.JoGLRendererMan
+ import org.scilab.forge.scirenderer.implementation.jogl.texture.JoGLTextureManager;
+ import org.scilab.forge.scirenderer.picking.PickingManager;
+
++import com.jogamp.opengl.util.awt.AWTGLReadBufferUtil;
+ import com.jogamp.opengl.util.awt.ImageUtil;
+-import com.jogamp.opengl.util.awt.Screenshot;
++
+ import java.awt.Dimension;
+ import java.awt.image.BufferedImage;
+ import java.lang.reflect.InvocationTargetException;
+ import java.util.concurrent.Semaphore;
++
+ import javax.media.opengl.DebugGL2;
+ import javax.media.opengl.GL2;
+ import javax.media.opengl.GLAutoDrawable;
+@@ -33,7 +35,7 @@ import javax.media.opengl.GLContext;
+ 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.swing.SwingUtilities;
+
+@@ -154,17 +156,17 @@ public final class JoGLCanvas implements Canvas, GLEventListener {
+
+ @Override
+ public int getWidth() {
+- return autoDrawable.getWidth();
++ return autoDrawable.getSurfaceWidth();
+ }
+
+ @Override
+ public int getHeight() {
+- return autoDrawable.getHeight();
++ return autoDrawable.getSurfaceHeight();
+ }
+
+ @Override
+ public Dimension getDimension() {
+- return new Dimension(autoDrawable.getWidth(), autoDrawable.getHeight());
++ return new Dimension(autoDrawable.getSurfaceWidth(), autoDrawable.getSurfaceHeight());
+ }
+
+ @Override
+@@ -244,14 +246,16 @@ public final class JoGLCanvas implements Canvas, GLEventListener {
+
+ if (SwingUtilities.isEventDispatchThread()) {
+ context.makeCurrent();
+- image[0] = Screenshot.readToBufferedImage(autoDrawable.getWidth(), autoDrawable.getHeight());
++ AWTGLReadBufferUtil buffer = new AWTGLReadBufferUtil(GLProfile.getDefault(), true);
++ image[0] = buffer.readPixelsToBufferedImage(getGl(), 0, 0, autoDrawable.getSurfaceWidth(), autoDrawable.getSurfaceHeight(), false);
+ context.release();
+ } else {
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ context.makeCurrent();
+- image[0] = Screenshot.readToBufferedImage(autoDrawable.getWidth(), autoDrawable.getHeight());
++ AWTGLReadBufferUtil buffer = new AWTGLReadBufferUtil(GLProfile.getDefault(), true);
++ image[0] = buffer.readPixelsToBufferedImage(getGl(), 0, 0, autoDrawable.getSurfaceWidth(), autoDrawable.getSurfaceHeight(), false);
+ context.release();
+ }
+ });
+@@ -271,7 +275,7 @@ public final class JoGLCanvas implements Canvas, GLEventListener {
+ */
+ public void destroy() {
+ if (isOffscreen) {
+- ((GLPbuffer) autoDrawable).destroy();
++ ((GLOffscreenAutoDrawable) autoDrawable).destroy();
+ }
+ try {
+ isValid = false;
+@@ -289,9 +293,11 @@ public final class JoGLCanvas implements Canvas, GLEventListener {
+ */
+ private static GLAutoDrawable getOffscreenDrawable(int width, int height) {
+ GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
++
+ GLCapabilities capabilities = new GLCapabilities(GLProfile.getDefault());
++ capabilities.setPBuffer(true);
+
+- return factory.createGLPbuffer(null, capabilities, null, width, height, null);
++ return factory.createOffscreenAutoDrawable(null, capabilities, null, width, height);
+ }
+
+ // Implementation of function from GLEventListener.
Modified: packages/scilab/branches/5.5/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/branches/5.5/debian/patches/series?rev=46949&op=diff
==============================================================================
--- packages/scilab/branches/5.5/debian/patches/series (original)
+++ packages/scilab/branches/5.5/debian/patches/series Thu Nov 6 13:54:33 2014
@@ -8,3 +8,4 @@
m4-hdf5.patch
m4-java-ppc64el.patch
remove-exit.diff
+jogl-2.2.diff
More information about the debian-science-commits
mailing list