- public void Render(GL gl)
- {
- int[][] ConnectionPoints;
- ConnectionPoints = Cube.getDeafultConnectionPoints();
- int[] ColorsR = {1,1,1,0,0,0};
- int[] ColorsB = {1,1,0,1,1,1};
- int[] ColorsG = {1,0,1,0,1,0}; //Das hier ist nicht weiter wichtig
- gl.glPushMatrix();
- gl.glBegin(GL.GL_QUADS);
- for (int i = 0; i < 6; i++) //Es werden 6 flächen gezeichnet
- {
- gl.glColor3f(ColorsR[i], ColorsB[i], ColorsG[i]);
- for (int j = 0; j < 4; j++) //Mit jeweils 4 Eckpunkten
- {
- gl.glVertex3f //Vertext wird dynamisch mit den zwei forschleifen aufgebaut
- (
- QuadCoords[ConnectionPoints[i][j]].getFloatX(),
- QuadCoords[ConnectionPoints[i][j]].getFloatY(),
- QuadCoords[ConnectionPoints[i][j]].getFloatZ()
- );
- }
- }
- gl.glEnd();
- }