fixed C++ code in multi-touch demo (thanks Geoff McLane!)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1320 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
6afd5d5a83
commit
5f3a0d5411
@ -41,20 +41,21 @@ typedef struct cursor {
|
|||||||
} *Cursor;
|
} *Cursor;
|
||||||
struct cursor cursors[NUM_DEVICES][NUM_CURSORS];
|
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,
|
||||||
-.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);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glVertexPointer(2, GL_FLOAT, 0, square);
|
glVertexPointer(2, GL_FLOAT, 0, square);
|
||||||
int d;
|
|
||||||
for (d = 0; d < NUM_DEVICES; d++) {
|
for (d = 0; d < NUM_DEVICES; d++) {
|
||||||
int c;
|
int c;
|
||||||
for (c = 0; d < NUM_DEVICES; d++) {
|
for (c = 0; d < NUM_DEVICES; d++) {
|
||||||
|
Reference in New Issue
Block a user