X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_geometry.c;fp=freeglut-1.3%2Ffreeglut_geometry.c;h=da722971febc10d5ed2f52d7040c1ed37643661c;hb=a86a957ae87e1b07260edec971ebdf5a98ff3d54;hp=2819d60069d2829be07cf40ccdb5a8c5238a0122;hpb=0299b8ec2aafba355ef04cec2d1445e5ce8079d8;p=freeglut diff --git a/freeglut-1.3/freeglut_geometry.c b/freeglut-1.3/freeglut_geometry.c index 2819d60..da72297 100644 --- a/freeglut-1.3/freeglut_geometry.c +++ b/freeglut-1.3/freeglut_geometry.c @@ -123,12 +123,12 @@ void FGAPIENTRY glutWireSphere( GLdouble dRadius, GLint slices, GLint stacks ) { float radius = (float) dRadius, phi, psi, dpsi, dphi; float* vertex; - gint i, j; + int i, j; /* * Allocate the vertices array */ - vertex = g_new0( float, 3 * slices * (stacks - 1) ); + vertex = calloc( sizeof(float), 3 * slices * (stacks - 1) ); glPushMatrix(); glScalef( radius, radius, radius ); @@ -183,7 +183,7 @@ void FGAPIENTRY glutWireSphere( GLdouble dRadius, GLint slices, GLint stacks ) glEnd(); } - g_free( vertex ); + free( vertex ); glPopMatrix(); } @@ -194,13 +194,13 @@ void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks ) { float radius = (float) dRadius, phi, psi, dpsi, dphi; float *next, *tmp, *row; - gint i, j; + int i, j; glPushMatrix(); //glScalef( radius, radius, radius ); - row = g_new0( float, slices * 3 ); - next = g_new0( float, slices * 3 ); + row = calloc( sizeof(float), slices * 3 ); + next = calloc( sizeof(float), slices * 3 ); dpsi = M_PI / (stacks + 1); dphi = 2 * M_PI / slices; @@ -294,8 +294,8 @@ void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks ) glEnd(); - g_free(row); - g_free(next); + free(row); + free(next); glPopMatrix(); } @@ -308,12 +308,12 @@ void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLin float angle = (float) M_PI / (float) slices * 2.0f; float slope = (float) tan( height / base ); float* vertices = NULL; - gint i, j; + int i, j; /* * We need 'slices' points on a circle */ - vertices = g_new0( float, 2 * (slices + 1) ); + vertices = calloc( sizeof(float), 2 * (slices + 1) ); for( i=0; i