X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_geometry.c;h=d286b29fa281787ddf4dea7244bea30078f37a3b;hb=7d0fc844c337b9c8901317d6935c3462b59ceda5;hp=23ba7d6a6e31260679b939316031da39c30c9c4a;hpb=646676b8dbf8ab504ac8a275fe9a63a403a3190b;p=freeglut diff --git a/src/freeglut_geometry.c b/src/freeglut_geometry.c index 23ba7d6..d286b29 100644 --- a/src/freeglut_geometry.c +++ b/src/freeglut_geometry.c @@ -29,8 +29,6 @@ #include "config.h" #endif -#define G_LOG_DOMAIN "freeglut-geometry" - #include "../include/GL/freeglut.h" #include "freeglut_internal.h" @@ -129,7 +127,7 @@ void FGAPIENTRY glutWireSphere( GLdouble dRadius, GLint slices, GLint stacks ) /* * Allocate the vertices array */ - vertex = calloc( sizeof(double), 3 * slices * (stacks - 1) ); + vertex = (double *)calloc( sizeof(double), 3 * slices * (stacks - 1) ); glPushMatrix(); glScaled( radius, radius, radius ); @@ -207,8 +205,8 @@ void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks ) glPushMatrix(); /* glScalef( radius, radius, radius ); */ - row = calloc( sizeof(double), slices * 3 ); - next = calloc( sizeof(double), slices * 3 ); + row = (double *)calloc( sizeof(double), slices * 3 ); + next = (double *)calloc( sizeof(double), slices * 3 ); dpsi = M_PI / (stacks + 1); dphi = 2 * M_PI / slices; @@ -230,9 +228,9 @@ void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks ) glVertex3d( radius * *(row + 3 * i + 0), radius * *(row + 3 * i + 1), - radius * *(row + 3 * i + 2) - ); - + radius * *(row + 3 * i + 2) + ); + phi += dphi; } @@ -263,8 +261,8 @@ void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks ) glVertex3d( radius * *(row + 3 * i + 0), radius * *(row + 3 * i + 1), - radius * *(row + 3 * i + 2) - ); + radius * *(row + 3 * i + 2) + ); glNormal3dv( next + i * 3 ); glVertex3d( @@ -300,8 +298,8 @@ void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks ) glVertex3d( radius * *(row + 3 * i + 0), radius * *(row + 3 * i + 1), - radius * *(row + 3 * i + 2) - ); + radius * *(row + 3 * i + 2) + ); } glEnd(); @@ -329,7 +327,7 @@ void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLin /* * We need 'slices' points on a circle */ - vertices = calloc( sizeof(double), 2 * (slices + 1) ); + vertices = (double *)calloc( sizeof(double), 2 * (slices + 1) ); for( j=0; j