gl_PointCoord problem

gl_PointCoord is not working(always returns 0). If I use GL_POINT_SPRITE, it works, however that was removed in GL 3.2, …and Im using 3.3 now.
So it works, but I have to use something that was removed in the GL version Im developing with. Is this my drivers bug, or do I misunderstand something? Can I expect consistent behavior on other GPUs and drivers with this “hack”?
(My GPU is GeForce 8800 GT)

Hi
I had the same issue with 4.3 (on Nvidia 630M), but I am using openGL trough JOGL. So I asked there if it was a bug, but they said its all fine.
So I think this behavoir is normal and will stay the same for future versions. On the other hand: Don’t trust me, because I am a total noob, just started learing openGL. :wink:

[QUOTE=sektion31;1256548]Hi
I had the same issue with 4.3 (on Nvidia 630M), but I am using openGL trough JOGL. So I asked there if it was a bug, but they said its all fine.
So I think this behavoir is normal and will stay the same for future versions. On the other hand: Don’t trust me, because I am a total noob, just started learing openGL. ;)[/QUOTE]

OK:) Thanks anyway!

If you’re using the Compatibility profile, GL_POINT_SPRITE still exists and must be explicitly enabled. GL_POINT_SPRITE is only removed in the Core profile, and gl_PointCoord should always be producing proper coordinates in Core.

What is removed? Point sprites? Certainly not! Just glEnable(GL_POINT_SPRITE) is removed since it is always on in post GL 3.2 versions.

If you tried to surf the Web you could find Graham Sellers’s post on it.

Thanks!
“What is removed? Point sprites? Certainly not! Just glEnable(GL_POINT_SPRITE) is removed since it is always on in post GL 3.2 versions.”

I understand that in 3.2+ core it should be enabled by default. But its not. I have to hack it by using the “removed” glEnable(GL_POINT_SPRITE).

Well, I dont know if theres a way to explicitly select the Core profile, …what Im I doing now is using the gl_3_3 core header.

Header file is just a header file. Contains signatures of the functions and constants. Nothing more.
By default a Compatibility profile is created. If you want the Core profile it must be specified in context creation process with wglCreateContextAttribsARB/glxCreateContextAttribsARB function.

Thanks! It works now as expected. Now it also gives an INVALID_ENUM error if I try to use the GL_POINT_SPRITE.