From e43545eec90a88f09a28ef7b1df92ee6bfc24a6c Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Wed, 11 Sep 2013 01:11:03 +0200 Subject: [PATCH] html: fix - maybe some 'dependency injection' might help here behaviour of static vars is kind of nasty with GWT --- vtm/src/org/oscim/renderer/BufferObject.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vtm/src/org/oscim/renderer/BufferObject.java b/vtm/src/org/oscim/renderer/BufferObject.java index 6c16483b..05e5720a 100644 --- a/vtm/src/org/oscim/renderer/BufferObject.java +++ b/vtm/src/org/oscim/renderer/BufferObject.java @@ -25,7 +25,7 @@ import org.oscim.utils.GlUtils; public final class BufferObject { private final static String TAG = BufferObject.class.getName(); - private final static GL20 GL = GLAdapter.get(); + private static GL20 GL; private static final int MB = 1024 * 1024; private static final int LIMIT_BUFFERS = 16 * MB; @@ -208,6 +208,7 @@ public final class BufferObject { } static synchronized void init(int num) { + GL = GLAdapter.get(); createBuffers(GL20.GL_ARRAY_BUFFER, num); counter[0] += num;