From 769b17ac6ebc5ae49fe37eba13d43fea77fdfd40 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Nov 2011 23:52:28 +0100 Subject: OSX: SharedResource add knowledge of NPOT-, RECT- and Float-Texture features, used by pbuffer drawable before a current context. - Also extract getNextPowerOf2() -> GLBuffers (remove redundancy) --- src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/awt/GLJPanel.java') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 92be62b4d..94fb250ce 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -83,6 +83,8 @@ import javax.media.opengl.GLProfile; import javax.media.opengl.GLRunnable; import javax.media.opengl.Threading; import com.jogamp.opengl.util.FBObject; +import com.jogamp.opengl.util.GLBuffers; + import jogamp.opengl.Debug; import jogamp.opengl.GLContextImpl; import jogamp.opengl.GLDrawableFactoryImpl; @@ -776,17 +778,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing if (number == 0) { return 2; } - - if (((number-1) & number) == 0) { - //ex: 8 -> 0b1000; 8-1=7 -> 0b0111; 0b1000&0b0111 == 0 - return number; - } - int power = 0; - while (number > 0) { - number = number>>1; - power++; - } - return (1<