Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: GL_POINT_SPRITE gone in 3.2??

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    10

    GL_POINT_SPRITE gone in 3.2??


    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.

    thanks

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2009
    Location
    Orlando, FL, USA
    Posts
    29

    Re: GL_POINT_SPRITE gone in 3.2??

    GL_POINT_SPRITE is indeed removed, but point sprites are not - they are now permanently on:

    Quote Originally Posted by 3.2 (core) specification, p. 331 - in E.2.2, Removed Features
    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.
    Cheers,

    Graham

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    10

    Solved: GL_POINT_SPRITE gone in 3.2??

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •