PDA

View Full Version : vertex and pixel shader to draw a point as sphere



satya
08-03-2011, 12:28 PM
Hello experts,

is it possible to use the vertex and pixel shader to make
a code like below to render a sphere?
glBegin(GL_POINTS)
glVertex()
glEnd()

Please help

TIA
satya

Alfonse Reinheart
08-03-2011, 03:10 PM
No. OpenGL doesn't have pixel shaders; it has fragment shaders ;)

Anyway, you can use OpenGL to render impostors. You could use point-sprites, or you could use a geometry shader to convert a point into a screen-aligned quad.