circle(x, y, d);Draw a circle to the opengl context
Arguments
xThe x position of the circleyThe y position of the circledThe diameter of the circlerect(x, y, w, h);Draw a rectangle to the opengl context
Arguments
xThe x position of the reactangleyThe y position of the reactanglewThe widthhThe heightsquare(x, y, s);Draw a square to the opengl context
Arguments
xThe x position of the squareyThe y position of the squaresThe size of the squareline(x1, y1, x2, y2);Draw a line to the opengl context
Arguments
x1The x position of the first pointy1The y position of the first pointx2The x position of the second pointy2The y position of the second pointquad(x1, y1, x2, y2, x3, y3, x4, y4);Draw a quad on the screen
Arguments
x1The x position of the first pointy1The y position of the first pointx2The x position of the second pointy2The y position of the second pointx3The x position of the third pointy3The y position of the third pointx4The x position of the fourth pointy4The y position of the fourth pointbeginShape(mode);Begin adding vertices to a custom shape
Arguments
modeThe opengl shape mode LINES, POINTS, QUADS, TRIANGLES, TRIANGLE_FANThe following would draw a 100 by 100 square at position 100, 100 The following would draw a 100 by 100 square at position 100, 100
beginShape(QUADS);
vertex(100, 100);
vertex(100, 200);
vertex(200, 200);
vertex(200, 100);
endShape();vertex(x, y);beginShape must be called prior
Adding a vertex to a custom shape
Arguments
xThe x positionyThe y position