Commit Graph
2262 Commits
Author SHA1 Message Date
Romain Guy aa3b0a4e16 Add --single to only edit the first renderable 2020-01-28 17:12:20 -08:00
Philip Rideout ff66e980eb Add ResourceLoader::hasResourceData. 2020-01-28 14:51:02 -08:00
Philip Rideout 6fbf8a8be0 Fix event pumping with non-owned platforms.
Tested with WebGL and macOS.
2020-01-28 13:39:58 -08:00
Philip Rideout 1452ce62f4 Remove srcDirs hack, use packagingOptions / exclude. 2020-01-28 12:31:14 -08:00
Philip Rideout d84d095c97 The Android support libs now use dynamic linking.
In my first attempt I kept the multiple project-level dependencies in
each sample's `build.gradle` but that resulted in a gradle error
concerning multiple copies of the same SO file. To work around this
we now append to "srcDirs" to bring in Java dependencies rather than
using project-level dependencies.

The new APK contents are now much more reasonably sized:

    libfilament-jni.so         981 KB
    libgltfio-jni.so           817 KB
    libfilament-utils-jni.so    96 KB

Previously this was:

    libfilament-utils-jni.so    1.8 MB
    libgltfio-jni.so            1.8 MB (unused)
    libfilament-jni.so          1 MB (unused)

Fixes #2070
2020-01-28 12:31:14 -08:00
Philip Rideout e1b498f82c Repair iOS error due to STBI_NO_STDIO.
Fixes #2072.
2020-01-28 12:26:31 -08:00
Benjamin Doherty 06726fe361 Regenerate Xcode project for hello-ar iOS sample 2020-01-28 11:09:34 -08:00
Ben Doherty ba3a274357 Fix headers in iOS samples (#2074) 2020-01-28 10:56:28 -08:00
Romain Guy 30a3d31a3d Update README 2020-01-27 13:46:56 -08:00
Romain Guy 191c89c3b1 Exclude .kt files from javadocs 2020-01-27 13:46:25 -08:00
Romain Guy 42b739154e Update Maven library version 2020-01-27 13:30:34 -08:00
Philip Rideout 721a251b34 Bump package.json to 1.4.5 2020-01-27 13:02:19 -08:00
Ben Doherty 1a66f85b67 Update RELEASE_NOTES for 1.4.5 v1.4.5 2020-01-27 12:59:35 -08:00
Romain Guy 3bba92f813 Fix build message 2020-01-27 12:03:56 -08:00
Philip Rideout 93c9674e2a Fix WebGL build. 2020-01-27 11:37:17 -08:00
John Davis a4b879227d fix case sensitivity problem for linux 2020-01-26 19:17:57 -08:00
Philip Rideout 485dfa6cde Fix typo. 2020-01-24 20:51:31 -08:00
Mathias Agopian 3105a8330e remove unneeded includes in public headers
Replace with forward declarations if needed and includes in .cpp that
now need them.
The idea here is to have our headers have the least amount of impact as
possible on our clients (e.g. compilation time).
2020-01-24 12:13:48 -08:00
Mathias Agopian 88e8661bf3 New API to import textures into filament
If you need this, you know who you are.
The new Texture::Builder::import() allows to specify a OpenGLES texture
id from a shared GL context, effectively importing the texture into
filament.
The texture is NOT destroyed when calling Engine::destroy(Texture*), only
its filament handle.
2020-01-24 12:13:20 -08:00
Mathias Agopian 3a9629d93c Fix a NOOP backend threading bug (#2064)
The NOOP backend didn’t call user-API callbacks from the main thread
(instead calling them from the “backend thread”). This caused problems
with unit tests for instance.
2020-01-23 14:55:25 -10:00
Mathias Agopian 29c14b1053 Fix typo in documentation (#2065)
lastest -> latest
2020-01-23 14:55:09 -10:00
Philip Rideout bd5aeb6b69 Allow non-WebGL builds to disable threads. 2020-01-23 11:06:17 -08:00
Philip Rideout 3674361f20 ModelViewer now automatically detaches. 2020-01-23 09:55:51 -08:00
Philip Rideout 4a29456a7a ModelViewer now works with TextureView. 2020-01-23 09:55:51 -08:00
Philip Rideout 3179a83cfb Android: introduce ModelViewer helper.
This reduces the LOC of our gltf-viewer app from 260 to 146. This could
have been more, but I feel this provides good balance between
flexibility and convenience.

The raw gltfio API involves multiple objects (FilamentAsset,
AssetLoader, ResourceLoader) whereas the ModelViewer has a simple facade
consisting of two methods, one for GLB and one for GLTF. The underlying
gltfio objects are available via non-settable properties.
2020-01-23 09:55:51 -08:00
Ben Doherty 5fe1fe73c4 Use Objective-C availability tests for Metal backend (#2046) 2020-01-23 09:16:19 -08:00
Philip Rideout 5025d8eb6e Remove usage of the invariant keyword. 2020-01-21 14:42:58 -08:00
Philip Rideout 71697b59a3 Disable depth prepass everywhere.
Fixes #737 and #1472. See also #475 and #1295.
2020-01-21 14:42:58 -08:00
Philip Rideout 518ae9658f gltfio + Android: improve memory management.
Add bindings for releaseSourceAsset() and fix a double-free issue.

According to the Android Studio profiler, this makes Java memory usage
go from 18.6 MB to 6.5 MB.
2020-01-21 13:01:55 -08:00
Philip Rideout 41ad8b5c18 Remove unused copy of the parquet PNG. 2020-01-21 12:58:46 -08:00
Philip Rideout 51cef3b5ca WebGL: unify the PNG and JPEG codepaths.
Fixes #2055.
2020-01-21 12:58:46 -08:00
Philip Rideout 491d16a4e5 Exercise JPG decoding in web samples. 2020-01-21 12:58:46 -08:00
Philip Rideout e752b6fb6f Factor STB config into a header. 2020-01-21 12:58:46 -08:00
Philip Rideout 46bf6fbfdd Simplify sample-gltf-viewer as much as possible. 2020-01-21 12:57:50 -08:00
Philip Rideout fd5fe3d18d Convert KtxLoader to Kotlin and remove usage of reflection.
Fixes #1510
2020-01-21 12:57:09 -08:00
Philip Rideout ca2da39614 Migrate TextureLoader to filament-utils. 2020-01-21 07:59:51 -08:00
Philip Rideout 067dad2d38 camutils: rename internal enums. 2020-01-17 11:37:57 -08:00
Philip Rideout f91a8890a6 camutils: fix bad defaults in Manipulator. 2020-01-17 11:37:10 -08:00
Philip Rideout dd9b84f06e GestureDetector cleanup. 2020-01-17 10:45:17 -08:00
Philip Rideout 9ac17a88b3 Add new sample for glTF models and the camera manipulator.
This differs from the bloom demo in that it supports touch interaction,
has animation, loads from GLTF rather than GLB, and is overall simpler.
2020-01-17 09:09:46 -08:00
Philip Rideout 9ea8148d84 Add doubles to Manipulator for convenience. 2020-01-17 09:09:46 -08:00
Romain Guy 16c65550bb Fix javadoc syntax 2020-01-16 17:27:06 -08:00
Philip Rideout 961860adee Introduce filament-utils and Java bindings for camutils.
This library houses the KTX loader, camutils bindings, and a Kotlin math
library. More will come later. Sample app is forthcoming.
2020-01-16 16:00:23 -08:00
Philip Rideout 6146b4d2d9 Fix out-of-bounds when glTF has many UV sets.
glTF specifies that client implementations must support at least two UV
texture coordinate sets but does not seem to have an upper limit.

We use a mapping table in order to honor high-numbered UV set indices,
but our mapping table only accomodates 8 entries.

Fixes #2042
2020-01-16 14:09:48 -08:00
Philip Rideout 274cd3a1f3 Refactor some Android build things for gltfio.
We currently use static linking and will continue to do so. This means
that libfilament-jni is a subset of of libgltfio-jni, and libgltfio-jni
will become a subset of the upcoming libutils-jni.

This is a simple layer cake, but requires adding some CMake logic to the
gltfio-android CMakeLists, similar to what we already did for the
filament-android CMakeLists. This prevents an obscure CMake error about
duplicated build artifacts.

Also, previously we required clients to call AssetLoader#init(), this
is now renamed to Gltfio#init(), which is more consistent with
Filament#init().
2020-01-16 10:11:36 -08:00
Romain Guy 762e8b8b6a Add more control to surface ordering (#2041)
When UiHelper is set to translucent with setOpaque(false), the
target SurfaceView's surface is set to be composited on top of
the activity's window. There are situations however where one
may want to render regular Views on top of the SurfaceView.

The new setMediaOverlay() API allows exactly that: when this
property is enabled, rendering to a translucent target will
cause the SurfaceView's surface to be composited above other
surfaces, but below the activity's surface.
2020-01-16 10:00:26 -08:00
Philip Rideout a5a6e9be8a Add animated GLTF model to third_party.
This asset will be used in an upcoming Android sample. I converted the
textures from PNG to JPG to reduce the footprint.
2020-01-15 16:56:46 -08:00
Philip Rideout 4ab65975f4 Update Android Studio required version. 2020-01-15 11:22:57 -08:00
BStringhamVRSK 041f26a7c5 Implemented sRGB support for DXT encoded textures (#2026)
* Added sRGB support for DXT compressed textures - OpenGL

* Added sRGB support for DXT compressed textures - Vulkan and Metal

* Added detection if OpenGL driver supports sRGB compressed textures (EXT_texture_sRGB extension)

* Fixed whitespace to use spaces rather than tabs

* Test for GL_EXT_texture_sRGB or GL_EXT_texture_compression_s3tc_srgb support for sRGB DXT compressed textures

* GL ES uses GL_EXT_texture_compression_s3tc_srgb instead of GL_EXT_texture_sRGB
2020-01-15 10:26:29 -08:00
Mathias Agopian b351e709c1 Framegraph improvements
- added a way to compare two handle's underlaying resource
  (i.e. do they refer to the same resource)

- minor refactoring and comment fixes
2020-01-15 10:22:10 -08:00