git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1327
7f0cb862-5218-0410-a997-
914c9d46530a
int d;
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
int d;
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
void onMouse(int button, int state, int x, int y) {
if (button == 0) {
cursors[0][0].on = (state == GLUT_DOWN);
void onMouse(int button, int state, int x, int y) {
if (button == 0) {
cursors[0][0].on = (state == GLUT_DOWN);
- cursors[0][0].x = x;
- cursors[0][0].y = y;
+ cursors[0][0].x = (float)x;
+ cursors[0][0].y = (float)y;
printf("normal click\n");
}
}
void onMotion(int x, int y) {
printf("normal click\n");
}
}
void onMotion(int x, int y) {
- cursors[0][0].x = x;
- cursors[0][0].y = y;
+ cursors[0][0].x = (float)x;
+ cursors[0][0].y = (float)y;
}
/* Using FG2.8 (reversed) prototype for now */
}
/* Using FG2.8 (reversed) prototype for now */
}
if (button == 0) {
cursors[0][cursor_id].on = (state == GLUT_DOWN);
}
if (button == 0) {
cursors[0][cursor_id].on = (state == GLUT_DOWN);
- cursors[0][cursor_id].x = x;
- cursors[0][cursor_id].y = y;
+ cursors[0][cursor_id].x = (float)x;
+ cursors[0][cursor_id].y = (float)y;
printf("multi-touch %d click\n", cursor_id);
}
}
printf("multi-touch %d click\n", cursor_id);
}
}
fprintf(stderr, "cursor_id(%d) > NUM_CURSORS(%d)\n", cursor_id, NUM_CURSORS);
return;
}
fprintf(stderr, "cursor_id(%d) > NUM_CURSORS(%d)\n", cursor_id, NUM_CURSORS);
return;
}
- cursors[0][cursor_id].x = x;
- cursors[0][cursor_id].y = y;
+ cursors[0][cursor_id].x = (float)x;
+ cursors[0][cursor_id].y = (float)y;
}
void onReshape(int width, int height) {
}
void onReshape(int width, int height) {
glOrtho(0, width, height, 0, -1, 1);
}
glOrtho(0, width, height, 0, -1, 1);
}