Quick question about Cg
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?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement