Unity-Technologies / Unity-Technologies/NativeRenderingPlugin

Modifying vertex buffer on WebGL is disabled

Open
#14 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
943
Forks
186
PR merge metrics
No merged PRs in 30d

Description

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

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with PluginSource/source/RenderAPI_OpenGLCoreES.cpp lines 280-294 and reproduce the plugin sample under WebGL. Investigate the SUPPORT_OPENGL_ES check and the reported GL_WRITE_ONLY build error. Done means the sample mesh is no longer flat in WebGL and the Unity build succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, unity
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.