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.
|
void* RenderAPI_OpenGLCoreES::BeginModifyVertexBuffer(void* bufferHandle, size_t* outBufferSize) |
|
{ |
|
# if SUPPORT_OPENGL_ES |
|
return 0; |
|
# else |
|
glBindBuffer(GL_ARRAY_BUFFER, (GLuint)(size_t)bufferHandle); |
|
GLint size = 0; |
|
glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size); |
|
*outBufferSize = size; |
|
void* mapped = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); |
|
return mapped; |
|
# endif |
|
} |
|
|
|
|
When removing the check on SUPPORT_OPENGL_ES, I get the following error when building from Unity :
'GL_WRITE_ONLY' is undefined

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.
NativeRenderingPlugin/PluginSource/source/RenderAPI_OpenGLCoreES.cpp
Lines 280 to 294 in cebe85a
When removing the check on
SUPPORT_OPENGL_ES, I get the following error when building from Unity :'GL_WRITE_ONLY' is undefined