/** * Sets the UV-Coordinates for the next vertex to draw. (Has to be called in between start/stop!) **/publicvoidsetUV(floatu, floatv){this.s = u;this.t = v;this.useUV = true; }

/** * Sets the Color for the next vertex to draw. (Has to be called in between start/stop!) **/publicvoidsetColor(floatr,floatg,floatb){this.r = r;this.g = g;this.b = b;this.useColor = true; }

/** * Sets the Position-Offset for the next vertex to draw. (Has to be called in between start/stop!) **/publicvoidsetVertexOffset(floatx, floaty, floatz){this.offX = x;this.offY = y;this.offZ = z; }

/** * Draws a vertex with a UV-Coordinate. (Has to be called in between start/stop!) * * @param x The x-position of the vertex. * @param y The y-position of the vertex. * @param z The z-position of the vertex. * * @param u The u-texCoord of the vertex. * @param v The v-texCoord of the vertex. **/publicvoiddrawVertWithUV(floatx, floaty, floatz, floatu, floatv){this.setUV(u,v);this.drawVert(x,y,z); }

/** * Draws a vertex. (Has to be called in between start/stop!) * * @param x The x-position of the vertex. * @param y The y-position of the vertex. * @param z The z-position of the vertex. **/publicvoiddrawVert(floatx, floaty, floatz){this.vertexBuffer.put(x + this.offX);this.vertexBuffer.put(y + this.offY);this.vertexBuffer.put(z + this.offZ);

Why not keeping the same naming style than in OpenGL like in this class (from JOGL, build-in)?

Yeah, about that:I was in an IRC today, and showed some friends the class, and they immdiately told me that this is not a Tessellator, but rather an immediate drawer.I renamed all the stuff in the class so it fits its name again.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org