#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#include <time.h>
+#include <string.h>
#if defined (WIN32)|| defined(_WIN32)
#include <windows.h>
#include <GL/glut.h>
-#include "readtex.c"
+#include "readtex.h"
#ifdef XMESA
#include "GL/xmesa.h"
(gluerr =
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TEX_SKY_WIDTH, TEX_SKY_HEIGHT,
GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) (tsky)))) {
- fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
+ fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
exit(-1);
}
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "p - Toggle Wire frame");
glRasterPos2i(60, 150);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,
- "b - Toggle GL_EXT_rescale_normal extension");
+ "n - Toggle GL_EXT_rescale_normal extension");
glRasterPos2i(60, 120);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,
"+/- - Increase/decrease the Object maximum LOD");
static GLfloat alpha = 0.0f;
static GLfloat beta = 0.0f;
static float fr = 0.0;
+ static double t0 = -1.;
+ double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
+ if (t0 < 0.0)
+ t0 = t;
+ dt = t - t0;
+ t0 = t;
dojoy();
drawipers(0, FROM_NONE);
glPopMatrix();
- alpha += 0.5f;
- beta += 0.3f;
+ alpha += 4.f * dt;
+ beta += 2.4f * dt;
glDisable(GL_LIGHTING);
glDisable(GL_LIGHT0);