[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] enabling POINT_SMOOTH symbol?
Or, use point sprites. Smooth points are a bit antiquated; they're no longer in the core profile for desktop OpenGL 3.2+. Here's how you use point sprites in an ES 2.0 fragment shader:
uniform sampler2D tex;
void main ( )
gl_FragColor = texture2D(tex, gl_PointCoord);
You can also set the gl_PointSize variable from your vertex shader.
On Tue, Jul 13, 2010 at 8:47 PM, Dan Lecocq <email@example.com>
As far as I know, most/all WebGL functions are just wrappers giving you access to the hardware, and some features may or may not be advertised (as in, constants not defined). If you're sure that they are available on a particular graphics card, you can probably just plug in the constant in place of the symbol.
So, instead of trying to get gl.POINT_SMOOTH, you could supply 0x0B10, which seems to be the constant GL_POINT_SMOOTH is set to. This sort of approach worked for me with floating-point textures in WebGL, but with points, I'm not sure that points are supported in the OpenGL ES 2.0 spec. Again, though, you might have luck by using the constant for GL_POINTS when calling gl.drawElements.
On Tue, Jul 13, 2010 at 10:34 PM, Andor Salga <firstname.lastname@example.org>