webai-community / aquarium

BSD 3-Clause "New" or "Revised" License
26 stars 7 forks source link

Compile OpenGL path to WASM by emscripten #26

Closed JiangYizhou closed 1 year ago

JiangYizhou commented 5 years ago

Use emscripten with cmakeList to compile the application. When the logic is different from OpenGL, use marco to differentiate them. Remove unnecessary queries from imgui_impl_opengl3.cpp because the queries impact on performance especially in WebGL. The states can be set directly by the app.

JiangYizhou commented 5 years ago

@hujiajie PTAL. Thanks.

hujiajie commented 5 years ago

I'm still not quite satisfied with using different build systems and the hack in imgui, but I have no quick answer to this. Also, I hope the number of ifdefs can be reduced in the future if the code can be refactored in a better way. Overall, I'm neutral to merging this now or continuing the iteration in a separate branch.