Jump to content
  • Advertisement
Sign in to follow this  
spalter

OpenGL Point Sprite size

This topic is 4488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi there, is there a way to determine the maximum point sprite size in OpenGL? all i could find was getting POINT_SIZE_MAX, but this doesnt seem to correspond to the implementation dependend maximum (which is what i want)? also, does anyone know if there been an increase in the maximum allowed ps size with nvidia drivers lately? with the latest driver, i seem to be able to draw sprites larger than 1000x1000 (haven't checked thoroughly yet), where older driver versions seem to max out at 256x256 or something. thanks martin

Share this post


Link to post
Share on other sites
Advertisement
glGetting the following should return the implementation specific size end the steps between them:
 
GL_ALIASED_POINT_SIZE_RANGE
GL_ALIASED_POINT_SIZE_GRANULARITY
GL_SMOOTH_POINT_SIZE_RANGE
GL_SMOOTH_POINT_SIZE_GRANULARITY

Share this post


Link to post
Share on other sites
Those enums don't apply to point sprites. On Nvidia hardware, points can be as large as 4096x4096, and on ATI hardware, they can be 8192x8192.

If you're rendering to an FBO, be sure to change the point sprite origin to LOWER_LEFT, or else it will fall into a software path on Nvidia hardware (which does clamp point sizes to 63.375 -- this is an asymmetry that needs to be fixed). If you're not rendering to an FBO, the origin should be the default UPPER_LEFT.

Share this post


Link to post
Share on other sites
thanks, that's good news for me (that they can be that large)! ;) is there some documentation or something from nvidia about this..since i couln't find any?

also, i would like to have my point sprites scale correctly with perspective, i.e. as if they were 3d-geometry. is there some clever way to do this? i guess one would have to set the point size in the vertex shader..but how do i find out the correct size without doing too much per-vertex math?

thanks


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!