Rejean Chartrand (rejeanc++at++cae.ca)
Mon, 16 Jan 95 14:49:29 EST
1) How to specify a light point that has a 10 pixels coverage on an Indy ?
Because I tried the following command :
pfLPointSize(lpoint, 10.0f);
but the LPoint still shows as if it was 1 pixel wide. I know that
this command passes 10.0f as the argument to the pntsizef GL routine
but according to the man pages most SGI machines cannot display
point that have more than one or two pixels.
2) Here's a piece of code that should display a red light point at
0.0,0.0,0.0 (the origin !) and pointing up the z axe. Instead
what I get is a white dot of one pixel coverage ! What's wrong
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <malloc.h>
#include <limits.h>
#include <Performer/pf.h>
/*******************************************************
* Prototypes of local functions
*******************************************************/
static void OpenPipeline (pfPipe *p);
static void DrawChannel (pfChannel *chan, void *data);
void AddLP( pfScene *scene );
/*******************************************************
* Functions
*******************************************************/
void main( argc, argv )
long argc;
char **argv;
{
float t = 0.0f;
pfScene *scene;
pfPipe *p;
pfChannel *chan;
pfEarthSky *esky;
/* Initialize Performer */
pfInit();
loat s, c;
pfCoord view;
/* Go to sleep until next frame time. */
pfSync();
/* Compute new view position. */
t = pfGetTime();
pfSinCos(45.0f*t, &slight;
pfVec3 pos_light;
pfSetVec4( color_light,
1.0f,0.0f,0.0f,1.0f );
pfSetVec3( pos_light,
0.0f,0.0f,0.0f );
light = pfNewLPoint( 1 );
pfLPointSize( light,20.0f );
pfLPointColor( light,0,color_light );
pfLPointRot( light,0.0f,90.0f,0.0f );
pfLPointShape( light,PFLP_UNIDIRECTIONAL,90.0f,90.0f,0.0f );
pfLPointPos( light,0,pos_light );
/* Attach light to scene */
pfAddChild( scene,light );
}
Thanks in advance !
Rejean Chartrand.
CAE Electronics Ltd., Montreal CANADA.
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:52 PDT