Quick question about Cg

Started by
0 comments, last by Shai 16 years, 8 months ago
Dear All, I've got an abstraction layer over GL and DX, so my engine can switch between the two. I write my shaders in Cg, and have Cg compile down to GLSL or HLSL. So far all is well, but I want to set the size of points from the vertex shader. In DirectX I understand that I can do this by setting up the P_SIZE vertex cord, and in GLSL I can set the gl_PointSize variable. How can I do this in Cg? repeated searches on google turn up nothing. Is this not a supported feature?
Advertisement
Make sure you start with glEnable(GL_VERTEX_PROGRAM_POINT_SIZE_ARB). Then in your vertex shader you can output a value to the PSIZE register. This sets the size of the points.
"It's better to regret something you've done than to regret something you haven't done."

This topic is closed to new replies.

Advertisement