Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Point Sprites



Yes, just after I have

GLenum err = glGetError();
	if(err) {
		printf("Error: %x\n", err);
		switch(err)
		{

///stuff

}

wes

On 5/16/07, Kent Miller <email@hidden> wrote:
Are you checking glError()?  I think the max point size is 50.0 on
some renderers.

Kent

On May 16, 2007, at 8:35 PM, Wesley Smith wrote:

> 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


_______________________________________________
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
References: 
 >Point Sprites (From: "Wesley Smith" <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.