aboutsummaryrefslogtreecommitdiffstats
path: root/src/ru/olamedia/geom/MultiMesh.java
blob: 98becd1a5210dd8ffbd4386b1ad4783fcad4906c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package ru.olamedia.geom;

import java.nio.IntBuffer;

import javax.media.opengl.GL2;
import javax.media.opengl.GL2ES2;
import javax.media.opengl.GL3;
import javax.media.opengl.GLContext;

public class MultiMesh {
	private IntBuffer vboIndices;
	private IntBuffer counts;
	private int mode = GL2.GL_TRIANGLES;

	public void clear() {
		vboIndices.clear();
	}

	public void add(ImmModeMesh mesh) {
		vboIndices.put(mesh.getVBOName());
	}

	public void draw() {
		final GL3 gl = GLContext.getCurrentGL().getGL3();
	}

	public MultiMesh(int meshCount) {
		vboIndices = IntBuffer.allocate(meshCount);
	}

	public static MultiMesh allocate(int meshCount) {
		return new MultiMesh(meshCount);
	}
}