Professional Documents
Culture Documents
Glut
Glut
Glut
============================
Tham so:
Tham so:
GLUT_RGB
GLUT_INDEX
GLUT_SINGLE
GLUT_DOUBLE
GLUT_ACCUM
GLUT_STENCIL
GLUT_DEPTH
De su dung ket hop cac che do voi nhau, su dung toan tu bitwise OR (|).
tuc la thiet lap man hinh che so sau kieu rai kep o che do RGBA
Tham so:
Chu y: bat buoc phai co, khong duoc truyen vao tham so NULL (gay ra crash)
void glutMainLoop()
Tham so:
Tham so:
void glutSwapBuffers();
11. Ham xu ly tu ban phim voi cac ki tu nhan biet duoc duoi ma ASCII
Tham so
(*func)(unsigned char key, int x, int y) - con tro toi ham xu ly
key - ki tu vao
12. Ham xu ly cac ki tu tren ban phim ma nhan biet duoc duoi ma ASCII
Tham so:
nhung ma sau:
GLUT_KEY_F1 F1
GLUT_KEY_F2 F2
...
GLUT_KEY_F12 F12
int glutGetModifiers();
GLUT_ACTIVE_SHIFT
GLUT_ACTIVE_CTRL
GLUT_ACTIVE_ALT
14. Thiet lap che do lap di lap lai cho ban phim (repeat key mode)
Tham so:
GLUT_KEY_REPEAT_OFF
GLUT_KEY_REPEAT_ON
GLUT_KEY_REPEAT_DEFAULT
Tham so
Tham so:
(*func)(int button, int state, int x, int y) - con tro toi ham xu ly chuot
button - nut chuot duoc an, duoc dinh nghia voi 3 kieu sau
GLUT_LEFT_BUTTON
GLUT_RIGHT_BUTTON
GLUT_MIDDLE_BUTTON
state - trang thai nut chuot duoc dinh nghia voi 2 kieu
GLUT_DOWN
GLUT_UP
19. Ham xu ly chuyen dong chuot o trang thai dong va trang thai tinh
Tham so:
state - trang thai chuot so voi cua so, duoc dinh nghia voi 2 kieu
GLUT_LEFT
GLUT_ENTERED
Tham so:
Tham so:
Tham so:
button - nut chuot duoc gan menu vao, duoc dinh nghia voi 3 kieu nut o tren
tuong tu glutAttachMenu()
Tham so: