summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/controller/exp004mouse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/controller/exp004mouse.c b/src/controller/exp004mouse.c
index 2440c3a..0f3e9d3 100644
--- a/src/controller/exp004mouse.c
+++ b/src/controller/exp004mouse.c
@@ -8,6 +8,7 @@
8#include "../util/pick_convert.h"8#include "../util/pick_convert.h"
9#include <GL/glut.h>9#include <GL/glut.h>
10#include <math.h>10#include <math.h>
11#include <stdlib.h>
1112
12/*13/*
13 * A simple alias to make the code more readable.14 * A simple alias to make the code more readable.
@@ -86,8 +87,8 @@ exp004mouse (int button, int state, int x, int y)
86 * "Specify the array to be used for the returned hit records87 * "Specify the array to be used for the returned hit records
87 * with glSelectBuffer () [Redbook]."88 * with glSelectBuffer () [Redbook]."
88 */89 */
89 GLuint select_buf[ROWS];90 GLuint* select_buf = calloc (S.rows, sizeof (GLuint));
90 glSelectBuffer (ROWS, select_buf);91 glSelectBuffer (S.rows, select_buf);
9192
92 /*93 /*
93 * "Enter selection mode by specifying GL_SELECT with94 * "Enter selection mode by specifying GL_SELECT with

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.