aboutsummaryrefslogtreecommitdiffstats
path: root/src/ru/olamedia/geom/ImmModeMesh.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ru/olamedia/geom/ImmModeMesh.java')
-rw-r--r--src/ru/olamedia/geom/ImmModeMesh.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ru/olamedia/geom/ImmModeMesh.java b/src/ru/olamedia/geom/ImmModeMesh.java
index 4ce419b..0c79d1b 100644
--- a/src/ru/olamedia/geom/ImmModeMesh.java
+++ b/src/ru/olamedia/geom/ImmModeMesh.java
@@ -10,6 +10,8 @@ import javax.media.opengl.GL2ES2;
import javax.media.opengl.GLContext;
import javax.media.opengl.fixedfunc.GLPointerFunc;
+import ru.olamedia.asset.Shader;
+
import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.util.GLArrayDataServer;
@@ -19,7 +21,7 @@ public class ImmModeMesh {
protected GLArrayDataServer interleaved;
protected FloatBuffer buf;
private int vertexCount = 0;
- protected int mode = GL2.GL_QUADS;
+ protected int mode = GL2.GL_QUADS; // FIXME: Use GL.GL_TRIANGLE_FAN or GL.GL_TRIANGLE_STRIP !!
protected boolean isGLSL = false;
protected byte vertexComponent = 0;
protected byte normalComponent = 0;
@@ -163,6 +165,7 @@ public class ImmModeMesh {
}
buf.rewind();
interleaved = buf;
+ interleaved.associate(Shader.getCurrentShaderState(), true); // FIXME: Maybe prefer pass-through, than TLS ctx bound
}
protected final boolean growBufferIfNecessary(int spare) {