29 files changed, 1185 insertions, 0 deletions
diff --git a/src/view/exp004geometry.c b/src/view/exp004geometry.c new file mode 100644 index 0000000..9ff6475 --- a/dev/null +++ b/src/view/exp004geometry.c @@ -0,0 +1,32 @@ +/* I seem to need this for glGenBuffers as per + http://www.gamedev.net/community/forums/topic.asp?topic_id=422358 */ +#define GL_GLEXT_PROTOTYPES + +#include "exp004geometry.h" +#include "exp004state0.h" +#include <GL/glut.h> + +void +exp004geometry (GLenum mode) +{ + glMatrixMode (GL_MODELVIEW); + glLoadIdentity (); + + glPointSize (0.1); + glColor3f (0.2, 0.2, 0.2); + + if (mode == GL_SELECT) + { + for (int i = 0; i < ROWS; i++) + { + glLoadName (i); + glDrawArrays (GL_POINTS, i, 1); + } + } + else + { + glDrawArrays (GL_POINTS, 0, ROWS); + } + + return; +} |