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:
parent
2bc21a4c53
commit
1d342abc21
@ -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>
|
2009-03-26 Sven Panne <sven.panne@aedion.de>
|
||||||
|
|
||||||
* src/freeglut_init.c,src/freeglut_input_devices.c: Unbreak the build:
|
* src/freeglut_init.c,src/freeglut_input_devices.c: Unbreak the build:
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <GL/freeglut.h>
|
#include <GL/freeglut.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* report GL errors, if any, to stderr */
|
/* report GL errors, if any, to stderr */
|
||||||
@ -397,9 +398,9 @@ void reshape (int w, int h)
|
|||||||
{
|
{
|
||||||
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
|
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
|
||||||
if (w <= 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 {
|
} 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");
|
checkError ("reshape");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user