From dc736fd47fa040ddb5d700bb78b4a0978d1cdb15 Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Fri, 14 Aug 2009 19:19:50 +0000 Subject: Modified to use dynamic memory allocation for the number of nodes. --- 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 #include +#include /* * 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 -- cgit v0.8.3.1-22-g547a