aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl/src
diff options
context:
space:
mode:
Diffstat (limited to 'ardor3d-jogl/src')
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java
index 2d35f05..7e8adc0 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/JoglTextureStateUtil.java
@@ -62,7 +62,6 @@ import com.ardor3d.util.TextureManager;
import com.ardor3d.util.geom.BufferUtils;
import com.ardor3d.util.stat.StatCollector;
import com.ardor3d.util.stat.StatType;
-import com.jogamp.newt.opengl.GLWindow;
public class JoglTextureStateUtil {
private static final Logger logger = Logger.getLogger(JoglTextureStateUtil.class.getName());
@@ -677,11 +676,10 @@ public class JoglTextureStateUtil {
}
} else {
final GLDrawable drawable = GLContext.getCurrent().getGLDrawable();
- // forces the rebinding when the drawable is offscreen
- final boolean onscreen = !(drawable instanceof GLWindow)
- || ((GLWindow) drawable).getChosenCapabilities().isOnscreen();
+ // forces the rebinding when the drawable uses a frame buffer object
+ final boolean fbo = drawable.getChosenGLCapabilities().isFBO();
// texture already exists in OpenGL, just bind it if needed
- if (!unitRecord.isValid() || unitRecord.boundTexture != textureId || !onscreen) {
+ if (!unitRecord.isValid() || unitRecord.boundTexture != textureId || fbo) {
checkAndSetUnit(i, record, caps);
gl.glBindTexture(getGLType(type), textureId);
if (Constants.stats) {