GL_POINTS problem?

220 views
Skip to first unread message

Tero Pulkkinen

unread,
Nov 23, 2016, 2:59:02 PM11/23/16
to emscripten-discuss
webgl with emscripten seems to do something odd with GL_POINTS in windows. Linux/mac builds works ok, but windows browsers seem to give just black screen where I expect some white points. normal opengl build in win32 works ok, so it is something webgl related. The generated emscripten javascript code is able to show the GL_POINTS; but only in linux/mac build. Every browser in windows seem to have this problem, I've tried it with two versions of chrome, edge and firefox, but they all seem to give just black screen where GL_POINTS are expected. I've tried nvidia's gfx card, and intel card, but both drivers are giving the same problem.

I know shaders have some issues with number of uniform variables in webgl, such that the limits are very small, like 15 uniform variables, before it hits black screen kind of problems, but I don't think this piece of code goes above that limit.

Is there anyone who has got GL_POINTS working in windows webgl under emscripten?

// tp

Alon Zakai

unread,
Nov 23, 2016, 6:56:48 PM11/23/16
to emscripten-discuss
If this is windows-specific, it could be an ANGLE bug in the conversion to DirectX. Might be worth checking their bug tracker, maybe it's a known issue. Another thing to maybe check is that on Firefox on windows there is a way to use OpenGL drivers instead of ANGLE/DirectX, if that works then it helps pinpoint the issue.

Although, Edge doesn't use ANGLE, so maybe that's not it.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

キャロウ マーク

unread,
Nov 24, 2016, 1:58:50 AM11/24/16
to emscripten-discuss
Are you setting gl_PointSize in your shader(s)? This is required in OpenGL ES and WebGL but not in OpenGL. If not then it is likely that the Linux/Mac browsers you are using are using an OpenGL back-end and are failing to enforce this requirement while those on Windows are using ANGLE or equivalent which are.

Regards

-Mark

Floh

unread,
Nov 25, 2016, 4:05:55 AM11/25/16
to emscripten-discuss
I have also seen problems with GL_POINTs and point size recently in some browsers, but the fixes should be live by now, you can check here, use the arrow left/right keys to increase/decrease point size:


As Mark mentions below, you need to set gl_PointSize in the vertex shader in WebGL.

Cheers,
-Floh.

Jukka Jylänki

unread,
Dec 3, 2016, 8:43:12 PM12/3/16
to emscripte...@googlegroups.com
There are some unit tests regarding points rendering in the WebGL Conformance Test Suites. If a browser bug is suspected, it might be worth checking if those tests pass. https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html

E.g. https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/point-size.html?webglVersion=1&quiet=0

--
Reply all
Reply to author
Forward
0 new messages