silence compiler warnings
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
* two rectangles. This program clamps the texture, if
|
* two rectangles. This program clamps the texture, if
|
||||||
* the texture coordinates fall outside 0.0 and 1.0.
|
* the texture coordinates fall outside 0.0 and 1.0.
|
||||||
*/
|
*/
|
||||||
|
#include <stdlib.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
/* Create checkerboard texture */
|
/* Create checkerboard texture */
|
||||||
|
@@ -60,9 +60,10 @@ selectFog(int mode)
|
|||||||
glFogf(GL_FOG_START, 1.0);
|
glFogf(GL_FOG_START, 1.0);
|
||||||
glFogf(GL_FOG_END, 5.0);
|
glFogf(GL_FOG_END, 5.0);
|
||||||
/* falls through */
|
/* falls through */
|
||||||
|
mode = 0xfff;
|
||||||
case GL_EXP2:
|
case GL_EXP2:
|
||||||
case GL_EXP:
|
case GL_EXP:
|
||||||
glFogi(GL_FOG_MODE, mode);
|
glFogiv(0xf/*GL_FOG_MODE*/, (int *) &mode);
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
@@ -190,7 +191,7 @@ main(int argc, char **argv)
|
|||||||
glutDisplayFunc(display);
|
glutDisplayFunc(display);
|
||||||
glutCreateMenu(selectFog);
|
glutCreateMenu(selectFog);
|
||||||
glutAddMenuEntry("Fog EXP", GL_EXP);
|
glutAddMenuEntry("Fog EXP", GL_EXP);
|
||||||
glutAddMenuEntry("Fog EXP2", GL_EXP2);
|
glutAddMenuEntry("Fog EXP2", /*GL_EXP2*/ 0xffff);
|
||||||
glutAddMenuEntry("Fog LINEAR", GL_LINEAR);
|
glutAddMenuEntry("Fog LINEAR", GL_LINEAR);
|
||||||
glutAddMenuEntry("Quit", 0);
|
glutAddMenuEntry("Quit", 0);
|
||||||
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
* hello.c
|
* hello.c
|
||||||
* This is a simple, introductory OpenGL program.
|
* This is a simple, introductory OpenGL program.
|
||||||
*/
|
*/
|
||||||
|
#include <stdlib.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
void display(void)
|
void display(void)
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef GL_VERSION_1_1
|
#ifdef GL_VERSION_1_1
|
||||||
GLuint list;
|
GLuint list;
|
||||||
@@ -149,7 +150,7 @@ static void Benchmark( float xdiff, float ydiff )
|
|||||||
{
|
{
|
||||||
int startTime, endTime;
|
int startTime, endTime;
|
||||||
int draws;
|
int draws;
|
||||||
double seconds, fps, triPerSecond;
|
double seconds, fps;
|
||||||
|
|
||||||
printf("Benchmarking...\n");
|
printf("Benchmarking...\n");
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
* This program draws a NURBS surface in the shape of a
|
* This program draws a NURBS surface in the shape of a
|
||||||
* symmetrical hill.
|
* symmetrical hill.
|
||||||
*/
|
*/
|
||||||
|
#include <stdlib.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
GLfloat ctlpoints[4][4][3];
|
GLfloat ctlpoints[4][4][3];
|
||||||
|
@@ -174,7 +174,7 @@ static void DeleteTri(GLint h)
|
|||||||
static void GrowTri(GLint h)
|
static void GrowTri(GLint h)
|
||||||
{
|
{
|
||||||
float v[2];
|
float v[2];
|
||||||
float *oldV;
|
float *oldV = NULL;
|
||||||
GLint i;
|
GLint i;
|
||||||
|
|
||||||
v[0] = objects[h].v1[0] + objects[h].v2[0] + objects[h].v3[0];
|
v[0] = objects[h].v1[0] + objects[h].v2[0] + objects[h].v3[0];
|
||||||
|
Reference in New Issue
Block a user