progs/tests: Silence compiler warnings.
This commit is contained in:
parent
d87d71036c
commit
0dd9513874
|
@ -73,7 +73,7 @@ static void Init(void)
|
|||
0,
|
||||
sourceFormat,
|
||||
GL_UNSIGNED_BYTE,
|
||||
//GL_UNSIGNED_INT,
|
||||
/* GL_UNSIGNED_INT, */
|
||||
tex2d);
|
||||
|
||||
glEnable(Target);
|
||||
|
|
|
@ -174,7 +174,7 @@ static void Init( void )
|
|||
exit(1);
|
||||
}
|
||||
|
||||
printf("\nAll %u squares should be the same color.\n", NUM_TESTS + 1);
|
||||
printf("\nAll %lu squares should be the same color.\n", (unsigned long) NUM_TESTS + 1);
|
||||
|
||||
(void) memset( temp, 0x00, sizeof( temp ) );
|
||||
glBindTexture( GL_TEXTURE_2D, 1 );
|
||||
|
|
|
@ -57,6 +57,7 @@ static void Key( unsigned char key, int x, int y )
|
|||
|
||||
static void Init( void )
|
||||
{
|
||||
#if 0
|
||||
static const char *prog0 =
|
||||
"!!FP1.0\n"
|
||||
"MUL o[COLR], R0, f[WPOS]; \n"
|
||||
|
@ -73,6 +74,7 @@ static void Init( void )
|
|||
"MOV HC, H2; \n"
|
||||
"END \n"
|
||||
;
|
||||
#endif
|
||||
|
||||
/* masked updates, defines, declarations */
|
||||
static const char *prog1 =
|
||||
|
|
|
@ -165,7 +165,7 @@ static void Init( void )
|
|||
"square should look upside-down.\n");
|
||||
|
||||
|
||||
image = LoadRGBImage( IMAGE_FILE, & img_width, & img_height,
|
||||
image = LoadRGBImage( IMAGE_FILE, (GLint *) & img_width, (GLint *) & img_height,
|
||||
& img_format );
|
||||
if ( image == NULL ) {
|
||||
printf( "Could not open image file \"%s\".\n", IMAGE_FILE );
|
||||
|
|
|
@ -252,8 +252,8 @@ Draw(void)
|
|||
glPushMatrix();
|
||||
glTranslatef(2, (i + 1) * (h + 2), 0);
|
||||
glRasterPos2i(8, 6);
|
||||
sprintf(s, "Internal Texture Format [f/F]: %s (%d of %d)",
|
||||
IntFormats[CurFormat].name, CurFormat + 1, NUM_INT_FORMATS);
|
||||
sprintf(s, "Internal Texture Format [f/F]: %s (%d of %lu)",
|
||||
IntFormats[CurFormat].name, CurFormat + 1, (unsigned long) NUM_INT_FORMATS);
|
||||
PrintString(s);
|
||||
glPopMatrix();
|
||||
|
||||
|
|
|
@ -17,7 +17,10 @@ static GLfloat Xrot = 40, Yrot = 0, Zrot = 0;
|
|||
static GLboolean Anim = GL_TRUE;
|
||||
static GLuint Vbuffer = 0;
|
||||
|
||||
#if 1
|
||||
#else
|
||||
static GLfloat buf[NUM_QUADS * 6 * 4];
|
||||
#endif
|
||||
|
||||
static GLboolean doSwapBuffers = GL_TRUE;
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ static void draw(void)
|
|||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
//glutSwapBuffers();
|
||||
/* glutSwapBuffers(); */
|
||||
glFlush();
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ int main(int argc, char **argv)
|
|||
glutInitWindowPosition(100, 0);
|
||||
glutInitWindowSize(prog.width, prog.height);
|
||||
|
||||
//type = GLUT_RGB | GLUT_DOUBLE;
|
||||
/* type = GLUT_RGB | GLUT_DOUBLE; */
|
||||
type = GLUT_RGB | GLUT_SINGLE;
|
||||
glutInitDisplayMode(type);
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ static void draw(void)
|
|||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
//glutSwapBuffers();
|
||||
/* glutSwapBuffers(); */
|
||||
glFlush();
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ int main(int argc, char **argv)
|
|||
glutInitWindowPosition(100, 0);
|
||||
glutInitWindowSize(prog.width, prog.height);
|
||||
|
||||
//type = GLUT_RGB | GLUT_DOUBLE;
|
||||
/* type = GLUT_RGB | GLUT_DOUBLE; */
|
||||
type = GLUT_RGB | GLUT_SINGLE;
|
||||
glutInitDisplayMode(type);
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ static void Init( void )
|
|||
* part of GL 1.4.
|
||||
*/
|
||||
|
||||
ver_str = glGetString( GL_VERSION );
|
||||
ver_str = (char *) glGetString( GL_VERSION );
|
||||
version = (ver_str == NULL) ? 1.0 : atof( ver_str );
|
||||
|
||||
wrapping = (glutExtensionSupported("GL_EXT_stencil_wrap") || (version >= 1.4));
|
||||
|
|
|
@ -39,11 +39,13 @@ static void draw( void )
|
|||
|
||||
|
||||
|
||||
/*
|
||||
static void idle( void )
|
||||
{
|
||||
Angle += 2.0;
|
||||
glutPostRedisplay();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
static int win_width, win_height;
|
||||
|
||||
#if 0
|
||||
static void
|
||||
line(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
|
||||
{
|
||||
|
@ -39,6 +40,7 @@ line(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
|
|||
glVertex2f(x2, y2);
|
||||
glEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
line3(GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2)
|
||||
|
|
Loading…
Reference in New Issue