PDA

View Full Version : billboard problems



Bruno
04-07-2004, 12:02 PM
I have no ideia what i'm doing wrong here, but whatever i do, i cannot make the damn billboards to remain in the same location., when i move the mouse the allways move a bit too.,
take a look at this shots please :

http://www.fysoftware.com/screenshots/p1.jpg
http://www.fysoftware.com/screenshots/p2.jpg
http://www.fysoftware.com/screenshots/p3.jpg
http://www.fysoftware.com/screenshots/p4.jpg

I'm doing the billboards with gl_arb_point_sprite, and here it is the code :

float quadratic[] = { 1.0f, 0.0f, 0.01f };
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, quadratic );

float maxSize = 0.0f;
glGetFloatv( GL_POINT_SIZE_MAX_ARB, &maxSize );
glPointSize( maxSize );

glPointParameterfARB( GL_POINT_FADE_THRESHOLD_SIZE_ARB, 60.0f );

glPointParameterfARB( GL_POINT_SIZE_MIN_ARB, 1.0f );
glPointParameterfARB( GL_POINT_SIZE_MAX_ARB, maxSize );

glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE );

glEnable( GL_POINT_SPRITE_ARB );

glBegin( GL_POINTS );
{
glVertex3f( l_p[0], l_p[1], l_p[2] );
}
glEnd();

glDisable( GL_POINT_SPRITE_ARB );

What could be wrong ?
thanks for any help ,

Bruno