| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Forgot to add:
If I have these lines:
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.1f, 0.000000f, 0.000000f };
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, quadratic );All points are of size 1.
If I change the quadratic values to
float quadratic[] = { 1.0f, 0.000000f, 0.000000f };all points are 100. Is this correct behavior?
thanks, wes
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
| References: | |
| >Point Sprites (From: "Wesley Smith" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.