00001 #include "command.h"
00002 #include <iostream>
00003
00004 using std::cout;
00005 using std::endl;
00006
00007 void
00008 Command::display(void) {
00009
00010 glMatrixMode(GL_PROJECTION);
00011 glLoadIdentity();
00012
00013 gluOrtho2D(0, 1, 0, 1);
00014
00015 glMatrixMode(GL_MODELVIEW);
00016 glLoadIdentity();
00017
00018
00019 glColor3f(1,1,0);
00020 glRasterPos2f(0.5,0.5);
00021 glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_10, 'a');
00022 glColor3f(0,1,0);
00023 glRasterPos2f(0.01,0.01);
00024 glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_10, 'b');
00025 }
00026
00027 void Command::key(unsigned char key, int x, int y) {
00028 msgbuf << key;
00029 cout << msgbuf.str() << endl;
00030 glutPostRedisplay();
00031 }
00032
00033 Command::Command(void) {
00034
00035 }
00036