From: Diederick Niehorster Date: Mon, 21 May 2012 10:17:55 +0000 (+0000) Subject: fixed C++ code in multi-touch demo (thanks Geoff McLane!) X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=c70337d52d3e2f346ac821bbc301a77ed3f7042c;p=freeglut fixed C++ code in multi-touch demo (thanks Geoff McLane!) git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1320 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/progs/demos/multi-touch/multi-touch.c b/progs/demos/multi-touch/multi-touch.c index 42842de..a68807f 100644 --- a/progs/demos/multi-touch/multi-touch.c +++ b/progs/demos/multi-touch/multi-touch.c @@ -41,20 +41,21 @@ typedef struct cursor { } *Cursor; struct cursor cursors[NUM_DEVICES][NUM_CURSORS]; -void onDisplay() { - glClearColor(0,0,0,1); - glClear(GL_COLOR_BUFFER_BIT); - float square[] = { +static float square[] = { -.5, -.5, .5, -.5, -.5, .5, .5, .5, }; +void onDisplay() { + int d; + glClearColor(0,0,0,1); + glClear(GL_COLOR_BUFFER_BIT); + glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, square); - int d; for (d = 0; d < NUM_DEVICES; d++) { int c; for (c = 0; d < NUM_DEVICES; d++) {