git.ucc.asn.au
/
atyndall
/
cits2231.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[atyndall/cits2231.git]
/
scene.c
diff --git
a/scene.c
b/scene.c
index
aa26ba1
..
f3650e6
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-508,7
+508,7
@@
void windowReshape(int w, int h) {
*/
\r
/*void mouse(int btn, int state, int x, int y) {
\r
\r
*/
\r
/*void mouse(int btn, int state, int x, int y) {
\r
\r
-}*/
\r
+}*/
/*
\r
static void
\r
mouse(int button, int state, int x, int y)
\r
{
\r
static void
\r
mouse(int button, int state, int x, int y)
\r
{
\r
@@
-551,8
+551,13
@@
motion(int x, int y)
lightStartY = y;
\r
glutPostRedisplay();
\r
}
\r
lightStartY = y;
\r
glutPostRedisplay();
\r
}
\r
-}
\r
+}
*/
\r
\r
\r
+void idle() {
\r
+ angle = (int)(angle + 10) % 360;
\r
+ angle2 = (int)(angle2 + 10) % 360;
\r
+ glutPostRedisplay();
\r
+}
\r
\r
/**
\r
* Draw a floor.
\r
\r
/**
\r
* Draw a floor.
\r
@@
-614,9
+619,8
@@
void display() {
\r
glPushMatrix();
\r
\r
\r
glPushMatrix();
\r
\r
- //glTranslatef(0.0, 0.0, 0.0);
\r
-
\r
- glutSolidTeapot(30); // Draw teapot for test
\r
+ glTranslatef(0.0, 0.0, 0.0);
\r
+ glutWireTeapot(30); // Draw teapot for test
\r
glPopMatrix();
\r
\r
glPushMatrix();
\r
glPopMatrix();
\r
\r
glPushMatrix();
\r
@@
-645,7
+649,7
@@
void init() {
gluPerspective(
\r
60.0, /* field of view in degree */
\r
1.0, /* aspect ratio */
\r
gluPerspective(
\r
60.0, /* field of view in degree */
\r
1.0, /* aspect ratio */
\r
-
-90
0.0, /* Z near */
\r
+ 0.0, /* Z near */
\r
900.0 /* Z far */
\r
);
\r
\r
900.0 /* Z far */
\r
);
\r
\r
@@
-692,14
+696,15
@@
int main(int argc, char **argv) {
glDepthFunc(GL_LEQUAL); // the type
\r
glEnable(GL_CULL_FACE);
\r
glEnable(GL_TEXTURE_2D);
\r
glDepthFunc(GL_LEQUAL); // the type
\r
glEnable(GL_CULL_FACE);
\r
glEnable(GL_TEXTURE_2D);
\r
- glLineWidth(
3
.0);
\r
+ glLineWidth(
1
.0);
\r
\r
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
\r
\r
glutReshapeFunc(windowReshape);
\r
glutDisplayFunc(display);
\r
\r
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
\r
\r
glutReshapeFunc(windowReshape);
\r
glutDisplayFunc(display);
\r
- glutMouseFunc(mouse);
\r
- glutMotionFunc(motion);
\r
+ //glutMouseFunc(mouse);
\r
+ //glutMotionFunc(motion);
\r
+ glutIdleFunc(idle);
\r
\r
makeMenu();
\r
\r
\r
makeMenu();
\r
\r
UCC
git Repository :: git.ucc.asn.au