Tips for new WebGL2 dev coming from desktop OpenGL 4.3

134 views
Skip to first unread message

Jon Marbach

unread,
Nov 19, 2020, 7:58:55 PM11/19/20
to WebGL Dev List
Hey all. I'm new to WebGL but not new to graphics - I've been doing desktop OpenGL 4.3 for a while. I'm looking at what I can do in WebGL2 and was looking for a list of "gotchas" or surprises (big or small) when you're used to the desktop APIs. 

A few things I've found so far:
- No glPointSize - must use gl_PointSize in shader (no problem)
- No geometry shaders - Unfortunately I find them handy here and there... I know a lot of people hate them.
- No glTexBuffer - I use this quite a bit
- A possibly low limit to the number of simultaneous contexts 

Things I haven't looked into yet:
- Shader atomics for implementing order-independent transparency
- Partially resident textures

Thanks in advance,
Jon

James Darpinian

unread,
Nov 19, 2020, 8:13:26 PM11/19/20
to webgl-d...@googlegroups.com
I think the closest thing we have would be the WebGL best practices doc. Maybe we should create a section or a new page specifically for differences between WebGL and desktop GL. A lot of the differences just come down to WebGL 2 being based on OpenGL ES 3.0 rather than desktop GL. The OpenGL ES 3.0 spec may be a good reference. The set of supported extensions is also smaller.

--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/c787c62a-0bce-4201-b76f-54a829204bcen%40googlegroups.com.

Ken Russell

unread,
Nov 20, 2020, 6:32:03 PM11/20/20
to WebGL Dev List
Hi Jon,

The features you're mentioning from OpenGL 4.3 are all missing from OpenGL ES 3.0, so as James already mentioned, familiarizing yourself with that level of the specs will help.

Please note also the differences between WebGL 2.0 and OpenGL ES 3.0: https://www.khronos.org/registry/webgl/specs/latest/2.0/#5 . These were made in order to improve portability of the API.

-Ken



Reply all
Reply to author
Forward
0 new messages