Git Product home page Git Product logo

google / filament Goto Github PK

View Code? Open in Web Editor NEW
17.1K 378.0 1.8K 678.38 MB

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2

Home Page: https://google.github.io/filament/

License: Apache License 2.0

CMake 1.28% C++ 56.83% Objective-C++ 2.01% C 11.68% Java 4.93% Shell 0.47% HTML 0.46% Python 0.47% Assembly 16.61% GLSL 1.53% Kotlin 2.57% Batchfile 0.03% JavaScript 0.59% CSS 0.09% Objective-C 0.33% TypeScript 0.02% Groovy 0.07% Ruby 0.03% Dockerfile 0.01% RenderScript 0.01%
pbr graphics 3d-graphics real-time android opengl opengl-es vulkan webgl wasm

filament's Introduction

Filament

Android Build Status iOS Build Status Linux Build Status macOS Build Status Windows Build Status Web Build Status

Filament is a real-time physically based rendering engine for Android, iOS, Linux, macOS, Windows, and WebGL. It is designed to be as small as possible and as efficient as possible on Android.

Download

Download Filament releases to access stable builds. Filament release archives contains host-side tools that are required to generate assets.

Make sure you always use tools from the same release as the runtime library. This is particularly important for matc (material compiler).

If you'd rather build Filament yourself, please refer to our build manual.

Android

Android projects can simply declare Filament libraries as Maven dependencies:

repositories {
    // ...
    mavenCentral()
}

dependencies {
    implementation 'com.google.android.filament:filament-android:1.51.4'
}

Here are all the libraries available in the group com.google.android.filament:

Artifact Description
filament-android The Filament rendering engine itself.
filament-android-debug Debug version of filament-android.
gltfio-android A glTF 2.0 loader for Filament, depends on filament-android.
filament-utils-android KTX loading, Kotlin math, and camera utilities, depends on gltfio-android.
filamat-android A runtime material builder/compiler. This library is large but contains a full shader compiler/validator/optimizer and supports both OpenGL and Vulkan.
filamat-android-lite A much smaller alternative to filamat-android that can only generate OpenGL shaders. It does not provide validation or optimizations.

iOS

iOS projects can use CocoaPods to install the latest release:

pod 'Filament', '~> 1.51.4'

Snapshots

If you prefer to live on the edge, you can download a continuous build by following the following steps:

  1. Find the commit you're interested in.
  2. Click the green check mark under the commit message.
  3. Click on the Details link for the platform you're interested in.
  4. On the top left click Summary, then in the Artifacts section choose the desired artifact.

Documentation

  • Filament, an in-depth explanation of real-time physically based rendering, the graphics capabilities and implementation of Filament. This document explains the math and reasoning behind most of our decisions. This document is a good introduction to PBR for graphics programmers.
  • Materials, the full reference documentation for our material system. This document explains our different material models, how to use the material compiler matc and how to write custom materials.
  • Material Properties, a reference sheet for the standard material model.

Examples

Night scene Night scene Materials Materials Helmet Screen-space refraction

Features

APIs

  • Native C++ API for Android, iOS, Linux, macOS and Windows
  • Java/JNI API for Android
  • JavaScript API

Backends

  • OpenGL 4.1+ for Linux, macOS and Windows
  • OpenGL ES 3.0+ for Android and iOS
  • Metal for macOS and iOS
  • Vulkan 1.0 for Android, Linux, macOS, and Windows
  • WebGL 2.0 for all platforms

Rendering

  • Clustered forward renderer
  • Cook-Torrance microfacet specular BRDF
  • Lambertian diffuse BRDF
  • Custom lighting/surface shading
  • HDR/linear lighting
  • Metallic workflow
  • Clear coat
  • Anisotropic lighting
  • Approximated translucent (subsurface) materials
  • Cloth/fabric/sheen shading
  • Normal mapping & ambient occlusion mapping
  • Image-based lighting
  • Physically-based camera (shutter speed, sensitivity and aperture)
  • Physical light units
  • Point lights, spot lights, and directional light
  • Specular anti-aliasing
  • Point, spot, and directional light shadows
  • Cascaded shadows
  • EVSM, PCSS, DPCF, or PCF shadows
  • Transparent shadows
  • Contact shadows
  • Screen-space ambient occlusion
  • Screen-space reflections
  • Screen-space refraction
  • Global fog
  • Dynamic resolution (with support for AMD FidelityFX FSR)

Post processing

  • HDR bloom
  • Depth of field bokeh
  • Multiple tone mappers: generic (customizable), ACES, filmic, etc.
  • Color and tone management: luminance scaling, gamut mapping
  • Color grading: exposure, night adaptation, white balance, channel mixer, shadows/mid-tones/highlights, ASC CDL, contrast, saturation, etc.
  • TAA, FXAA, MSAA
  • Screen-space lens flares

glTF 2.0

  • Encodings

    • Embeded
    • Binary
  • Primitive Types

    • Points
    • Lines
    • Line Loop
    • Line Strip
    • Triangles
    • Triangle Strip
    • Triangle Fan
  • Animation

    • Transform animation
    • Linear interpolation
    • Morph animation
      • Sparse accessor
    • Skin animation
    • Joint animation
  • Extensions

    • KHR_draco_mesh_compression
    • KHR_lights_punctual
    • KHR_materials_clearcoat
    • KHR_materials_emissive_strength
    • KHR_materials_ior
    • KHR_materials_pbrSpecularGlossiness
    • KHR_materials_sheen
    • KHR_materials_transmission
    • KHR_materials_unlit
    • KHR_materials_variants
    • KHR_materials_volume
    • KHR_mesh_quantization
    • KHR_texture_basisu
    • KHR_texture_transform
    • EXT_meshopt_compression

Rendering with Filament

Native Linux, macOS and Windows

You must create an Engine, a Renderer and a SwapChain. The SwapChain is created from a native window pointer (an NSView on macOS or a HWND on Windows for instance):

Engine* engine = Engine::create();
SwapChain* swapChain = engine->createSwapChain(nativeWindow);
Renderer* renderer = engine->createRenderer();

To render a frame you must then create a View, a Scene and a Camera:

Camera* camera = engine->createCamera(EntityManager::get().create());
View* view = engine->createView();
Scene* scene = engine->createScene();

view->setCamera(camera);
view->setScene(scene);

Renderables are added to the scene:

Entity renderable = EntityManager::get().create();
// build a quad
RenderableManager::Builder(1)
        .boundingBox({{ -1, -1, -1 }, { 1, 1, 1 }})
        .material(0, materialInstance)
        .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vertexBuffer, indexBuffer, 0, 6)
        .culling(false)
        .build(*engine, renderable);
scene->addEntity(renderable);

The material instance is obtained from a material, itself loaded from a binary blob generated by matc:

Material* material = Material::Builder()
        .package((void*) BAKED_MATERIAL_PACKAGE, sizeof(BAKED_MATERIAL_PACKAGE))
        .build(*engine);
MaterialInstance* materialInstance = material->createInstance();

To learn more about materials and matc, please refer to the materials documentation.

To render, simply pass the View to the Renderer:

// beginFrame() returns false if we need to skip a frame
if (renderer->beginFrame(swapChain)) {
    // for each View
    renderer->render(view);
    renderer->endFrame();
}

For complete examples of Linux, macOS and Windows Filament applications, look at the source files in the samples/ directory. These samples are all based on libs/filamentapp/ which contains the code that creates a native window with SDL2 and initializes the Filament engine, renderer and views.

For more information on how to prepare environment maps for image-based lighting please refer to BUILDING.md.

Android

See android/samples for examples of how to use Filament on Android.

You must always first initialize Filament by calling Filament.init().

Rendering with Filament on Android is similar to rendering from native code (the APIs are largely the same across languages). You can render into a Surface by passing a Surface to the createSwapChain method. This allows you to render to a SurfaceTexture, a TextureView or a SurfaceView. To make things easier we provide an Android specific API called UiHelper in the package com.google.android.filament.android. All you need to do is set a render callback on the helper and attach your SurfaceView or TextureView to it. You are still responsible for creating the swap chain in the onNativeWindowChanged() callback.

iOS

Filament is supported on iOS 11.0 and above. See ios/samples for examples of using Filament on iOS.

Filament on iOS is largely the same as native rendering with C++. A CAEAGLLayer or CAMetalLayer is passed to the createSwapChain method. Filament for iOS supports both Metal (preferred) and OpenGL ES.

Assets

To get started you can use the textures and environment maps found respectively in third_party/textures and third_party/environments. These assets are under CC0 license. Please refer to their respective URL.txt files to know more about the original authors.

Environments must be pre-processed using cmgen or using the libiblprefilter library.

How to make contributions

Please read and follow the steps in CONTRIBUTING.md. Make sure you are familiar with the code style.

Directory structure

This repository not only contains the core Filament engine, but also its supporting libraries and tools.

  • android: Android libraries and projects
    • filamat-android: Filament material generation library (AAR) for Android
    • filament-android: Filament library (AAR) for Android
    • filament-utils-android: Extra utilities (KTX loader, math types, etc.)
    • gltfio-android: Filament glTF loading library (AAR) for Android
    • samples: Android-specific Filament samples
  • art: Source for various artworks (logos, PDF manuals, etc.)
  • assets: 3D assets to use with sample applications
  • build: CMake build scripts
  • docs: Documentation
    • math: Mathematica notebooks used to explore BRDFs, equations, etc.
  • filament: Filament rendering engine (minimal dependencies)
    • backend: Rendering backends/drivers (Vulkan, Metal, OpenGL/ES)
  • ide: Configuration files for IDEs (CLion, etc.)
  • ios: Sample projects for iOS
  • libs: Libraries
    • bluegl: OpenGL bindings for macOS, Linux and Windows
    • bluevk: Vulkan bindings for macOS, Linux, Windows and Android
    • camutils: Camera manipulation utilities
    • filabridge: Library shared by the Filament engine and host tools
    • filaflat: Serialization/deserialization library used for materials
    • filagui: Helper library for Dear ImGui
    • filamat: Material generation library
    • filamentapp: SDL2 skeleton to build sample apps
    • filameshio: Tiny filamesh parsing library (see also tools/filamesh)
    • geometry: Mesh-related utilities
    • gltfio: Loader for glTF 2.0
    • ibl: IBL generation tools
    • image: Image filtering and simple transforms
    • imageio: Image file reading / writing, only intended for internal use
    • matdbg: DebugServer for inspecting shaders at run-time (debug builds only)
    • math: Math library
    • mathio: Math types support for output streams
    • utils: Utility library (threads, memory, data structures, etc.)
    • viewer: glTF viewer library (requires gltfio)
  • samples: Sample desktop applications
  • shaders: Shaders used by filamat and matc
  • third_party: External libraries and assets
    • environments: Environment maps under CC0 license that can be used with cmgen
    • models: Models under permissive licenses
    • textures: Textures under CC0 license
  • tools: Host tools
    • cmgen: Image-based lighting asset generator
    • filamesh: Mesh converter
    • glslminifier: Minifies GLSL source code
    • matc: Material compiler
    • matinfo Displays information about materials compiled with matc
    • mipgen Generates a series of miplevels from a source image
    • normal-blending: Tool to blend normal maps
    • resgen Aggregates binary blobs into embeddable resources
    • roughness-prefilter: Pre-filters a roughness map from a normal map to reduce aliasing
    • specular-color: Computes the specular color of conductors based on spectral data
  • web: JavaScript bindings, documentation, and samples

License

Please see LICENSE.

Disclaimer

This is not an officially supported Google product.

filament's People

Contributors

adrianatgoogle avatar alexey-pelykh avatar ansman avatar bejado avatar bstringhamvrsk avatar chubei-oppen avatar daemyung avatar elizagamedev avatar frguthmann avatar greg7mdp avatar jeanlemotan avatar jwinarske avatar loganmlawrence avatar mackong avatar magicwhale avatar mastraer avatar michael-lfx avatar mingweisamuel avatar palver123 avatar pixelflinger avatar poweifeng avatar prideout avatar romainguy avatar roxlu avatar shartte avatar suzp1984 avatar thomasgorisse avatar tpsiaki avatar veghbalazs avatar z3moon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filament's Issues

Provide a C library wrapper for filament

Is your feature request related to a problem? Please describe.
Use filament from other languages such as .NET, Python, or pretty much anything with a foreign function interface. C++ ABIs are vendor specific, while C can be portable.

Describe the solution you'd like
Provide a shared library that exposes a C ABI that is not necessarily stable or backwards compatible, but allows use of filament from other languages. It would be aligned closely to the JNI wrapper, but would not make use of any language specific environment (so no JVM, etc.). Instead, it would expose it's interface using basic C types, and wrap native Filament pointers.

Describe alternatives you've considered
For .NET, there's C++/CLI which would allow a wrapper to be written in C++, but P/Invoke is more portable, since .NET Core does not support the various forms of C++/CLI. Also, a C based wrapper library would allow languages other than .NET to make use of filament. Languages like Python for example, which could then make use of filament through cffi (which also has more optimal integration in Python JITs such as PyPy). I have not looked at other languages but FFI is not uncommon. Currently Java will only allow FFI through wrappers such as JNA (not as fast as JNI), but upcoming developments in the Java world will even allow Java to make use of the C interface (Project Panama or today via JNR), although it's unlikely this'll make it to Android. As such on Android, JNI will probably stay relevant for the forseeable future.

I've also looked at generating C-wrappers declaratively through software like SWIG, but apparently there is no working C backend for SWIG at the moment, which is unfortunate.

What I didn't investigate is writing a custom wrapper generator, due to the (seemingly) higher maintenance cost.

OS and backend
Not OS specific.

Documentation is needed

We need to write on-boarding documentation in the Wiki section of the project. Most notably:

  • How to setup an Engine, Renderer and View with SDL or equivalent
  • How to setup an Engine, Renderer and View with Android
  • How to create/load geometry (VertexBuffer and IndexBuffer)
  • How to create, compile and load a simple material
  • Better, simpler, stand-alone samples

cmgen with ibl-is-mipmap + EXR PIZ output crashes

Describe the bug

cmgen crashes inside of TinyEXR in some situation due to out-of-bounds access(detectable by ASAN)

To Reproduce

  1. Generate sunsky.exr using skygen
  2. Generate is-mipmap in cmgen with EXR as output format.
$ ./cmgen --ibl-is-mipmap=is -f exr sunsky.exr
Crash

Solution

The reason is the size of temporary buffer for PIZ compression is not sufficient.

I don't know what is conservative&good value for it but I have increased temporary buffer size heuristically as in this commit:

syoyo/tinyexr@05df598

At least I've confirmed it now works well.

Better solution is updating tinyexr.h file in Filament repo.

Pre-built binaries for Windows

Will pre-built binaries for Windows be released as well? Currently the release page has binaries for the *nix based platforms, but not for Windows.

I've tried building filament on both my machine and Appveyor, but failed miserably (mostly due to issues with -fno-exception, apparently). Should I open an issue regarding those failures, or rather wait for official binaries?

(Appveyor failure console output can be found here: https://ci.appveyor.com/project/shartte/filament)

Windows build fails with clang assertion failure

Following the build steps, when compiling sample-app.vcxproj (FilamentApp.cpp, IBL.cpp, IcoSphere.cpp, Image.cpp, and NativeWindowHelperWindows.cpp) I get a crash in clang:

Assertion failed: CXXInfo->BaseOffsets.count(Base) && "Did not find base!", file C:\src\llvm_package_336178\llvm\tools\clang\include\clang/AST/RecordLayout.h, line 225

It crashes both with the LLVM version linked in the README and the latest available.

Thread 2 "FEngine::loop" received signal SIGSEGV, Segmentation fault.

OK ... vk_strobecolor works, but when I try vk_hellotriangle , I get a SIGSEGV :

(gdb) run
Starting program: /home/kjh/filament/out/cmake-debug/samples/vk_hellotriangle
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-30.fc28.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
FEngine (64 bits) created at 0x7ffff5be7010
[New Thread 0x7ffff4fe4700 (LWP 31293)]
FEngine resolved backend: Vulkan
INTEL-MESA: warning: Bay Trail Vulkan support is incomplete
Selected physical device: Intel(R) Bay Trail
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
Missing separate debuginfo for /lib64/libGLX_mesa.so.0
Try: dnf --enablerepo='debug' install /usr/lib/debug/.build-id/aa/7b9e010d068bc3af7d14f1491eb0e37809bff0.debug
Missing separate debuginfo for /lib64/libglapi.so.0
Try: dnf --enablerepo='debug' install /usr/lib/debug/.build-id/c9/9c6d22a33c958d0a790732dabd8c38d1c22d1e.debug
warning: Loadable section ".note.gnu.property" outside of ELF segments
Missing separate debuginfo for /usr/lib64/dri/i965_dri.so
Try: dnf --enablerepo='debug' install /usr/lib/debug/.build-id/21/a8eb9367b7c6065170ed4ce6690914c0be6f8f.debug
[New Thread 0x7fffe619f700 (LWP 31295)]
[New Thread 0x7fffe599e700 (LWP 31296)]
Swap chain does not support 2 images.
vkCreateSwapchain: 1024x640, VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, 2

Thread 2 "FEngine::loop" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff4fe4700 (LWP 31293)]
0x00007fffef764c38 in anv_shader_compile_to_nir (pipeline=0x7ffff04229c0, pipeline=0x7ffff04229c0,
spec_info=0x7ffff00f9470, stage=MESA_SHADER_VERTEX,
entrypoint_name=0x8 <error: Cannot access memory at address 0x8>, module=0x7ffff03fefe0, mem_ctx=)
at vulkan/anv_pipeline.c:149
149 nir_function *entry_point =
Missing separate debuginfos, use: dnf debuginfo-install elfutils-libelf-0.173-1.fc28.x86_64 expat-2.2.5-3.fc28.x86_64 libX11-1.6.5-7.fc28.x86_64 libX11-xcb-1.6.5-7.fc28.x86_64 libXau-1.0.8-11.fc28.x86_64 libXdamage-1.1.4-12.fc28.x86_64 libXext-1.3.3-8.fc28.x86_64 libXfixes-5.0.3-5.fc28.x86_64 libXi-1.7.9-6.fc28.x86_64 libXxf86vm-1.1.4-7.fc28.x86_64 libcxx-6.0.0-2.fc28.x86_64 libcxxabi-6.0.0-2.fc28.x86_64 libdrm-2.4.92-1.fc28.x86_64 libedit-3.1-23.20170329cvs.fc28.x86_64 libffi-3.1-16.fc28.x86_64 libgcc-8.1.1-5.fc28.x86_64 libglvnd-1.0.1-0.7.git5baa1e5.fc28.x86_64 libglvnd-glx-1.0.1-0.7.git5baa1e5.fc28.x86_64 libpciaccess-0.13.4-8.fc28.x86_64 libselinux-2.8-1.fc28.x86_64 libstdc++-8.1.1-5.fc28.x86_64 libwayland-client-1.15.0-1.fc28.x86_64 libxcb-1.13-1.fc28.x86_64 libxshmfence-1.3-1.fc28.x86_64 llvm-libs-6.0.1-1.fc28.x86_64 ncurses-libs-6.1-5.20180224.fc28.x86_64 pcre2-10.31-7.fc28.x86_64 vulkan-loader-1.1.77.0-4.fc28.x86_64 zlib-1.2.11-8.fc28.x86_64

(gdb) where

#0 0x00007fffef764c38 in anv_shader_compile_to_nir (pipeline=0x7ffff04229c0, pipeline=0x7ffff04229c0,
spec_info=0x7ffff00f9470, stage=MESA_SHADER_VERTEX,
entrypoint_name=0x8 <error: Cannot access memory at address 0x8>, module=0x7ffff03fefe0, mem_ctx=)
at vulkan/anv_pipeline.c:149
#1 anv_pipeline_compile () at vulkan/anv_pipeline.c:395
#2 0x00007fffef76520e in anv_pipeline_compile_vs (pipeline=pipeline@entry=0x7ffff04229c0, cache=cache@entry=0x0,
module=module@entry=0x7ffff03fefe0, entrypoint=0xd8932e "main", spec_info=0x0, info=0x7ffff4fe2e90)
at vulkan/anv_pipeline.c:530
#3 0x00007fffef766b6b in anv_pipeline_init () at vulkan/anv_pipeline.c:1319
#4 0x00007fffef7c3d10 in gen7_graphics_pipeline_create (pPipeline=0x7ffff4fe3128, pAllocator=0x0,
pCreateInfo=0x7ffff4fe2e90, cache=0x0, _device=0x7ffff03ba2d0) at vulkan/genX_pipeline.c:1675
#5 gen7_CreateGraphicsPipelines (_device=0x7ffff03ba2d0, pipelineCache=0x0, count=1, pCreateInfos=,
pAllocator=0x0, pPipelines=0x7ffff4fe3128) at vulkan/genX_pipeline.c:1879
#6 0x000000000076e735 in filament::driver::VulkanBinder::getOrCreatePipeline (this=0x7ffff000ec78,
pipeline=0x7ffff4fe3128) at ../../filament/src/driver/vulkan/VulkanBinder.cpp:271
#7 0x000000000070027b in filament::driver::VulkanDriver::draw (this=0x7ffff000e410, ph=..., rasterState=..., rph=...)
at ../../filament/src/driver/vulkan/VulkanDriver.cpp:889
#8 0x0000000000719507 in filament::trampoline<void (filament::driver::VulkanDriver::&)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive), filament::driver::VulkanDriver&, std::__1::tuple<filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive >&, 0ul, 1ul, 2ul> (m=
@0x7ffff4fe3470: (void (filament::driver::VulkanDriver::
)(filament::driver::VulkanDriver * const, filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)) 0x6ffb30 <filament::driver::VulkanDriver::draw(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>, d=..., t=...) at ../../filament/src/driver/CommandStream.h:96
---Type to continue, or q to quit---
#9 0x00000000007193dd in filament::apply<void (filament::driver::VulkanDriver::&)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive), filament::driver::VulkanDriver&, std::__1::tuple<filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive >&> (m=
@0x7ffff4fe3470: (void (filament::driver::VulkanDriver::
)(filament::driver::VulkanDriver * const, filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)) 0x6ffb30 <filament::driver::VulkanDriver::draw(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>, d=..., t=...) at ../../filament/src/driver/CommandStream.h:101
#10 0x0000000000704098 in filament::CommandType<void (filament::Driver::)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>::Command<&filament::Driver::draw>::execute<void (filament::driver::VulkanDriver::)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive), filament::driver::VulkanDriver&> (method=
@0x7ffff4fe3470: (void (filament::driver::VulkanDriver::)(filament::driver::VulkanDriver * const, filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)) 0x6ffb30 <filament::driver::VulkanDriver::draw(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>, driver=..., base=0x7ffff55e7360, next=0x7ffff4fe34c8)
at ../../filament/src/driver/CommandStream.h:139
#11 0x00000000007028f7 in filament::ConcreteDispatcherfilament::driver::VulkanDriver::draw (driver=...,
base=0x7ffff55e7360, next=0x7ffff4fe34c8) at ../../filament/src/driver/DriverAPI.inc:482
#12 0x00000000006abaa0 in filament::CommandBase::execute (this=0x7ffff55e7360, driver=...)
at ../../filament/src/driver/CommandStream.h:82
#13 0x00000000006ab8bf in filament::CommandStream::execute (this=0x7ffff5be7a30, buffer=0x7ffff55e6000)
at ../../filament/src/driver/CommandStream.cpp:78
#14 0x000000000062b62b in filament::details::FEngine::loop (this=0x7ffff5be7010) at ../../filament/src/Engine.cpp:384
#15 0x0000000000641e1d in std::__1::__invoke<int (filament::details::FEngine::
)(), filament::details::FEngine*, , void---Type to continue, or q to quit---

(
__f=@0x10ddb58: (int (filament::details::FEngine::)(filament::details::FEngine * const)) 0x62afd0 filament::details::FEngine::loop(), __a0=@0x10ddb68: 0x7ffff5be7010) at /usr/bin/../include/c++/v1/type_traits:4423
#16 std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, int (filament::details::FEngine::
)(), filament::details::FEngine*, 2ul> (__t=...)
at /usr/bin/../include/c++/v1/thread:342
#17 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, int (filament::details::FEngine::)(), filament::details::FEngine> > (__vp=0x10ddb50)
at /usr/bin/../include/c++/v1/thread:352
#18 0x00007ffff6b2f594 in start_thread () from /lib64/libpthread.so.0
#19 0x00007ffff68630df in clone () from /lib64/libc.so.6
(gdb)

Multiscattering documentation clarification

The documentation for multiscattering energy compensation (https://google.github.io/filament/Filament.md.html#toc4.7.2) gives the following as equation 30:

f(l,v) = f_r(l,v) + \fNormal \left( \frac{1}{r} - 1 \right) f_r(l,v)

(source line: https://github.com/google/filament/blob/master/docs/Filament.md.html#L573)

From the context of the section (particularly equation 28) I believe the subscripts are incorrect, and the equation should instead read:

f_r(l,v) = f_{ss}(l,v) + \fNormal \left( \frac{1}{r} - 1 \right) f_{ss}(l,v)

cmgen's mirror gives strange image result

Describe the bug

cmgen's --mirror gives unexpected image result.

For example, with Ditch River IBL image from http://www.hdrlabs.com/sibl/archive.html,

NX
nx

NX with --mirror

nx-mirror

To Reproduce

$ ./cmgen -x ibls --mirror input.exr

Expected behavior

https://github.com/google/filament/blob/master/tools/cmgen/src/CubemapUtils.cpp#L197

Multiplier N is the source of an issue.
We could simply rewrite it to

src.sampleAt(double3{ -N.x, N.y, N.z })

to get mirrored image? ๐Ÿค”

BlueGL needs to be available for linking

libfilament links statically against libbluegl, it must therefore be available in the install packages, like we do for libbluevk. It is currently not possible to link against filament outside of our CMake build system.

Segfault in cmgen with horizontal cross

When I process a horizontal cross cubemap with cmgen, I get a segmentation fault in Cubemap.cpp::makeSeamless line 102.

When looking at the code :

    if (geometry == Geometry::HORIZONTAL_CROSS) { // horizontal cross
        stich(  getImageForFace(Face::NZ).getPixelRef(0, dim), bpp,
                getImageForFace(Face::NY).getPixelRef(dim - 1, dim - 1), -bpp);

        stich(  getImageForFace(Face::NZ).getPixelRef(dim, 0), bpr,
                getImageForFace(Face::NX).getPixelRef(0, 0), bpr);

        stich(  getImageForFace(Face::NY).getPixelRef(0, dim), bpp,
                getImageForFace(Face::NZ).getPixelRef(dim - 1, dim - 1), -bpp);

    }

With this reference : http://iwearshorts.com/Mike/uploads/2015/04/map.jpg

If this reference is correct, in the last two stich calls, the right column of NZ (dim, 0) and the bottom row of NY (0, dim) are indeed outside the image.

There is probably the same issue with vertical cross, but I didn't try it.

./build.sh -c -a debug fail

Building C object CMakeFiles/cmTC_6a6bd.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/cc -fcolor-diagnostics -o CMakeFiles/cmTC_6a6bd.dir/CheckIncludeFile.c.o -c /home/jomeslu/filament-master/out/cmake-debug/CMakeFiles/CMakeTmp/CheckIncludeFile.c
cc: error: unrecognized command line option โ€˜-fcolor-diagnosticsโ€™
ninja: build stopped: subcommand failed.

Support equirectangular coordinate output for cmgen

Is your feature request related to a problem? Please describe.

cmgen supports reading equiangular envmap but does not support exporting processed envmap image as equiangular coordinate.

Equirectangular(longitude-latitude) coordinate is handy than cubemap since it only requires single file storage and can be easily further processed with image processing tools like imagemagick, gimp, etc.

Describe the solution you'd like

Add equirectangular coordinate output.
We may better to rename cmgen to iblgen or more general naming if we support equirectangular.

Describe alternatives you've considered

Even though we can use/write another tool which converts cubemap to equirectangular, making equirectangular output as a built-in feature of cmgen would be nice.

OS and backend

OS/Backend independent.

Point light doesn't work with the lit shading model?

Set true to the g_moreLights variable in lightbulb.cpp, build the project, and then run it with the VS debugger. It throws an exception which displays the following message in the output window:

Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\MSVCP140D.dll
File: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xutility
Line: 1769
Expression: array iterator not decrementable

I also tried to change the directional light to a point light in the material_sandbox example, and it caused exactly the same problem (exception) above.

My testing environment is:

  • OS: Windows 10 Pro
  • GPU: NVIDIA GeForce GTX 1050 Ti
  • Backend: OpenGL

Build failure (Fedora 27)

Installed CMake and ninja-build, and followed the github instructions. I'm getting:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
third_party/libgtest/tnt/CMakeLists.txt:26 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/gnagy/Downloads/filament-master/out/cmake-release/CMakeFiles/CMakeOutput.log".
See also "/home/gnagy/Downloads/filament-master/out/cmake-release/CMakeFiles/CMakeError.log".

Any suggestions?
Thanks!

Build failure OSX

Hi I get this with easy build, I'm using a brew installed clang 6.01 on OSX 10.12.1 (Sierra).

I suspect there's a mismatch between the brew installed compiler and the Xcode supplied libraries. Not sure why clang++ isn't using its own libraries.

~/filament>./build.sh -j release
Building release in out/cmake-release...
[45/807] Building CXX object libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o
FAILED: libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DFILAMENT_DRIVER_SUPPORTS_VULKAN -I../../libs/utils/include -I../../third_party/libgtest/tnt/../include -I../../third_party/robin-map/tnt/.. -I../../libs/math/include -std=c++14 -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -fcolor-diagnostics -O3 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -MD -MT libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o -MF libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o.d -o libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o -c ../../libs/utils/test/test_Zip2Iterator.cpp
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:280:38: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
                 ,typename enable_if<is_convertible<const _U1&, _T1>::value &&
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
        using std::pair<Ref1, Ref2>::pair;
                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3746:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
            *__j = _VSTD::move(__t);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3870:20: note: in instantiation of function template specialization 'std::__1::__insertion_sort_3<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
            _VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);

(and lots more).

How to integrate a particle system?

I'm working on a scientific visualization. I had implemented a basic PBR renderer in OpenGL for it, but my renderer still lacks a lot of the features needed for my materials. Filament, by contrast, is very fully-featured and I would love to integrate it.

However, I don't see how I can render my particle system when using Filament. I need to render 10k - 100k particles updated on the CPU. I'm currently using instanced rendering (though I hear vertex-shader based approaches are better). I suppose I could try generating all the geometry on the CPU and updating a filament::VertexBuffer every frame, but I was wondering if there's a better way.

It would be perfectly acceptable (maybe even preferable) if I could make my own OpenGL calls as part of the rendering pass, or even if I could just render into the scene after filament (as long as I have depth information). The particles don't really need a fancy PBR shader, so I don't need a very tight integration.

I don't care about the solution being cross-platform. That would be a bonus, but I just need it to work on Linux/OpenGL.

Do you have any suggestions?

(Some) examples don't work

./hellotriangle

FEngine (64 bits) created at 0x10a798000
FEngine resolved backend: Vulkan
[mvk-info] MoltenVK version 1.0.8. Vulkan version 1.0.73.
[mvk-info] GPU device:
		model: AMD Radeon Pro 450
		type: Discrete
		vendorID: 0x1002
		deviceID: 0x67ef
		pipelineCacheUUID: 00000000-0000-0000-0000-271300002718
	supports the following Metal Feature Sets:
		macOS GPU Family 1 v3
		macOS GPU Family 1 v2
		macOS GPU Family 1 v1
[mvk-info] GPU device:
		model: Intel(R) HD Graphics 530
		type: Integrated
		vendorID: 0x8086
		deviceID: 0x191b
		pipelineCacheUUID: 00000000-0000-0000-0000-271300002718
	supports the following Metal Feature Sets:
		macOS GPU Family 1 v3
		macOS GPU Family 1 v2
		macOS GPU Family 1 v1
Selected physical device: AMD Radeon Pro 450
[mvk-info] Created VkDevice to run on GPU AMD Radeon Pro 450
[mvk-info] Created 2 swapchain images with initial size (2048, 1280).
vkCreateSwapchain: 2048x1280, VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, 2
[***MoltenVK ERROR***] VK_ERROR_INITIALIZATION_FAILED: Shader library compile failed (error code 1):
Timeout after 125.000 milliseconds. Likely internal Metal compiler error.
froxel arena: High watermark 0 KiB (0%)
froxel arena: High watermark 0 KiB (0%)
Renderer: Commands High watermark 0 KiB (0%), 3 commands, 40 bytes/command
CircularBuffer: High watermark 5 KiB (0%)
cleaning up 1 leaked filament::details::FMaterial
Destroying 0 descriptor sets.
per-renderpass allocator arena: High watermark 1023 KiB (16%)

./hellopbr

[...]
Selected physical device: AMD Radeon Pro 450
[mvk-info] Created VkDevice to run on GPU AMD Radeon Pro 450
The specified IBL path does not exist: ../samples/envs/office
[1]    88881 segmentation fault  ./hellopbr

./shadowtest

[...]
Selected physical device: AMD Radeon Pro 450
[mvk-info] Created VkDevice to run on GPU AMD Radeon Pro 450
The specified IBL path does not exist: ../samples/envs/office
[1]    89676 segmentation fault  ./shadowtest

./texturedquad

[...]
Selected physical device: AMD Radeon Pro 450
[mvk-info] Created VkDevice to run on GPU AMD Radeon Pro 450
Loaded texture: 2048x2048
[mvk-info] Created 2 swapchain images with initial size (2048, 1280).
vkCreateSwapchain: 2048x1280, VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, 2
[1]    89815 segmentation fault  ./texturedquad

image

Build failure when clang isn't default compiler

The commands in the readme Linux section says:

Your Linux distribution might default to gcc instead of clang, if that's the case invoke cmake with the following command:

But the following command matches the one above.

I tried the obvious to set CC to /usr/bin/clang and CXX to /usr/bin/clang++ prior to running cmake. cmake completes, but the build fails with some fairly basic #include file not found errors (things like and ).

I'm building on Fedora 28 x86_64.

OSX: can't figure out how to use the java JNI library, throws java.lang.UnsatisfiedLinkError: com.google.android.filament.Engine.nCreateEngine(J)J

Describe the bug
Can't figure out how to use the JNI library. Trying to create "Engine" throws java.lang.UnsatisfiedLinkError.

To Reproduce
Steps to reproduce the behavior:

  1. Download filament binaries to "filament" folder.

  2. Create a file MyMain.class with this content

    import com.google.android.filament.*;
    
    public class MyMain {
        public static void main(String[] args) {
            Engine engine = Engine.create();
        }
    }
    
  3. Compile

    javac -cp filament/lib/filament-java.jar MyMain.java
    
  4. Run

    java -cp filament/lib/filament-java.jar:./ -Djava.library.path=$PWD/filament/lib/x86_64/ MyMain
    

Expected behavior
The app would not crash. However, this output is produced:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.google.android.filament.Engine.nCreateEngine(J)J
        at com.google.android.filament.Engine.nCreateEngine(Native Method)
        at com.google.android.filament.Engine.create(Engine.java:36)
        at MyMain.main(MyMain.java:5)

Desktop (please complete the following information):

  • OS: OSX 10.12.6
  • java: tried both 10 and 1.8, current version is "1.8.0_144"

Additional context
Tried setting LD_LIBRARY_PATH to filament/lib/x86_64/ and putting those *dylib files into /usr/local/lib, nothing helped.
Also tried compiling filament from sources instead of downloading the binaries, same result.

"Chosen constructor is explicit in copy-initialization" on Windows

I tried compiling yesterday on Windows. This is my setup:
Windows 10
Cmake 3.12.0
Visual Studio 2015 and 2017
Clang 6.0.1

But the built always failed with
chosen constructor is explicit in copy-initialization filament filament\libs\utils\include\utils\StructureOfArrays.h 132

According to the compiler the culprit is in filament\libs\utils\include\utils\StructureOfArrays.h line 132, which is this constructor:

template<size_t ... Is>
static Type init(StructureRef const& rhs, std::index_sequence<Is...>) {
return { rhs.soa->template elementAt(rhs.index)... };
}

After playing around with different compiler versions (Clang 7.0.0, 6.00), using different versions of Visual Studio etc, I decided to just edit the code to

template<size_t ... Is>
static Type init(StructureRef const& rhs, std::index_sequence<Is...>) {
return Type{ rhs.soa->template elementAt(rhs.index)... };
}

But honestly my knowledge on C++14 is too limited to know if this is actually a fix, or doing something completely different. But at least now some of the examples work on my machine (but only in Release, not Debug).

material compiler doesn't exclude comments from brace parsing

Repo steps:

Create a custom material with a block that has a commented-out brace. This can happen during iteration, or testing out special features. Example:

void materialVertex(inout MaterialVertexInputs material) {
    // if (material.uv0.x > 0.5) {
    if (false) {
        material.uv0 = float2(0,0);
    }
}

EXPECTED: material compiles
ACTUAL: brace in commented line is parsed, yielding error syntax error, unexpected RIGHT_BRACE

Thread 2 "FEngine::loop" received signal SIGSEGV, Segmentation fault (not Bay Trail)

Deja vu :

[kjh@usd32 cmake-debug]$ gdb samples/vk_hellotriangle
GNU gdb (GDB) Fedora 8.1.1-3.fc28
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from samples/vk_hellotriangle...done.
(gdb) run
Starting program: /home/kjh/filament/out/cmake-debug/samples/vk_hellotriangle
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-30.fc28.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
FEngine (64 bits) created at 0x7ffff5be7010
[New Thread 0x7ffff4fe4700 (LWP 1164)]
FEngine resolved backend: Vulkan
Validation layer not available; did you install the Vulkan SDK?
Please ensure that VK_LAYER_PATH is set correctly.
Selected physical device: Intel(R) HD Graphics XXX (Braswell)
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
Missing separate debuginfo for /lib64/libGLX_mesa.so.0
Try: dnf --enablerepo='debug' install /usr/lib/debug/.build-id/aa/7b9e010d068bc3af7d14f1491eb0e37809bff0.debug
Missing separate debuginfo for /lib64/libglapi.so.0
Try: dnf --enablerepo='debug' install /usr/lib/debug/.build-id/c9/9c6d22a33c958d0a790732dabd8c38d1c22d1e.debug
warning: Loadable section ".note.gnu.property" outside of ELF segments
Missing separate debuginfo for /usr/lib64/dri/i965_dri.so
Try: dnf --enablerepo='debug' install /usr/lib/debug/.build-id/21/a8eb9367b7c6065170ed4ce6690914c0be6f8f.debug
[New Thread 0x7fffe61a0700 (LWP 1166)]
[New Thread 0x7fffe599f700 (LWP 1167)]
Swap chain does not support 2 images.
vkCreateSwapchain: 1024x640, VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, 2

Thread 2 "FEngine::loop" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff4fe4700 (LWP 1164)]
0x00007fffe9978c38 in anv_shader_compile_to_nir (pipeline=0x7ffff0339340, pipeline=0x7ffff0339340,
spec_info=0x7ffff0020900, stage=MESA_SHADER_VERTEX, entrypoint_name=0x0, module=0x7ffff03415e0,
mem_ctx=) at vulkan/anv_pipeline.c:149
149 nir_function entry_point =
Missing separate debuginfos, use: dnf debuginfo-install elfutils-libelf-0.173-1.fc28.x86_64 expat-2.2.5-3.fc28.x86_64 libX11-1.6.5-7.fc28.x86_64 libX11-xcb-1.6.5-7.fc28.x86_64 libXau-1.0.8-11.fc28.x86_64 libXdamage-1.1.4-12.fc28.x86_64 libXext-1.3.3-8.fc28.x86_64 libXfixes-5.0.3-5.fc28.x86_64 libXi-1.7.9-6.fc28.x86_64 libXxf86vm-1.1.4-7.fc28.x86_64 libcxx-6.0.0-2.fc28.x86_64 libcxxabi-6.0.0-2.fc28.x86_64 libdrm-2.4.93-1.fc28.x86_64 libedit-3.1-23.20170329cvs.fc28.x86_64 libffi-3.1-16.fc28.x86_64 libgcc-8.1.1-5.fc28.x86_64 libglvnd-1.0.1-0.7.git5baa1e5.fc28.x86_64 libglvnd-glx-1.0.1-0.7.git5baa1e5.fc28.x86_64 libpciaccess-0.13.4-8.fc28.x86_64 libselinux-2.8-1.fc28.x86_64 libstdc++-8.1.1-5.fc28.x86_64 libwayland-client-1.15.0-1.fc28.x86_64 libxcb-1.13-1.fc28.x86_64 libxshmfence-1.3-1.fc28.x86_64 llvm-libs-6.0.1-1.fc28.x86_64 ncurses-libs-6.1-5.20180224.fc28.x86_64 pcre2-10.31-8.fc28.x86_64 zlib-1.2.11-8.fc28.x86_64
(gdb) where
#0 0x00007fffe9978c38 in anv_shader_compile_to_nir (pipeline=0x7ffff0339340, pipeline=0x7ffff0339340,
spec_info=0x7ffff0020900, stage=MESA_SHADER_VERTEX, entrypoint_name=0x0, module=0x7ffff03415e0,
mem_ctx=) at vulkan/anv_pipeline.c:149
#1 anv_pipeline_compile () at vulkan/anv_pipeline.c:395
#2 0x00007fffe997920e in anv_pipeline_compile_vs (pipeline=pipeline@entry=0x7ffff0339340,
cache=cache@entry=0x0, module=module@entry=0x7ffff03415e0, entrypoint=0xd8932e "main", spec_info=0x0,
info=0x7ffff4fe2e90) at vulkan/anv_pipeline.c:530
#3 0x00007fffe997ab6b in anv_pipeline_init () at vulkan/anv_pipeline.c:1319
#4 0x00007fffe9a9e398 in gen8_graphics_pipeline_create (pPipeline=0x7ffff4fe3128, pAllocator=0x0,
pCreateInfo=0x7ffff4fe2e90, cache=0x0, _device=0x7ffff02427b0) at vulkan/genX_pipeline.c:1675
#5 gen8_CreateGraphicsPipelines (_device=0x7ffff02427b0, pipelineCache=0x0, count=1,
pCreateInfos=, pAllocator=0x0, pPipelines=0x7ffff4fe3128) at vulkan/genX_pipeline.c:1879
#6 0x000000000076e735 in filament::driver::VulkanBinder::getOrCreatePipeline (this=0x7ffff000efa8,
pipeline=0x7ffff4fe3128) at ../../filament/src/driver/vulkan/VulkanBinder.cpp:271
#7 0x000000000070027b in filament::driver::VulkanDriver::draw (this=0x7ffff000e740, ph=...,
rasterState=..., rph=...) at ../../filament/src/driver/vulkan/VulkanDriver.cpp:889
#8 0x0000000000719507 in filament::trampoline<void (filament::driver::VulkanDriver::
&)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive), filament::driver::VulkanDriver&, std::__1::tuple<filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive >&, 0ul, 1ul, 2ul> (m=
@0x7ffff4fe3470: (void (filament::driver::VulkanDriver::)(filament::driver::VulkanDriver * const, filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)) 0x6ffb30 <filament::driver::VulkanDriver::draw(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>, d=..., t=...)
---Type to continue, or q to quit---
at ../../filament/src/driver/CommandStream.h:96
#9 0x00000000007193dd in filament::apply<void (filament::driver::VulkanDriver::
&)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive), filament::driver::VulkanDriver&, std::__1::tuple<filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive >&> (m=
@0x7ffff4fe3470: (void (filament::driver::VulkanDriver::)(filament::driver::VulkanDriver * const, filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)) 0x6ffb30 <filament::driver::VulkanDriver::draw(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>, d=..., t=...)
at ../../filament/src/driver/CommandStream.h:101
#10 0x0000000000704098 in filament::CommandType<void (filament::Driver::
)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>::Command<&filament::Driver::draw>::execute<void (filament::driver::VulkanDriver::)(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive), filament::driver::VulkanDriver&> (method=
@0x7ffff4fe3470: (void (filament::driver::VulkanDriver::
)(filament::driver::VulkanDriver * const, filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)) 0x6ffb30 <filament::driver::VulkanDriver::draw(filament::Handlefilament::HwProgram, filament::Driver::RasterState, filament::Handlefilament::HwRenderPrimitive)>, driver=..., base=0x7ffff55e7360,
next=0x7ffff4fe34c8) at ../../filament/src/driver/CommandStream.h:139
#11 0x00000000007028f7 in filament::ConcreteDispatcherfilament::driver::VulkanDriver::draw (driver=...,
base=0x7ffff55e7360, next=0x7ffff4fe34c8) at ../../filament/src/driver/DriverAPI.inc:482
#12 0x00000000006abaa0 in filament::CommandBase::execute (this=0x7ffff55e7360, driver=...)
at ../../filament/src/driver/CommandStream.h:82
#13 0x00000000006ab8bf in filament::CommandStream::execute (this=0x7ffff5be7a30, buffer=0x7ffff55e6000)
---Type to continue, or q to quit---
at ../../filament/src/driver/CommandStream.cpp:78
#14 0x000000000062b62b in filament::details::FEngine::loop (this=0x7ffff5be7010)
at ../../filament/src/Engine.cpp:384
#15 0x0000000000641e1d in std::__1::__invoke<int (filament::details::FEngine::)(), filament::details::FEngine, , void> (
__f=@0x10ddb58: (int (filament::details::FEngine::)(filament::details::FEngine * const)) 0x62afd0 filament::details::FEngine::loop(), __a0=@0x10ddb68: 0x7ffff5be7010)
at /usr/bin/../include/c++/v1/type_traits:4423
#16 std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, int (filament::details::FEngine::
)(), filament::details::FEngine*, 2ul> (__t=...)
at /usr/bin/../include/c++/v1/thread:342
#17 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, int (filament::details::FEngine::)(), filament::details::FEngine> > (
__vp=0x10ddb50) at /usr/bin/../include/c++/v1/thread:352
#18 0x00007ffff6b2f594 in start_thread () from /lib64/libpthread.so.0
#19 0x00007ffff68630df in clone () from /lib64/libc.so.6
(gdb)

Fedora build problems

On Fedora 28 :

CC=/usr/bin/clang CXX=/usr/bin/clang++ ./build.sh debug

... works (though bluegl doesn't work on 32 bit systems).

If I do :

./build.sh debug

... I get "Could NOT find Threads (missing: Threads_FOUND)" . Dunno why.

Also, if I do

./build.sh -m debug

... I get : c++: error: unrecognized command line option โ€˜-stdlib=libc++โ€™

This is GNU 8.1.1

ContextManagerWGL should use GetLastError to add information for WGL failures

Is your feature request related to a problem? Please describe.
If someone is debugging WGL failures, having infrastructure that grabs GetLastError would be really helpful instead of having to plumb it manually.

Describe the solution you'd like
ContextManagerWGL doesn't have a ton of hook points. Just use GetLastError to grab error codes after failures. There's also Windows APIs that turn those error codes into strings if you want to spew that as well.

Describe alternatives you've considered
Alternative is to not get the error codes, which is what happens now.

OS and backend
Windows-specific

libsdl2.so: cannot open shared object file

On Fedora 28, if I try the samples, I get :

samples/vk_hellotriangle: error while loading shared libraries: libsdl2.so: cannot open shared object file: No such file or directory

How is this supposed to work? I can "work around" with :

export LD_LIBRARY_PATH=third_party/libsdl2/tnt

... but it would be nice to have an option link against the Fedora package : SDL2-devel

For that matter, a lot of the stuff in third_party is already packaged in Fedora :

spirv-tools , spirv-tools-libs , glslang , etc

Crash on AMD GPU

All examples on OpenGL crashes on same function OpenGLDriver::updateUniformBuffer, on friend pc ( GTX 970, win 10 ) works fine.

OS: Win 10
GPU: RX 480 8GB
Drivers: 18.5.1 ( on older drivers same situation )

FEngine (64 bits) created at 000002C860664080
FEngine resolved backend: OpenGL
HwFence: 16
GLIndexBuffer: 24
GLSamplerBuffer: 24
GLRenderPrimitive: 48
GLTexture: 64
OpenGLProgram: 56
GLRenderTarget: 72
GLVertexBuffer: 112
GLUniformBuffer: 128
GLStream: 128
ATI Technologies Inc.
Radeon (TM) RX 480 Graphics
4.1.13521 Core Profile Forward-Compatible Context 24.20.11016.4
4.50
OS version: 0
Hierarchy depth = 1
OpenGL error 1282 (GL_INVALID_OPERATION) in "void filament::OpenGLDriver::updateUniformBuffer(Driver::UniformBufferHandle, filament::UniformBuffer &&)" at line 1851

Callstack:

ucrtbased.dll!00007fff40f67135() Unknown
ucrtbased.dll!00007fff40f672d3() Unknown
ucrtbased.dll!00007fff40f7bf3d() Unknown
ucrtbased.dll!00007fff40f7af86() Unknown
material_sandbox.exe!filament::GLUtils::checkGLError(utils::io::ostream & out, const char * function, unsigned __int64 line) Line 56 C++
material_sandbox.exe!filament::OpenGLDriver::updateUniformBuffer(filament::Handlefilament::HwUniformBuffer ubh, filament::UniformBuffer && uniformBuffer) Line 1853 C++
material_sandbox.exe!filament::trampoline<void (filament::OpenGLDriver::&)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&),filament::OpenGLDriver &,std::tuple<filament::Handlefilament::HwUniformBuffer,filament::UniformBuffer> &,0,1>(void(filament::OpenGLDriver::)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&) & m, filament::OpenGLDriver & d, std::tuple<filament::Handlefilament::HwUniformBuffer,filament::UniformBuffer> & t, std::integer_sequence<unsigned long long,0,1>) Line 96 C++
material_sandbox.exe!filament::apply<void (filament::OpenGLDriver::&)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&),filament::OpenGLDriver &,std::tuple<filament::Handlefilament::HwUniformBuffer,filament::UniformBuffer> &>(void(filament::OpenGLDriver::)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&) & m, filament::OpenGLDriver & d, std::tuple<filament::Handlefilament::HwUniformBuffer,filament::UniformBuffer> & t) Line 103 C++
material_sandbox.exe!filament::CommandType<void (filament::Driver::)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&)>::Command<&filament::Driver::updateUniformBuffer>::execute<void (filament::OpenGLDriver::)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&),filament::OpenGLDriver &>(void(filament::OpenGLDriver::*)(filament::Handlefilament::HwUniformBuffer, filament::UniformBuffer &&) && method, filament::OpenGLDriver & driver, filament::CommandBase * base, __int64 * next) Line 139 C++
material_sandbox.exe!filament::ConcreteDispatcherfilament::OpenGLDriver::updateUniformBuffer(filament::Driver & driver, filament::CommandBase * base, __int64 * next) Line 354 C++
material_sandbox.exe!filament::CommandBase::execute(filament::Driver & driver) Line 83 C++
material_sandbox.exe!filament::CommandStream::execute(void * buffer) Line 78 C++
material_sandbox.exe!filament::details::FEngine::loop() Line 384 C++

โ€œEasy Build for Androidโ€ runs into a gradle error

Describe the bug
"./build.sh -p android release" runs into a gradle error.

Command log shows below:

bogon:filament allenxuan$ ./build.sh -p android release
Building release in out/cmake-release...
ninja: no work to do.
Building Android release (aarch64)...
[0/1] Install the project...
-- Install configuration: "Release"
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/DriverEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerBindingMap.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/EngineEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/UniformInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/arm64-v8a/libfilabridge.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ShaderBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/MaterialParser.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/FilaflatDefs.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ChunkContainer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/Unflattener.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/arm64-v8a/libfilaflat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/MaterialBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/Package.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/arm64-v8a/libfilamat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/fast.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/half.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TQuatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TVecHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TMatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/scalar.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/quat.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/norm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/arm64-v8a/libutils.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/algorithm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/bitset.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/Entity.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/CString.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/arm64-v8a/libfilament.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Box.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Engine.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/DebugRegistry.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Fence.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Skybox.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Viewport.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/ExternalContext.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/PixelBufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/BufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Camera.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/FilamentAPI.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/RenderableManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Frustum.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Material.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Renderer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SwapChain.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Color.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Stream.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/View.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Exposure.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/LightManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TextureSampler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Texture.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/VertexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TransformManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Scene.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndirectLight.h
Building Android release (arm7)...
[0/1] Install the project...
-- Install configuration: "Release"
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/DriverEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerBindingMap.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/EngineEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/UniformInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/armeabi-v7a/libfilabridge.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ShaderBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/MaterialParser.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/FilaflatDefs.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ChunkContainer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/Unflattener.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/armeabi-v7a/libfilaflat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/MaterialBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/Package.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/armeabi-v7a/libfilamat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/fast.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/half.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TQuatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TVecHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TMatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/scalar.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/quat.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/norm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/armeabi-v7a/libutils.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/algorithm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/bitset.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/Entity.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/CString.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/armeabi-v7a/libfilament.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Box.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Engine.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/DebugRegistry.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Fence.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Skybox.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Viewport.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/ExternalContext.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/PixelBufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/BufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Camera.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/FilamentAPI.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/RenderableManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Frustum.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Material.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Renderer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SwapChain.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Color.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Stream.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/View.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Exposure.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/LightManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TextureSampler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Texture.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/VertexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TransformManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Scene.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndirectLight.h
Building Android release (x86_64)...
[0/1] Install the project...
-- Install configuration: "Release"
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/DriverEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerBindingMap.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/EngineEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/UniformInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86_64/libfilabridge.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ShaderBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/MaterialParser.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/FilaflatDefs.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ChunkContainer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/Unflattener.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86_64/libfilaflat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/MaterialBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/Package.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86_64/libfilamat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/fast.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/half.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TQuatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TVecHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TMatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/scalar.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/quat.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/norm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86_64/libutils.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/algorithm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/bitset.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/Entity.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/CString.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86_64/libfilament.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Box.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Engine.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/DebugRegistry.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Fence.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Skybox.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Viewport.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/ExternalContext.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/PixelBufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/BufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Camera.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/FilamentAPI.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/RenderableManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Frustum.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Material.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Renderer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SwapChain.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Color.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Stream.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/View.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Exposure.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/LightManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TextureSampler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Texture.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/VertexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TransformManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Scene.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndirectLight.h
Building Android release (x86)...
[0/1] Install the project...
-- Install configuration: "Release"
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/DriverEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SamplerBindingMap.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/EngineEnums.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/UniformInterfaceBlock.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86/libfilabridge.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ShaderBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/MaterialParser.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/FilaflatDefs.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/ChunkContainer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filaflat/Unflattener.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86/libfilaflat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/MaterialBuilder.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filamat/Package.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86/libfilamat.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/fast.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/half.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TQuatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TVecHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/TMatHelpers.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/scalar.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/mat2.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec4.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/quat.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/norm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/math/vec3.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86/libutils.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/algorithm.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/bitset.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/compiler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/Entity.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/EntityManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/utils/CString.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/lib/x86/libfilament.a
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Box.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Engine.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/DebugRegistry.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Fence.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Skybox.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Viewport.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/ExternalContext.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/PixelBufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/driver/BufferDescriptor.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Camera.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/FilamentAPI.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/RenderableManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Frustum.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Material.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Renderer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/SwapChain.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Color.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Stream.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/View.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Exposure.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/LightManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/MaterialInstance.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TextureSampler.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Texture.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/VertexBuffer.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/TransformManager.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/Scene.h
-- Up-to-date: /Users/allenxuan/Desktop/ClionProject/filament/out/android-release/filament/include/filament/IndirectLight.h

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'filament-android'.

java.lang.NullPointerException (no error message)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org


Computer Operating System is macOS High Sierra 10.13.6

Environment variables have been set as below:

bogon:filament allenxuan$ printenv
TERM_PROGRAM=Apple_Terminal
ANDROID_HOME=/Users/allenxuan/Library/Android/sdk
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/mb/kg08v7ws02vb79mp_g6zqblm0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.EiGhxMqJe5/Render
TERM_PROGRAM_VERSION=404
OLDPWD=/Users/allenxuan/Desktop/ClionProject
TERM_SESSION_ID=D95AB6B8-014C-4FBF-82FE-DD57332CB944
USER=allenxuan
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.eSo2GdTMuW/Listeners
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/allenxuan/Desktop/ClionProject/filament
JAVA_HOME=/Library/Java/OpenJDK/jdk-10.0.2.jdk/Contents/Home
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/allenxuan
LOGNAME=allenxuan
LC_CTYPE=UTF-8
_=/usr/bin/printenv

Android SDK should have been properly set as
screen shot 2018-08-24 at 10 23 21
screen shot 2018-08-24 at 10 23 31

cmgen importance sampling bug

In CubemapIBL.cpp, in roughnessFilter we invoke Hammersley with sample indices that can be greater than the max sample count. This can potentially lead to issues. We need to make sure that sampleIndex is not greater than 1 / inumSamples.

cmgen unit test needs some love

The tests fail if you try to replace white_furnace, which I think is an encoding issue that causes a related problem, which is that these two images are different:

filament/out/cmake-debug/tools/cmgen/Footballfield/m3_nx.rgbm
filament/tools/cmgen/tests/Footballfield/m3_nx.rgbm

I have started an attempt to fix this up in the pr/comparison branch.

Offscreen rendering

Is your feature request related to a problem? Please describe.
I am using Filament in a game-like project.
In it there is a free moving camera, controlled by the user. This camera is rendered on screen. This works great.
In addition, some of the entities in the game have their own cameras, eyes. The rendered image stream from these cameras will be used in computer vision algorithms, which again is feed into the AI controlling these entities in the game.

What would be the path of least resistance to implement this using the current architecture of Fillament?

Describe the solution you'd like

  • What the entities sees with their "eyes" does not need to be rendered on screen.
  • The rendered views would preferably be available as a buffer of pixel values in user process memory space. Given my limited understanding of the intricacies of GLX/OpenGL programming I imagine rendering to a GPU texture instead of the GPU framebuffer, and then copying this texture back into process memory using some driver call?

I have been trying to understand the current architecture of the rendering system. To my understanding a solution would be to write a custom SwapChain. Looking into this it seemed like there was a tight coupling between SwapChain and, in my case, GLX. Does this mean that everything you render has to go on screen?

I do have time available to implement this feature if given the right directions on how to do it.

Describe alternatives you've considered
It would also be usable to render all the views on screen, and then copy the screen framebuffer back into the user process, but it feels awkward if there are 10s or 100s of entities, each which own their own little box of the physical screen to render their camera.

OS and backend
I am using Linux with the OpenGL backend for my project.
To my understanding usage of the finished feature is OS and backend agnostic, but the actual implementation could require different implementations per OS and backend.

Build fails on Ubuntu 18.04

The command used to invoke the build was following:

sudo apt install libglu1-mesa-dev libc++-dev libc++abi-dev ninja-build libxi-dev
env CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./dist-linux -Bbuild -H.
make -C build -j4

Here is the error:

(.text+0x53d): undefined reference to `__cxa_allocate_exception'
(.text+0x556): undefined reference to `__cxa_guard_acquire'
(.text+0x580): undefined reference to `__cxa_guard_release'
(.text+0x5ea): undefined reference to `__cxa_throw'
(.text+0x60f): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::__assoc_sub_state::set_exception(std::exception_ptr)':
(.text+0x6c8): undefined reference to `__cxa_allocate_exception'
(.text+0x6e1): undefined reference to `__cxa_guard_acquire'
(.text+0x70b): undefined reference to `__cxa_guard_release'
(.text+0x77a): undefined reference to `__cxa_throw'
(.text+0x7a5): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::__assoc_sub_state::set_exception_at_thread_exit(std::exception_ptr)':
(.text+0x85f): undefined reference to `__cxa_allocate_exception'
(.text+0x878): undefined reference to `__cxa_guard_acquire'
(.text+0x8a2): undefined reference to `__cxa_guard_release'
(.text+0x911): undefined reference to `__cxa_throw'
(.text+0x937): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::__assoc_sub_state::__execute()':
(.text+0xc0a): undefined reference to `__cxa_allocate_exception'
(.text+0xc23): undefined reference to `__cxa_guard_acquire'
(.text+0xc4d): undefined reference to `__cxa_guard_release'
(.text+0xc77): undefined reference to `__cxa_throw'
(.text+0xc82): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::future<void>::future(std::__1::__assoc_sub_state*)':
(.text+0xccf): undefined reference to `__cxa_allocate_exception'
(.text+0xce8): undefined reference to `__cxa_guard_acquire'
(.text+0xd12): undefined reference to `__cxa_guard_release'
(.text+0xd3c): undefined reference to `__cxa_throw'
(.text+0xd47): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::promise<void>::~promise()':
(.text+0xf46): undefined reference to `std::logic_error::~logic_error()'
(.text+0xf8a): undefined reference to `__cxa_guard_acquire'
(.text+0xfb8): undefined reference to `__cxa_guard_release'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::promise<void>::get_future()':
(.text+0x1038): undefined reference to `__cxa_allocate_exception'
(.text+0x1051): undefined reference to `__cxa_guard_acquire'
(.text+0x107b): undefined reference to `__cxa_guard_release'
(.text+0x10a5): undefined reference to `__cxa_throw'
(.text+0x10b0): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::promise<void>::set_value()':
(.text+0x10de): undefined reference to `__cxa_allocate_exception'
(.text+0x10f7): undefined reference to `__cxa_guard_acquire'
(.text+0x1121): undefined reference to `__cxa_guard_release'
(.text+0x114b): undefined reference to `__cxa_throw'
(.text+0x1156): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::promise<void>::set_exception(std::exception_ptr)':
(.text+0x11cd): undefined reference to `__cxa_allocate_exception'
(.text+0x11e6): undefined reference to `__cxa_guard_acquire'
(.text+0x1210): undefined reference to `__cxa_guard_release'
(.text+0x123a): undefined reference to `__cxa_throw'
(.text+0x124a): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::promise<void>::set_value_at_thread_exit()':
(.text+0x128e): undefined reference to `__cxa_allocate_exception'
(.text+0x12a7): undefined reference to `__cxa_guard_acquire'
(.text+0x12d1): undefined reference to `__cxa_guard_release'
(.text+0x12fb): undefined reference to `__cxa_throw'
(.text+0x1306): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::__1::promise<void>::set_exception_at_thread_exit(std::exception_ptr)':
(.text+0x137d): undefined reference to `__cxa_allocate_exception'
(.text+0x1396): undefined reference to `__cxa_guard_acquire'
(.text+0x13c0): undefined reference to `__cxa_guard_release'
(.text+0x13ea): undefined reference to `__cxa_throw'
(.text+0x13fa): undefined reference to `__cxa_free_exception'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o): In function `std::exception_ptr std::make_exception_ptr<std::__1::future_error>(std::__1::future_error)':
(.text._ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_[_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_]+0x11): undefined reference to `__cxa_allocate_exception'
(.text._ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_[_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_]+0x4c): undefined reference to `__cxa_throw'
(.text._ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_[_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_]+0x54): undefined reference to `__cxa_begin_catch'
(.text._ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_[_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_]+0x61): undefined reference to `__cxa_end_catch'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o):(.data.rel.ro+0x68): undefined reference to `std::logic_error::what() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o):(.data.rel.ro+0x70): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o):(.data.rel.ro+0x80): undefined reference to `typeinfo for std::logic_error'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o):(.data.rel.ro+0xc0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/libc++.a(future.cpp.o):(.data.rel.ro+0xe0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Same is true whether the build is invoked using ninja or make. For instance, this sequence gives the exact same results:

env CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./dist-linux -Bbuild -H.
cd build; ninja

Using the easy build altogether fails. (I haven't looked at the script yet)

./build.sh -j debug
Warning: JAVA_HOME is not set, skipping Java projects
Building debug in out/cmake-debug...
CMake Error at CMakeLists.txt:5 (message):
  Prevented in-tree build.  Create a sub-directory and invoke cmake from
  there.


-- Configuring incomplete, errors occurred!

Arch linux clang doesn't find standard library headers

Describe the bug
With standard clang version 6.0.1 and gcc version 8.2.1 (delivers std lib on arch) there is an issue of clang complaining that he does not find following headers:

  • string
  • map
  • cmath
  • functional
  • limits

When compiling self written programs these issues do not occur. I've tried to edit the CMakeLists.txt by adding the include_directories where these files reside. This works, but then multiple files complain about an undeclared identifier "strlen".
I suppose the issue resides in customizing parameters when executing clang.

The cmake generator line i use is provided in your build guide:
CC=/usr/bin/clang CXX=/usr/bin/clang++ \ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../debug/filament ../..

This happens on a standard clean install of arch linux with the newest version of clang and gcc.

Segmentation fault while running cmgen on a exr image

Hello,

I get a segmentation fault while running cmgen on a exr image.

Steps to reproduce the behavior:

  1. download the exr image at: https://www.dropbox.com/s/qeijjoi9uq0jt44/hdr_test09.exr?dl=0
  2. run ./cmgen --format=rgbm --deploy=outdir hdr_test09.exr

What I get on macOS X, latest filament (freshly compiled from master branch, as of 28 august 2018) is:

Decoding image...
Segmentation fault: 11
  • OS: macOS 10.13.6
  • GPU: Radeon Pro 460 4096 MB / Intel HD Graphics 530 1536 MB
  • Backend: OpenGL

Need python to build on Windows

Running:
cmake -T"LLVM-vs2014" -G "Visual Studio 14 2015 Win64" ../..
results in:

-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.15063.
-- The C compiler identification is Clang 6.0.1
-- The CXX compiler identification is Clang 6.0.1
-- Check for working C compiler: C:/Program Files/LLVM/msbuild-bin/cl.exe
-- Check for working C compiler: C:/Program Files/LLVM/msbuild-bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files/LLVM/msbuild-bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/LLVM/msbuild-bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is Clang
-- Found assembler: C:/Program Files/LLVM/msbuild-bin/cl.exe
-- The ASM_MASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe
-- Could NOT find Java (missing: Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) (found version "1.8.0_121")
CMake Warning at java/CMakeLists.txt:10 (message):
JDK not found, skipping Java projects
-- No build type selected, default to Debug
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
-- SPIR-V optimizer enabled
-- Configuring done
-- Generating done
-- Build files have been written to: D:/github/filament-master/out/cmake-nopython

and running this:
msbuild TNT.sln /t:material_sandbox /m /p:configuration=Debug

gives this output:

43>CustomBuild: 'PYTHON_EXECUTABLE-NOTFOUND' is not recognized as an internal or external command,
43>CustomBuild: operable program or batch file.
43>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 9009. [D:\github\filament-master\out\cmake-nopython\third_party\spirv-tools\source\SPIRV-Tools.vcxproj]

The win32 implementation of getCanonicalPath doesn't work the same as the base implementation

Win32 implementation calls the Windows SDK function PathCanonicalize but it only works correctly when called with a fully qualified path it seems.

Example : the README for Windows says to test the compiled code with
./samples/material_sandbox --ibl=../samples/envs/office ../assets/models/sphere/sphere.obj

This results directly in calling getCanonicalPath with ../samples/envs/office which then returns samples/envs/office and then the IBL isn't found.

The same issue applies directly to the path for the obj file to open.

Workaround : pass absolute paths. This doesn't work for the IBL though because of another issue later on with path concatenation.

Win64: material_sandbox ImGui font not found

Hi there,

Whilst trying to test the material_sandbox, It happened to crash at:
libs\filagui\src\ImGuiHelper.cpp : line 52.

It seems like getCurrentExecutable() returns the executable path properly and .getParent() removes the material_sandbox.exe from this path.

It afterward adds the path to the font as if assets was a sub-folder to the executable path.

Is there a symlink missing to the assets folder or is getParent() returning something wrong, maybe.

It seems like it could be linked to #13 as getParent uses getCanonicalPath, but something else feels off to me there (get parent only peels the last segment anyway).

here is the path value I get for the font: "X:\\Projects\\Projects\\Renderers\\Filament\\bin\\bin\\Debug\\assets/fonts/Roboto-Medium.ttf"

Hope this can help.
Cheers.

Vulkan Memory Allocator usage in VulkanStagePool class

Hello, I'm the author of Vulkan Memory Allocator library. Thanks for using the library in your project.

I would like to suggest that in file VulkanStagePool.cpp, in function VulkanStagePool::acquireStage, memory usage should be VMA_MEMORY_USAGE_CPU_ONLY rather than VMA_MEMORY_USAGE_CPU_TO_GPU because that's the flag recommended for buffers that are used only as a source of transfer and not directly accessed by GPU while rendering.

By the way, I would also suggest to use version of the library from "development" branch, not from "master", as this release is quite old. You can find there functions to flush and invalidate memory (vmaFlushAllocation, vmaInvalidateAllocation), which you should do before/after mapping for memory types that are not coherent. This is important on mobile platforms, and I couldn't find any such calls (like vkFlushMappedMemoryRanges/vkInvalidateMappedMemoryRanges) in your current code.

SetPixelFormat is never called on the nativeWindow HDC

Describe the bug
The HDC that is drawn to and presented never has a HGLRC matching pixel format set on it. So when wglMakeCurrent is called from the HDC sourced from the ExternalContext::SwapChain/nativeWindow and the HGLRC generated in ContextManagerWGL::createDriver, wglMakeCurrent rebels and throws an error. On my most recent test machine, the native window HDC has a pixel format of 0 (sure), and the HGLRC was created with an HDC that had a pixel format of 11 set on it (indices could change across implementations).

In order to fix this issue, I just made sure the same pixel format that was used in ContextManagerWGL::createDriver is used when ContextManagerWGL::createSwapChain is called. I just bind the same pixel format to the HDC passed in. This is easy enough to do because the pixel format is static, and contained to ContextManagerWGL.cpp/ContextManagerWGL. In the future, if you ever decide to try other pixel formats, it should probably be stored somewhere in ContextManagerWGL.

I'm planning on submitting a PR, if for nothing else, as a code reference on what the issue is and how to fix it.

To Reproduce
Steps to reproduce the behavior:
0. Sync to master@a779e9

  1. Build material_sandbox (and dependencies) on Windows 10 x64 machine
  2. Run material_sandbox with the monkey.obj (material_sandbox ....\assets\models\monkey\monkey.obj)
  3. Crash in ContextManagerWGL::makeCurrent because wglMakeCurrent fails with ERROR_INVALID_PIXEL_FORMAT (0x7D0). I used GetLastError to grab the error after failure (maybe the code should do this in failing cases as additional context during failures? I guess I could file a FR for this...).

Expected behavior
Application shouldn't crash? ๐Ÿ˜‰
If I set a matching pixel format, sample app runs happily.

Desktop (please complete the following information):

  • OS: Windows 10 x64
  • GPU: AMD RX Vega 64, Intel HD Graphics 620
  • Backend: OpenGL

Additional context
I'm assuming this was tested on NV hardware. I suspect this happens enough where NV might just conveniently work around this case if they realize the user forgot to set the pixel format explicitly on the HDC. They would probably qualify the HDC by checking if any pixel format was ever set on it, and if not, it should be ok to just override the HDC pixel format with the pixel format associated with the HGLRC. Just speculation though.

I wrote some notes down here on this Google Doc, but it mostly just thought scribbles. I just started looking at this code today, so I was keeping notes as I navigated. Not necessary viewing: https://docs.google.com/document/d/1gWPSG4G-xS35oOVRr6cRF5y8jSCdxYu2_htWm6oFUNw/edit?usp=sharing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.