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: Texturemapping to gl_points



Hi y'all,

- I'm surprised to hear so many people say "do quads"...that would increase bus traffic by 4x...

- One advantage of quads which makes us use them in places (we use sprites in others) is that a lot of cards have a max point size of 64x64, so if the billboards have to be big when close, sprites aren't viable.

- With GLSL 1.2 there's a new way to get sprite teture coords; the old way is to enable sprite coord replace mode, e.g.

glEnable(GL_POINT_SPRITE_ARB); glTexEnvi(GL_POINT_SPRITE_ARB,GL_COORD_REPLACE_ARB,GL_TRUE);

- I believe that if you want to use part of the texture, you need to write a pixel shader, because there's no fixed function texture atlasing for sprites.

- There is/was a bug with point sprites on the iMac with Radeon HD Hardware (I filed r5483766) where the sprite coords don't modulate. Can't say more, this list isn't under NDA, but if you write what you think is the right code and it doesn't work, regression on another computer might help!

cheers
ben

Mike wrote:
Thanks to all but well... particle system is exactly what I am doing :)
I need to project texture over 100k particles with 60 fps. It works so far nicely but the problem is that all texels for single point are colored from single pixel color from texture.
I remember seeing somewhere that it should be possible with some simple glTextEnvf() or similar setting.




Kent Miller kirjoitti 30.5.2008 kello 18:39:

Point sprites do this.

I would just look at using quads. I don't think there is much advantage to point sprites unless you are doing something like a particle system with thousands of points in which case point sprites can take your vertex data rate down. GL Points have their own special set of quirks.

Kent

On May 30, 2008, at 8:30 AM, Mike wrote:

I am mapping texture to GL_POINT.
My point size varies but lets say it's 5x5 pixels. Currently the whole point just samples single pixel from texture and point's texels are all that same color.


How can I (or can I) map it so that it all texels in point are sampled (1:1) from texture? i.e. if texture is 100 x 100px and point is 25x25px (not smoothed) the point should represent 1/4 region of texture and with 4 points I could represent whole texture.

Thanks.

-Mike


_______________________________________________ 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


-- Scenery Home Page: http://scenery.x-plane.com/ Scenery blog: http://xplanescenery.blogspot.com/ Plugin SDK: http://www.xsquawkbox.net/xpsdk/ X-Plane Wiki: http://wiki.x-plane.com/ Scenery mailing list: email@hidden Developer mailing list: 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: 
 >How to load imagefile for texture (Leopard) (From: "Mike mcFin" <email@hidden>)
 >Re: How to load imagefile for texture (Leopard) (From: Jean-Francois Roy <email@hidden>)
 >Texturemapping to gl_points (From: Mike <email@hidden>)
 >Re: Texturemapping to gl_points (From: Kent Miller <email@hidden>)
 >Re: Texturemapping to gl_points (From: Mike <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.