在Vertex Shader顶点着色器中设置 gl_PointSize 无效的解决方法
发表于 : 2017年07月07日 18:55
How can I vary the point size in OpenGL glBegin(GL_POINTS)?
tibur:
You can use point sprite: enable it using glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); and then you can use gl_PointSize attribute in your vertex program.
Vertex shader example taken from an OpenGL discussion thread:
Point_primitives
Vertex_Shader
tibur:
You can use point sprite: enable it using glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); and then you can use gl_PointSize attribute in your vertex program.
Vertex shader example taken from an OpenGL discussion thread:
参考:void main() { gl_FrontColor=gl_Color; gl_PointSize = gl_Normal.x; gl_Position = ftransform(); }
Point_primitives
Vertex_Shader