NativeRenderingPlugin
NativeRenderingPlugin copied to clipboard
Modifying vertex buffer on WebGL is disabled
Hi, I'm trying to run the plugin sample under WebGL. It works fine in Editor, but the mesh is completely flat in web.
Looking at the code, it seems that modifying the mesh was intentionally disabled for WebGL.
https://github.com/Unity-Technologies/NativeRenderingPlugin/blob/cebe85af2de836c7ee6198f7ca4b488519f2db78/PluginSource/source/RenderAPI_OpenGLCoreES.cpp#L280-L294
When removing the check on SUPPORT_OPENGL_ES
, I get the following error when building from Unity :
'GL_WRITE_ONLY' is undefined
Due to unavailability of glMapBuffer
and glUnmapBuffer
on GLES version 3.0 and before, the current implementation simply skips modifying vertex buffer by returning 0.
Here, I've raised a pull request fixing this, which you may find helpful.