summaryrefslogtreecommitdiffstats
Side-by-side diff
-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 @@
#include "../util/pick_convert.h"
#include <GL/glut.h>
#include <math.h>
+#include <stdlib.h>
/*
* A simple alias to make the code more readable.
@@ -86,8 +87,8 @@ exp004mouse (int button, int state, int x, int y)
* "Specify the array to be used for the returned hit records
* with glSelectBuffer () [Redbook]."
*/
- GLuint select_buf[ROWS];
- glSelectBuffer (ROWS, select_buf);
+ GLuint* select_buf = calloc (S.rows, sizeof (GLuint));
+ glSelectBuffer (S.rows, select_buf);
/*
* "Enter selection mode by specifying GL_SELECT with

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.