gl_PointCoord buggy?

gl_PointCoord buggy?

I'd like to texture point sprites in OpenGL using GLSL, but I'am unable to get it working. Since the following trivial fragment shader also doesn't work, I suspect a driver bug. I believe the following shader should output a gradient on each rendered sprite, but the sprites have just constant color.

#version 120
uniform sampler2D Texture;
void main (void)
gl_FragColor = vec4(, 0.0, 1.0);

The vertices are rendered using GL_POINTS, with all the following enabled:

gl_PointSize is written in the vertex shader, and the sprites show up using correct size, just gl_PointCoord seems to have an incorrect value.

For the exact hardware and software environment of my computer, see the attached dxdiag output. The problem also seems to exist under Linux (kernel + xf86-video-intel 2.13.0 + mesa 7.9).

Download DxDiag.txt41.53 KB
8 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

I sent the same test application to my friend and asked for a screenshot. He has a graphics hardware from another company and the screenshot he sent me back confirms my suspicion that this is an Intel bug.

I have attached two screenshots to this post. The one with the black quads show the erronous behavior on my Intel hardware. The other picture shows what it should really look like. I have also attached a glview report.


Hi Amitlu,

Can you upload the test application you are using somewhere?

Is this the only test machine you have other than the one your friend tried for you?


I am necroposting to inform you that this is still an issuae as of today. I wrote a small demonstration program that shows the problem. I get a full black window when running the program with an Intel video with the following software:OpenGL renderer string: Mesa DRI Mobile Intel GM45 Express Chipset x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 8.1-devel (git-897af1d oneiric-oibaf-ppa)And I get the correct result (a bluish gradient colored ball) when running iton an ATI GPUover the following software:OpenGL renderer string: Gallium 0.4 on AMD RV770OpenGL version string: 2.1 Mesa 8.1-devel (git-7b64241)Both screenshots and the source code of the demo program are bundled in the archive. See for yourself. I have also filed a bug report.


Download PointCoordIntelBug.tar.gz25.02 KB

Thanks for posting the application in the thread. We will try to replicate the issue and get back to you in case we run in to issues. Could you provide exact configuration of the system you were testing this on?

Thanks for looking into the problem.I took all the info I could think of: lspci, /proc/cpuinfo and glxinfo. If you need some other specific info, please let me know. The distribution is Linux Mint 12 (pretty much Ubuntu 11.10), with bleeding edge video drivers (Mesa 8.1), but the issue is present in older drivers. The laptop model is eMachines E725.


Download cpuinfo.txt134.75 KB
Download glxinfo.txt12.25 KB
Download lspci.txt24.8 KB

So, is there any updates on this issue? Could you reproduce it? Is it platform specific, as I thought at first?

I'm having similar issues with point sprites and textures.  I can't get PointSize to work right, images are garbled or flipped upside down, depending on if I include a fragment shader.  Please help - I'm ripping my hair out as this works on a dozen other Intel/ATI/Nvida platforms I've tested it on.

Should I repost this discussion thread in this area? I'm not sure what the diff is between and

Accedere per lasciare un commento.