View Full Version : GL_POINT_SPRITE gone in 3.2??
11-30-2009, 02:29 PM
I'm doing a game using only the core 3.2 - and I want to use GL_POINT_SPRITE - but I'm getting an undefined error when trying to enable it.
It appears on the 3.2 help sheet - but it's not in gl3.h.
Do I need to use glext.h ? I think I read that if you are using core then you shouldn't be using glext.h. This is on Linux by the way.
11-30-2009, 02:39 PM
GL_POINT_SPRITE is indeed removed, but point sprites are not - they are now permanently on:
Non-sprite points - Enable/Disable targets POINT_SMOOTH and POINT_SPRITE, and all associated state. Point rasterization is always performed asthough POINT_SPRITE were enabled.
12-02-2009, 08:04 PM
Beautiful - Got that working.
How do I apply a texture correctly to them?
Everything I read seems to indicate I need to set the REPLACE_COORD to TRUE - which will generate the correct texture coordinates. I can't do that as it relies on the GL_POINT_SPRITE definition.
I have textures working on the points - I'm passing in a single texture coordinate into the shader - which seems to be applying the color of the pixel for that coordinate across the whole point.
Do I need to pass in four texture coordinates to have the texture applied across the point?
EDIT: Solved - Use gl_PointCoord in the shader to get the coordinates to go from 0.0 to 1.0.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.