summaryrefslogtreecommitdiffstats
path: root/sdl/gltools.c
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/gltools.c')
-rw-r--r--sdl/gltools.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/sdl/gltools.c b/sdl/gltools.c
index d6c518f..756112b 100644
--- a/sdl/gltools.c
+++ b/sdl/gltools.c
@@ -2,6 +2,8 @@
*
* OpenGL Tools
*
+ * notes: some function modify current color, just fyi
+ *
*/
#include "math3d.h"
@@ -235,6 +237,25 @@ void gltDrawTriangle(void)
glEnd();
}
+void gltDrawGround(void)
+{
+ GLfloat fExtent = 20.0f;
+ GLfloat fStep = 0.5f;
+ GLfloat y = -0.4f;
+ GLfloat iLine;
+
+ glLineWidth(1.0f);
+ glBegin(GL_LINES);
+ for (iLine = -fExtent; iLine <= fExtent; iLine += fStep)
+ {
+ glVertex3f(iLine, y, fExtent);
+ glVertex3f(iLine, y, -fExtent);
+ glVertex3f(fExtent, y, iLine);
+ glVertex3f(-fExtent, y, iLine);
+ }
+ glEnd();
+}
+
void gltDrawUnitAxes(void)
{
GLUquadricObj *pObj; /* temporary, used for quadrics */
@@ -345,20 +366,10 @@ void gltDrawTorus(GLfloat majorRadius, GLfloat minorRadius, GLint numMajor,
}
}
-/* this function just specifically draws the jet */
-/* FIXME: needs to accepts parameters of location and lightning */
-void gltDrawJet(int nShadow)
+void gltDrawJet(void)
{
M3DVector3f vNormal;
- /* nose cone, set material color, note we only have to set to black
- * for the shadow once
- */
- if (nShadow == 0)
- glColor3ub(128, 128, 128);
- else
- glColor3ub(0, 0, 0);
-
/* nose cone, points straight down, set material color */
/* follow few lines use manual approach */
glBegin(GL_TRIANGLES);