Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
8 Cards in this Set
- Front
- Back
setting up window
|
glutInit(&argc, argv);
glutInitWindowSize(x,y); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutCreateWindow("ellipse"); |
|
setting up camera
|
glMatrixMode(GL_PROJECTION);
glLoadIdentity(); gluOrtho2D(-x,x, -y, y); |
|
callbacks
|
glutDisplayFunc(display);
glutMouseFunc(mouse); glutIdleFunc(idle); glutSpecialFunc(special); glutPassiveMotionFunc(passive); glutEntryFunc(entry); |
|
display
|
glClear();
glFlush(); glutSwapBuffers(); glPostRedisplay(); |
|
mouse
|
button, state, mx, my
|
|
special
|
key, mx, my
switch(key) |
|
seeding random gen
|
srand(time(NULL));
|
|
includes
|
#include <windows.h>
#include <GL/glut.h> #include <ctime> #include <cmath> #include <iostream> |