*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/libsphere (3)              
Title
Content
Arch
Section
 

j(3g)

Contents


LIBSPHERE(3L)							 LIBSPHERE(3L)


NAME    [Toc]    [Back]

     libsphere - the Sphere Library

SYNOPSIS    [Toc]    [Back]

     #include <gl/sphere.h>

	  int sphdraw(params)
	  float	params[4];

	  int sphgnpolys(void)

	  void sphfree(void)

	  int sphmode(attribute, value)
	  int attribute, value;

	  void sphobj(objid)
	  Object objid;

	  void sphrotmatrix(mat)
	  Matrix mat;

	  void sphbgnbitmap(void)

	  void sphendbitmap(void)

	  void sphcolor(clr)
	  float	clr[4];

DESCRIPTION    [Toc]    [Back]

     The Sphere	Library	renders	spheres	by issuing GL calls.  sphdraw draws a
     sphere.  sphmode sets various attributes that affect the speed and
     quality of	spheres	rendered by sphdraw. sphrotmatrix allows you to
     control the orientation of	spheres	by providing a rotation	matrix.
     sphgnpolys	returns	the number of polygons per sphere, in the mode
     currently selected	by sphmode.  sphobj  operates like sphdraw, except
     that, instead of immediately rendering a sphere, it creates and returns a
     GL	object,	which can be rendered using callobj.  The routines
     sphbgnbitmap and sphendbitmap are for drawing collections of spheres
     using a special bitmap image of a phong-shaded sphere.  The diffuse color
     of	the bitmap spheres are set with	the routine sphcolor.

USAGE    [Toc]    [Back]

     To	link a program with libsphere, specify -lsphere	on the compile line.
     When linking a program with libsphere, you	must also specify the Graphics
     Library, -lgl_s, and the Math Library, -lm.

CAVEAT    [Toc]    [Back]

     In	the current implementation, the	Sphere Library maintains an internal
     cache of GL objects, one for each combination of sphere attributes	for
     which sphdraw or sphobj has been called.  The first call to sphdraw, or
     sphobj, with a combination	of attributes that has not yet been rendered



									Page 1






LIBSPHERE(3L)							 LIBSPHERE(3L)



     will result in the	creation of a new GL object and, thus, will take
     longer than subsequent calls with the same	combination of sphere
     attributes.

     If	your program uses the Sphere Library and also manipulates its own GL
     objects, you must be careful that your allocation of object identifiers
     does not conflict with the	Sphere Library's allocation of object
     identifiers for its internal cache.  The Sphere Library calls genobj for
     its object	identifier allocation.	If your	program	allocates object
     identifiers for its own use, you should either use	genobj to allocate
     object identifiers	or use isobj to	verify that any	object identifiers
     your program generates are	not already being used by the Sphere Library.
     See makeob
 for	further	discussion of object
     identifiers.

     If	you need to free the virtual memory used by the	Sphere Library's
     internal cache, you can call sphfree to free all its GL objects and their
     associated	memory.

SEE ALSO    [Toc]    [Back]

      
      
     sphdraw, sphgnpolys, sphfree, sphmode, sphobj, sphrotmatrix,
     sphbgnbitmap, , sphendbitmap, sphcolor


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
sphfree IRIX free all internal sphere objects in the Sphere Library's internal cache
sphmode IRIX set sphere attributes
glusphere IRIX draw a sphere
sphdraw IRIX draw a sphere
gluSphere Tru64 draw a sphere
mview IRIX Molecule Sphere Demo
sphobj IRIX create a GL object containing a sphere
sphgnpolys IRIX return the number of polygons for the current set of sphere attributes.
krb_afslog OpenBSD AFS library
krb_afslog_uid OpenBSD AFS library
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service