aboutsummaryrefslogtreecommitdiffstats
path: root/src/ru/olamedia/geom/ImmModeMesh.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-12-23 13:53:36 +0100
committerSven Gothel <[email protected]>2012-12-23 13:53:36 +0100
commit7cf2ca62bed2a8a9541f09a72d8a26e4f1203de2 (patch)
tree72b37e9a58bee51ba9be3cb8d4b85b722f476161 /src/ru/olamedia/geom/ImmModeMesh.java
parent4bd8df723573250f11afb7b67c7235f8dc8b631e (diff)
Shader: Add 'current' ShaderState setting via GLContext attachement (removed from latest JOGL); Associate created GLArrayDataServer w/ current ShaderState; Add notes re: GL2.GL_QUADS
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) {