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]
/
helper.c
diff --git
a/helper.c
b/helper.c
index
9eebe50
..
bb57603
100644
(file)
--- a/
helper.c
+++ b/
helper.c
@@
-247,24
+247,25
@@
void drawSquare(int recurseLevel, float x1, float z1, float x2, float z2) {
glEnd();
}*/
glEnd();
}*/
- unsigned int GridSizeX = 1
6
;
- unsigned int GridSizeY = 1
6
;
- unsigned int SizeX =
8
;
- unsigned int SizeY =
8
;
+ unsigned int GridSizeX = 1
00
;
+ unsigned int GridSizeY = 1
00
;
+ unsigned int SizeX =
2
;
+ unsigned int SizeY =
2
;
- for (unsigned int x =
0
;x<GridSizeX;++x)
- for (unsigned int y =
0
;y<GridSizeY;++y)
+ for (unsigned int x =
-GridSizeX
;x<GridSizeX;++x)
+ for (unsigned int y =
-GridSizeY
;y<GridSizeY;++y)
{
if ((x+y)%2) //modulo 2
glColor3f(1.0f,1.0f,1.0f); //white
else
glColor3f(0.0f,0.0f,0.0f); //black
glBegin(GL_QUADS);
{
if ((x+y)%2) //modulo 2
glColor3f(1.0f,1.0f,1.0f); //white
else
glColor3f(0.0f,0.0f,0.0f); //black
glBegin(GL_QUADS);
- glVertex3f( x*SizeX,0.0, y*SizeY);
- glVertex3f((x+1)*SizeX,0.0, y*SizeY);
+
glVertex3f((x+1)*SizeX,0.0, (y+1)*SizeY);
glVertex3f( x*SizeX,0.0, (y+1)*SizeY);
glVertex3f((x+1)*SizeX,0.0, (y+1)*SizeY);
glVertex3f( x*SizeX,0.0, (y+1)*SizeY);
+ glVertex3f( x*SizeX,0.0, y*SizeY);
+ glVertex3f((x+1)*SizeX,0.0, y*SizeY);
glEnd();
}
glEnd();
}
UCC
git Repository :: git.ucc.asn.au