git.ucc.asn.au
/
atyndall
/
cits2231.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1c3737f
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Sun, 9 Oct 2011 11:35:20 +0000
(19:35 +0800)
committer
Ash Tyndall
<
[email protected]
>
Sun, 9 Oct 2011 11:35:20 +0000
(19:35 +0800)
scene.c
patch
|
blob
|
history
diff --git
a/scene.c
b/scene.c
index
c7db7d9
..
6441466
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-498,8
+498,16
@@
void display() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
\r
glLoadIdentity();
\r
\r
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
\r
glLoadIdentity();
\r
\r
- glTranslatef(0.0f,0.0f,-5.0f); // Move into the Screen 10.0
\r
+ glTranslatef(0.0f, 0.0f, 0.0f);
\r
+ glBegin(GL_QUADS);
\r
+ glVertex3f(-1.0f, 1.0f, 0.0f);
\r
+ glVertex3f( 1.0f, 1.0f, 0.0f);
\r
+ glVertex3f( 1.0f,-1.0f, 0.0f);
\r
+ glVertex3f(-1.0f,-1.0f, 0.0f);
\r
+ glEnd();
\r
+
\r
\r
\r
+ glTranslatef(0.0f,0.0f,-5.0f); // Move into the Screen 10.0
\r
glutSolidTeapot(1);
\r
\r
glutSwapBuffers();
\r
glutSolidTeapot(1);
\r
\r
glutSwapBuffers();
\r
@@
-530,11
+538,11
@@
int main(int argc, char **argv) {
glutInitWindowSize(500, 500);
\r
glutCreateWindow("Scene Editor");
\r
\r
glutInitWindowSize(500, 500);
\r
glutCreateWindow("Scene Editor");
\r
\r
- glShadeModel(GL_SMOOTH);
// Enables Smooth Shading
\r
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
// Black Background
\r
- glClearDepth(1.0f);
// Depth Buffer Setup
\r
- glEnable(GL_DEPTH_TEST);
// Enables Depth Testing
\r
- glDepthFunc(GL_LEQUAL);
// The Type Of Depth Test To Do
\r
+ glShadeModel(GL_SMOOTH); // Enables Smooth Shading
\r
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background
\r
+ glClearDepth(1.0f); // Depth Buffer Setup
\r
+ glEnable(GL_DEPTH_TEST); // Enables Depth Testing
\r
+ glDepthFunc(GL_LEQUAL);
// the type
\r
\r
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
\r
\r
\r
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
\r
\r
UCC
git Repository :: git.ucc.asn.au