summaryrefslogtreecommitdiffstats
path: root/src/jogamp/graph/curve/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogamp/graph/curve/opengl')
-rw-r--r--src/jogamp/graph/curve/opengl/VBORegion2PGL3.java22
-rw-r--r--src/jogamp/graph/curve/opengl/VBORegionSPES2.java24
2 files changed, 23 insertions, 23 deletions
diff --git a/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java b/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java
index c5182059e..4f2714494 100644
--- a/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java
+++ b/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java
@@ -41,7 +41,7 @@ import com.jogamp.common.nio.Buffers;
import com.jogamp.graph.geom.AABBox;
import com.jogamp.graph.geom.Triangle;
-import com.jogamp.graph.geom.PointTex;
+import com.jogamp.graph.geom.Vertex;
import com.jogamp.graph.curve.Region;
import com.jogamp.opengl.util.PMVMatrix;
@@ -53,8 +53,8 @@ public class VBORegion2PGL3 implements Region{
private IntBuffer t_vboIds;
- private ArrayList<Triangle<PointTex>> triangles = new ArrayList<Triangle<PointTex>>();
- private ArrayList<PointTex> vertices = new ArrayList<PointTex>();
+ private ArrayList<Triangle<Vertex>> triangles = new ArrayList<Triangle<Vertex>>();
+ private ArrayList<Vertex> vertices = new ArrayList<Vertex>();
private GLContext context;
private int numBuffers = 3;
@@ -85,7 +85,7 @@ public class VBORegion2PGL3 implements Region{
GL3 gl = context.getGL().getGL3();
ShortBuffer indicies = Buffers.newDirectShortBuffer(triangles.size() * 3);
- for(Triangle<PointTex> t:triangles){
+ for(Triangle<Vertex> t:triangles){
if(t.getVertices()[0].getId() == Integer.MAX_VALUE){
t.getVertices()[0].setId(numVertices++);
t.getVertices()[1].setId(numVertices++);
@@ -100,9 +100,9 @@ public class VBORegion2PGL3 implements Region{
indicies.put((short) t.getVertices()[2].getId());
}
else{
- PointTex v1 = t.getVertices()[0];
- PointTex v2 = t.getVertices()[1];
- PointTex v3 = t.getVertices()[2];
+ Vertex v1 = t.getVertices()[0];
+ Vertex v2 = t.getVertices()[1];
+ Vertex v3 = t.getVertices()[2];
indicies.put((short) v1.getId());
indicies.put((short) v2.getId());
@@ -112,7 +112,7 @@ public class VBORegion2PGL3 implements Region{
indicies.rewind();
FloatBuffer verticesBuffer = Buffers.newDirectFloatBuffer(vertices.size() * 3);
- for(PointTex v:vertices){
+ for(Vertex v:vertices){
verticesBuffer.put(v.getX());
if(flipped){
verticesBuffer.put(-1*v.getY());
@@ -127,7 +127,7 @@ public class VBORegion2PGL3 implements Region{
verticesBuffer.rewind();
FloatBuffer texCoordBuffer = Buffers.newDirectFloatBuffer(vertices.size() * 2);
- for(PointTex v:vertices){
+ for(Vertex v:vertices){
float[] tex = v.getTexCoord();
texCoordBuffer.put(tex[0]);
texCoordBuffer.put(tex[1]);
@@ -327,7 +327,7 @@ public class VBORegion2PGL3 implements Region{
gl.glBindBuffer(GL3.GL_ARRAY_BUFFER, 0);
}
- public void addTriangles(ArrayList<Triangle<PointTex>> tris) {
+ public void addTriangles(ArrayList<Triangle<Vertex>> tris) {
triangles.addAll(tris);
dirty = true;
}
@@ -336,7 +336,7 @@ public class VBORegion2PGL3 implements Region{
return numVertices;
}
- public void addVertices(ArrayList<PointTex> verts){
+ public void addVertices(ArrayList<Vertex> verts){
vertices.addAll(verts);
numVertices = vertices.size();
dirty = true;
diff --git a/src/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogamp/graph/curve/opengl/VBORegionSPES2.java
index 5ef23d4e0..155d35f0b 100644
--- a/src/jogamp/graph/curve/opengl/VBORegionSPES2.java
+++ b/src/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -37,7 +37,7 @@ import javax.media.opengl.GLContext;
import com.jogamp.common.nio.Buffers;
import com.jogamp.graph.curve.Region;
-import com.jogamp.graph.geom.PointTex;
+import com.jogamp.graph.geom.Vertex;
import com.jogamp.graph.geom.Triangle;
import com.jogamp.opengl.util.PMVMatrix;
@@ -45,8 +45,8 @@ public class VBORegionSPES2 implements Region{
private int numVertices = 0;
private IntBuffer vboIds;
- private ArrayList<Triangle<PointTex>> triangles = new ArrayList<Triangle<PointTex>>();
- private ArrayList<PointTex> vertices = new ArrayList<PointTex>();
+ private ArrayList<Triangle<Vertex>> triangles = new ArrayList<Triangle<Vertex>>();
+ private ArrayList<Vertex> vertices = new ArrayList<Vertex>();
private GLContext context;
@@ -63,8 +63,8 @@ public class VBORegionSPES2 implements Region{
GL2ES2 gl = context.getGL().getGL2ES2();
ShortBuffer indicies = Buffers.newDirectShortBuffer(triangles.size() * 3);
- for(Triangle<PointTex> t:triangles){
- final PointTex[] t_vertices = t.getVertices();
+ for(Triangle<Vertex> t:triangles){
+ final Vertex[] t_vertices = t.getVertices();
if(t_vertices[0].getId() == Integer.MAX_VALUE){
t_vertices[0].setId(numVertices++);
@@ -80,9 +80,9 @@ public class VBORegionSPES2 implements Region{
indicies.put((short) t.getVertices()[2].getId());
}
else{
- PointTex v1 = t_vertices[0];
- PointTex v2 = t_vertices[1];
- PointTex v3 = t_vertices[2];
+ Vertex v1 = t_vertices[0];
+ Vertex v2 = t_vertices[1];
+ Vertex v3 = t_vertices[2];
indicies.put((short) v1.getId());
indicies.put((short) v2.getId());
@@ -92,7 +92,7 @@ public class VBORegionSPES2 implements Region{
indicies.rewind();
FloatBuffer verticesBuffer = Buffers.newDirectFloatBuffer(vertices.size() * 3);
- for(PointTex v:vertices){
+ for(Vertex v:vertices){
verticesBuffer.put(v.getX());
if(flipped){
verticesBuffer.put(-1*v.getY());
@@ -105,7 +105,7 @@ public class VBORegionSPES2 implements Region{
verticesBuffer.rewind();
FloatBuffer texCoordBuffer = Buffers.newDirectFloatBuffer(vertices.size() * 2);
- for(PointTex v:vertices){
+ for(Vertex v:vertices){
float[] tex = v.getTexCoord();
texCoordBuffer.put(tex[0]);
texCoordBuffer.put(tex[1]);
@@ -151,7 +151,7 @@ public class VBORegionSPES2 implements Region{
render();
}
- public void addTriangles(ArrayList<Triangle<PointTex>> tris) {
+ public void addTriangles(ArrayList<Triangle<Vertex>> tris) {
triangles.addAll(tris);
dirty = true;
}
@@ -160,7 +160,7 @@ public class VBORegionSPES2 implements Region{
return numVertices;
}
- public void addVertices(ArrayList<PointTex> verts){
+ public void addVertices(ArrayList<Vertex> verts){
vertices.addAll(verts);
numVertices = vertices.size();
dirty = true;