Point Sprites
Subject : Point Sprites
From: "Wesley Smith" <email@hidden >
Date: Wed, 16 May 2007 20:35:06 -0700
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=d3t36SQmLf5/rcpFQTTSMU3pu2TsWp7AS0p5xRQjnEtY53/u1W+Oxvq+3Z2bsHzoWcYJbLw8s9mhbF84zUETVqkO2qZ2UJm4xf9q695muGgepx067YlR8nHGFbBQWHswj4XWMZeRmzn13nie90sXk5GS8Y6jARAOE+L4xtw5eNk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ssnVXJZezjNTPAt/fE6b8EZe92PXwflgNoTOoW49QvtFsOdzbJlKp+5HaU26ix8fo5pEsjxm/ucDa8qopXy+cSZ9WYexm2TwPRJ9UD0mmnt6jdWMJk3MUCfizopB+kiIUaqCE/6bqdhdJvw319B6sCubjE4s0+Uu54o6VeXxqk0=
Hi,
I'm on OSX 10.4.8 and trying to get point sprites to work. I'm not
seeing any attenuation in size in the sprites. All I get is
GL_POINT_SIZE_MIN_ARB for all points. Here's the code. Is there
something I'm forgetting?
thanks,
wes
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45., aspect, 0.2, 100);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -10.);
glRotatef(-0., 1.0, 0.0, 0.0);
glEnable(GL_POINT_SPRITE);
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
glPointSize(100.);
glPointParameterfARB( GL_POINT_FADE_THRESHOLD_SIZE_ARB, 60.0f );
glPointParameterf(GL_POINT_SIZE_MIN_ARB, 1);
glPointParameterf(GL_POINT_SIZE_MAX_ARB, 100);
glPointSize(100);
float quadratic[] = { 1.0f, 0.0f, 0.01f };
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, quadratic );
;
glBegin(GL_POINTS);
glColor4f(1., 1., 1., 1.);
for(int j=0; j < data_height; j++) {
for(int i=0; i < data_width; i++) {
glVertex3fv(data + 3*(j*data_width + i)); //a cone
}
}
glEnd();
glDisable(GL_POINT_SPRITE_ARB);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.