* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <GL/freeglut.h>
#include "freeglut_internal.h"
{
double size = dSize * 0.5;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireCube" );
+
# define V(a,b,c) glVertex3d( a size, b size, c size );
# define N(a,b,c) glNormal3d( a, b, c );
{
double size = dSize * 0.5;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidCube" );
+
# define V(a,b,c) glVertex3d( a size, b size, c size );
# define N(a,b,c) glNormal3d( a, b, c );
double *sint1,*cost1;
double *sint2,*cost2;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidSphere" );
+
fghCircleTable(&sint1,&cost1,-slices);
fghCircleTable(&sint2,&cost2,stacks*2);
double *sint1,*cost1;
double *sint2,*cost2;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireSphere" );
+
fghCircleTable(&sint1,&cost1,-slices );
fghCircleTable(&sint2,&cost2, stacks*2);
/* Pre-computed circle */
double *sint,*cost;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidCone" );
+
fghCircleTable(&sint,&cost,-slices);
/* Cover the circular base with a triangle fan... */
/* Pre-computed circle */
double *sint,*cost;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireCone" );
+
fghCircleTable(&sint,&cost,-slices);
/* Draw the stacks... */
/* Pre-computed circle */
double *sint,*cost;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidCylinder" );
+
fghCircleTable(&sint,&cost,-slices);
/* Cover the base and top */
/* Pre-computed circle */
double *sint,*cost;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireCylinder" );
+
fghCircleTable(&sint,&cost,-slices);
/* Draw the stacks... */
double *vertex, *normal;
int i, j;
double spsi, cpsi, sphi, cphi ;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireTorus" );
+
if ( nSides < 1 ) nSides = 1;
if ( nRings < 1 ) nRings = 1;
double *vertex, *normal;
int i, j;
double spsi, cpsi, sphi, cphi ;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidTorus" );
+
if ( nSides < 1 ) nSides = 1;
if ( nRings < 1 ) nRings = 1;
*/
void FGAPIENTRY glutWireDodecahedron( void )
{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireDodecahedron" );
+
/* Magic Numbers: It is possible to create a dodecahedron by attaching two pentagons to each face of
* of a cube. The coordinates of the points are:
* (+-x,0, z); (+-1, 1, 1); (0, z, x )
*/
void FGAPIENTRY glutSolidDodecahedron( void )
{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidDodecahedron" );
+
/* Magic Numbers: It is possible to create a dodecahedron by attaching two pentagons to each face of
* of a cube. The coordinates of the points are:
* (+-x,0, z); (+-1, 1, 1); (0, z, x )
*/
void FGAPIENTRY glutWireOctahedron( void )
{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireOctahedron" );
+
#define RADIUS 1.0f
glBegin( GL_LINE_LOOP );
glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
*/
void FGAPIENTRY glutSolidOctahedron( void )
{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidOctahedron" );
+
#define RADIUS 1.0f
glBegin( GL_TRIANGLES );
glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
*/
void FGAPIENTRY glutWireTetrahedron( void )
{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireTetrahedron" );
+
glBegin( GL_LINE_LOOP ) ;
glNormal3d ( -tet_r[0][0], -tet_r[0][1], -tet_r[0][2] ) ; glVertex3dv ( tet_r[1] ) ; glVertex3dv ( tet_r[3] ) ; glVertex3dv ( tet_r[2] ) ;
glNormal3d ( -tet_r[1][0], -tet_r[1][1], -tet_r[1][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[2] ) ; glVertex3dv ( tet_r[3] ) ;
*/
void FGAPIENTRY glutSolidTetrahedron( void )
{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidTetrahedron" );
+
glBegin( GL_TRIANGLES ) ;
glNormal3d ( -tet_r[0][0], -tet_r[0][1], -tet_r[0][2] ) ; glVertex3dv ( tet_r[1] ) ; glVertex3dv ( tet_r[3] ) ; glVertex3dv ( tet_r[2] ) ;
glNormal3d ( -tet_r[1][0], -tet_r[1][1], -tet_r[1][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[2] ) ; glVertex3dv ( tet_r[3] ) ;
void FGAPIENTRY glutWireIcosahedron( void )
{
int i ;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireIcosahedron" );
+
for ( i = 0; i < 20; i++ )
{
double normal[3] ;
{
int i ;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidIcosahedron" );
+
glBegin ( GL_TRIANGLES ) ;
for ( i = 0; i < 20; i++ )
{
void FGAPIENTRY glutWireRhombicDodecahedron( void )
{
int i ;
+
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireRhombicDodecahedron" );
+
for ( i = 0; i < 12; i++ )
{
glBegin ( GL_LINE_LOOP ) ;
{
int i ;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidRhombicDodecahedron" );
+
glBegin ( GL_QUADS ) ;
for ( i = 0; i < 12; i++ )
{
{
int i, j ;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireSierpinskiSponge" );
+
if ( num_levels == 0 )
{
{
int i, j ;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidSierpinskiSponge" );
+
if ( num_levels == 0 )
{
glBegin ( GL_TRIANGLES ) ;