[osg-users] OSG-3.6 breaking changes to GLES2 buffered objects

5 views
Skip to first unread message

michael kapelko

unread,
Mar 23, 2018, 4:43:28 AM3/23/18
to OpenSceneGraph Users
Hi.
This is to continue the discussion of PR that broke web (Emscripten)
builds: https://github.com/openscenegraph/OpenSceneGraph/pull/501

The mentioned changes break rendering of the osgemscripten example
(found in OpenSceneGraph/examples/osgemscripten).
I've prepared two builds to depict the difference.
1. Build with the breaking fix:
https://kornerr.github.io/osg-pbo-gles2-fix-builds/versions/fix/osgemscripten.html
2. Build with the breaking fix reverted:
https://kornerr.github.io/osg-pbo-gles2-fix-builds/versions/reverted-fix/osgemscripten.html

The second build simply has the following GLExtension.cpp line:
isBufferObjectSupported = isVBOSupported && isPBOSupported;
replaced with:
isBufferObjectSupported = isVBOSupported;

So the problem is not really in PBO support, but in the fact that
possibly missing PBO support removes buffer object support. This is
wrong. The osgemscripten example uses VBO and this is what WebGL1
requires.

You can build osgemscripten example yourself (README explains how to
do it, it's easy on Linux) and see the errors.
Make sure to use the updated CMakeLists.txt I've attached to this email.
CMakeLists.txt

Robert Osfield

unread,
Mar 23, 2018, 7:53:54 AM3/23/18
to OpenSceneGraph Users
Hi Michael,

Thanks for the details. I've started looking into the GLES2 specs,
and buffer object support is there, just one mention of vertex buffer
object and no mentions of pixel buffer objects.

Is sounds like GLExtensions.cpp just needs to be tweaked a bit to
properly enable/disable the correct features.

Robert.
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Mar 23, 2018, 9:00:41 AM3/23/18
to OpenSceneGraph Users
Hi Michael,

On 23 March 2018 at 11:53, Robert Osfield <robert....@gmail.com> wrote:
> Is sounds like GLExtensions.cpp just needs to be tweaked a bit to
> properly enable/disable the correct features.

I have checked in the follow change to master and the 3.6 branch,
could you let me know if this works fine.

https://github.com/openscenegraph/OpenSceneGraph/commit/b48db74fa3a08143cc9461f585937e1c580d1947

Cheers,
Robert.

michael kapelko

unread,
Mar 23, 2018, 11:18:08 AM3/23/18
to OpenSceneGraph Users
Hi, Robert.
It works fine, thanks!
I've also created a PR to update osgemscripten example's CMakeLists
file to fix build error:
https://github.com/openscenegraph/OpenSceneGraph/pull/503
Web builds should be safe after that :)
Reply all
Reply to author
Forward
0 new messages