From 16e5b7e6c14497b932f58ed38fc03c48656fdb09 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 22 Aug 2011 16:48:15 +0200 Subject: Fix regression of commit 6c346d98f04e2355210960fe9ffde47432f04d62, where GLDataArrayHandler throws an exception in cstr if not VBO, but VBO usage is determined later --- src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java index 259b8ae23..d114abe4d 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java @@ -43,10 +43,6 @@ public class GLDataArrayHandler implements GLArrayHandler { public GLDataArrayHandler(GLArrayDataEditable ad) { this.ad = ad; - if(!ad.isVBO()) { - // makes no sense otherwise - throw new GLException("GLDataArrayHandler can only handle VBOs."); - } } public final void addSubHandler(GLArrayHandler handler) { @@ -54,6 +50,10 @@ public class GLDataArrayHandler implements GLArrayHandler { } public final void syncData(GL gl, boolean enable) { + if(!ad.isVBO()) { + // makes no sense otherwise + throw new GLException("GLDataArrayHandler can only handle VBOs."); + } if(enable) { Buffer buffer = ad.getBuffer(); -- cgit v1.2.3