1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

4 Commits

Author SHA1 Message Date
kgv
a34bddcfd6 0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
DPLUGIN() macros no more defines exported function PLUGINFACTORY when building static libraries.
DRAWEXE executable now pre-loads a set of plugins when building static libraries.
dversion - added WebAssembly info.
2021-04-23 18:46:13 +03:00
kgv
5de4b704fe 0032065: Samples - use MODULARIZE within WebGL sample
Fixed multitouch input.

Module is now exported with global functions hidden via MODULARIZE
as global object OccViewerModule created by createOccViewerModule().
Global Module setup has been moved to occt-webgl-viewer.js.

Use EMSCRIPTEN_KEEPALIVE attribute istead of listing C functions via EXTRA_EXPORTED_RUNTIME_METHODS.
WasmOcctView now exports static methods as Module functions using EMSCRIPTEN_BINDINGS.

Standard_ASSERT_DBGBREAK_() is now defined using emscripten_debugger().
2021-01-22 19:03:14 +03:00
kgv
7465bfa65e 0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
OpenGl_Context now skips loading functions related to mapping buffer,
which are required by OpenGL ES 3.0 specs but not provided by WebGL 2.0.
Message_PrinterSystemLog does not use a broken emscripten_log() anymore, which corrupted UNICODE strings.

WasmOcctView::initWindow() - callbacks now set using EMSCRIPTEN_EVENT_TARGET_WINDOW
instead of 0 used by older Emscripten API.

Mouse callbacks now track canvas element and use
EmscriptenMouseEvent::targetX/targetY instead of ::canvasX/canvasY
as the latter was broken.

Added emscripten_set_main_loop() setup to shut up eglSwapInterval() error message.
Fixed missing \0 at the end of string converted by toUtf8Array().
2020-07-22 19:24:38 +03:00
kgv
565baee64b 0031070: Configuration - fix building issues when using Emscripten toolchain
Handled __EMSCRIPTEN__ macros to:
- Workaround atomics (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is undefined, but GCC atomics are provided).
- Suppress non-standard header <sys/signal.h> warning.
- Return OSD_LinuxREDHAT.
- Avoid inclusion of XLib headers.
- Skip fontconfig library.
- Enable EGL+GLES path (translated by Emscripten into WebGL).
- Skip eglCreatePbufferSurface() not implemented by Emscripten EGL.

Fixed Graphic3d_Vec4.hxx usage within Quantity_ColorRGBA.hxx.

OpenGl_ShaderManager::defaultGlslVersion() now prefers GLSL 300 es when WebGL 2.0 is available,
as there no any OpenGL ES greater than 3.0 emulation so far.

Shaders_Declarations.glsl - added workaround for GLSL compilation on WebGL 1.0
by defining Light properties accessors as macros instead of functions
('[]' : Index expression must be constant).

OpenGl_FrameBuffer::Init() - added workaround for initialization of GL_DEPTH24_STENCIL8
depth-stencil attachment on WebGL 1.0 + GL_WEBGL_depth_texture extension.

OpenGl_Context::Vec4FromQuantityColor() now considers myIsSRgbActive flag
to handle use case, when Immediate Layer is drawn directly into window buffer,
which is not sRGB-ready.

Added new sample - OCCT WebGL viewer.
2019-10-27 00:43:07 +03:00