Make Visual C happy by including stddef.h and explicitly marking some literals as float.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@808 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2009-03-27 16:20:40 +00:00
parent 2bc21a4c53
commit 1d342abc21
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-03-27 Sven Panne <sven.panne@aedion.de>
* progs/demos/smooth_opengl3/smooth_opengl3.c: Make Visual C happy by
including stddef.h and explicitly marking some literals as float.
2009-03-26 Sven Panne <sven.panne@aedion.de>
* src/freeglut_init.c,src/freeglut_input_devices.c: Unbreak the build:

View File

@ -45,6 +45,7 @@
#include <GL/freeglut.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
/* report GL errors, if any, to stderr */
@ -397,9 +398,9 @@ void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
if (w <= h) {
loadOrtho2Df (projectionMatrix, 0.0, 30.0, 0.0, 30.0 * (GLfloat) h/(GLfloat) w);
loadOrtho2Df (projectionMatrix, 0.0f, 30.0f, 0.0f, 30.0f * (GLfloat) h/(GLfloat) w);
} else {
loadOrtho2Df (projectionMatrix, 0.0, 30.0 * (GLfloat) w/(GLfloat) h, 0.0, 30.0);
loadOrtho2Df (projectionMatrix, 0.0f, 30.0f * (GLfloat) w/(GLfloat) h, 0.0f, 30.0f);
}
checkError ("reshape");
}