The web archive now has two subfolders: public and filamentjs.
- public contains the three C++ based web demos.
- jsbindings contains the new JS bindings and Filament-only WASM module.
This adds filamentjs to libs, which builds a Filament-only WASM file.
Unlike our existing web demos, this WASM file contains no application
code.
These bindings are by no means complete, but they are sufficient for a
"hello triangle" demo that I have working locally. Sneak peak of the
Triangle JS app code:
https://gist.github.com/prideout/e9d6dd0e312146c8a287d2d109affa4d
This commit merely adds the bindings to the build. Demos and docs are
forthcoming.
For test coverage, ensure that one of our C++ based web samples
uses a filamat file instead of inc, because this is how the JS based
web samples will work.
This makes pre-zipped triangle wasm go from 747 KB to 741 KB.
Recent changes to UBO management introduce the possibility of calling
glBufferSubData on zero-length regions, which cause a cascade of
GL_INVALID_OPERATION with the Suzanne WebGL demo. Note that the WebGL
variant of BufferSubData has special behavior when length = 0.
This also seems like a potentially useful optimization for non-web
platforms, since a CPU branch is likely cheaper than a GL entry point.
This commit also seems to fix a segfault seen with the "vk_imgui" sample
after changing its backend to OPENGL.
Fixes#366
The web build now invokes cmgen three times for each IBL: uncompressed,
S3TC (desktop), and ETC (mobile). Alternatively, we could enhance cmgen
to accept multiple compression strings, but per discussion with Mathias
we decided to keep it simple.
I decided not to use compression for the skybox in our web demos because
the quality is too poor (see PR image). I did not try playing with
compression settings, might be worth revisiting in the future.
The UniformBuffer class is moved out of the Driver,
and the driver api now takes a BufferDescriptor
as input of updateUniformBuffer. This makes it
more generic.
As an added benefit, we can now allocate the
uploaded uniform data directly into the
command stream, which saves synchronization points.
This change will allow the skybox use a compressed texture format.
For now, the old internal format "RGBM" is still honored, but in a
forthcoming change we will replace the enum with UNUSED.
* Add support for save/replay of the current view.
* Add support for having distinct draw/read surfaces.
Adds support to egl & glx drivers for distring draw/read surfaces and
uses this support to implement mirrorFrame using a single blit.
* Use src/dst, Viewport, clean up apis.
* Add SwapChain READABLE Config.
* Commit & setPresentationTime optional on mirror.
* Fix flag check.
* Add documentation for READABLE swap chain config.
* Fix missed s/ExternalContext/Platform/ cases.
* Build break fix.
When using GAUSSIAN_NORMALS, image::resampleImage automatically unitizes
its output. This means that clients (e.g. mipgen) need to ensure that
the source image is in [-1,+1] rather than [0,+1].
This code manages the virtual machine as well as
external streams. The idea here is that the Vulkan
platform could use this code when it adds support
for external buffers/streams (or at least it will
be easier). None of this needs EGL.
Rename everything related.
Also Platform::create() returns a raw Driver*
instead of a unique_ptr<Driver>. This is to
remove a dependency on <memory> in public
headers.
FEngine doesn’t take ownership of ExternalContext if
it’s passed as a parameter, however, in the common
case it’s not, and FEngine owns it — and must take
care of destroying it.
Also fix this behavior in “single thread” mode,
the given ExternalContext was ignored.