test11.c
上传用户:xk288cn
上传日期:2007-05-28
资源大小:4876k
文件大小:1k
- /* Copyright (c) Mark J. Kilgard, 1994. */
- /* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
- #include <stdio.h>
- #include <stdlib.h>
- #include <GL/glut.h>
- int
- main(int argc, char **argv)
- {
- glutInit(&argc, argv);
- printf("Keyboard: %sn", glutDeviceGet(GLUT_HAS_KEYBOARD) ? "YES" : "no");
- printf("Mouse: %sn", glutDeviceGet(GLUT_HAS_MOUSE) ? "YES" : "no");
- printf("Spaceball: %sn", glutDeviceGet(GLUT_HAS_SPACEBALL) ? "YES" : "no");
- printf("Dials: %sn", glutDeviceGet(GLUT_HAS_DIAL_AND_BUTTON_BOX) ? "YES" : "no");
- printf("Tablet: %snn", glutDeviceGet(GLUT_HAS_TABLET) ? "YES" : "no");
- printf("Mouse buttons: %dn", glutDeviceGet(GLUT_NUM_MOUSE_BUTTONS));
- printf("Spaceball buttons: %dn", glutDeviceGet(GLUT_NUM_SPACEBALL_BUTTONS));
- printf("Button box buttons: %dn", glutDeviceGet(GLUT_NUM_BUTTON_BOX_BUTTONS));
- printf("Dials: %dn", glutDeviceGet(GLUT_NUM_DIALS));
- printf("Tablet buttons: %dnn", glutDeviceGet(GLUT_NUM_TABLET_BUTTONS));
- printf("PASS: test11n");
- return 0; /* ANSI C requires main to return int. */
- }