razakhel / raz Goto Github PK
View Code? Open in Web Editor NEWModern & multiplatform 3D game engine in C++17
Home Page: http://razakhel.github.io/RaZ
License: MIT License
Modern & multiplatform 3D game engine in C++17
Home Page: http://razakhel.github.io/RaZ
License: MIT License
We can already have textbox using ImGUI but when typing wasd for example, it will also trigger the callbacks attached to the key events W, A, S and D.
See ocornut/imgui#703 and ocornut/imgui#1219 (comment) if needed :D
Good luck, I love your work!
Instead of the common Fresnel calculation, Brian Karis suggests using a spherical gaussian approximation, which he deems more efficient with unnoticeable differences.
As such, the current Fresnel calculation:
vec3 fresnel = baseReflectivity + (1.0 - baseReflectivity) * pow(1.0 - cosTheta, 5.0);
would become:
vec3 fresnel = baseReflectivity + (1.0 - baseReflectivity) * pow(2.0, (-5.55473 * cosTheta - 6.98316) * cosTheta);
In RaZ's case, this actually fixes black artifacts when the light's position is strictly equivalent to the camera's (which should not happen in real life cases):
This optimization should probably be investigated, as the artifacts may come from a small blunder in the implementation.
Why no llvmpipe rendering?
I'm trying to use RaZ in a simulator project.
I need the ability to transform Meshes imported from a Gltf file in Runtime.
For example:
We have a model of a clock:
node1 {transform, mesh} - watch case
node2 {transform, mesh} - hour hand
node3 {transform, mesh} - minutes hand
node4 {transform, mesh} - seconds hand
After exporting the model, you need to be able to:
model.getNodeTransform(node2.name).setRotation(hours_value)
model.getNodeTransform(node2.name).setRotation(minutes_value)
model.getNodeTransform(node2.name).setRotation(seconds_value)
Possible Solution.
In RaZ:
Add two modules: GltfSceneFormat (from GltfLoad.cpp) SceneRenderer (new component).
// GltfSceneFormat.cpp
void loadVertices(...)
{
...
//if (transform.has_value()) {
// for (Vertex& vert : submesh.getVertices()) {
// vert.position = transform->getPosition() + transform->getRotation() * (vert.position * transform->getScale());
// vert.normal = (transform->getRotation() * vert.normal).normalize();
// vert.tangent = (transform->getRotation() * vert.tangent).normalize();
// }
//}
}
std::vector<std::optional> loadTransforms(
SceneRenderer & sceneRenderer,
const std::vectorfastgltf::Node& nodes,
std::size_t meshCount)
{
std::vector<std::optional> transforms;
transforms.resize(meshCount);
for (const fastgltf::Node& node : nodes)
{
Transform transform = loadTransform(node);
sceneRenderer.m_transforms.emplace_back(transform);
//computeNodeTransform(node, std::nullopt, nodes, transforms);
}
return transforms;
}
void loadNodes(SceneRenderer & sceneRenderer, const std::vectorfastgltf::Node& nodes)
{
unsigned long transformIndex = 0;
for (auto & node_ : nodes)
{
SceneRenderer::Node node;
node.name = node_.name.c_str();
node.transformIndex = transformIndex;
transformIndex++;
if (node_.meshIndex.has_value())
node.meshIndex = node_.meshIndex.value();
for (auto child : node_.children)
{
node.children.emplace_back(child);
}
sceneRenderer.m_nodes.emplace_back(node);
}
}
std::pair<Mesh, MeshRenderer> loadMeshes(...)
{
...
Mesh loadedMesh;
MeshRenderer loadedMeshRenderer;
for (const fastgltf::Primitive& primitive : meshes[meshIndex].primitives) {
...
Submesh& submesh = loadedMesh.addSubmesh();
SubmeshRenderer& submeshRenderer = loadedMeshRenderer.addSubmeshRenderer();
...
loadedMeshRenderer.getMaterials().emplace_back(std::move(Material(MaterialType::COOK_TORRANCE)));
...
}
...
}
SceneRenderer load(const FilePath& filePath) {
...
const std::vector<std::optional> transforms = loadTransforms(sceneRenderer, asset->nodes, asset->meshes.size());
loadNodes(sceneRenderer, asset->nodes);
for (auto & node : asset->nodes)
{
if (node.meshIndex.has_value())
{
auto [mesh, meshRenderer] = loadMeshes(asset->meshes, node.meshIndex.value(), asset->buffers, asset->bufferViews, asset->accessors, transforms);
sceneRenderer.m_meshRenderers.emplace_back(std::move(meshRenderer));
}
}
const std::vector<std::optional> images = loadImages(asset->images, asset->buffers, asset->bufferViews, parentPath);
for (auto & meshRenderer : sceneRenderer.m_meshRenderers)
loadMaterials(asset->materials, asset->textures, images, meshRenderer);
...
return sceneRenderer;
}
And:
// RendererSystem.cpp
void RenderSystem::linkEntity(const EntityPtr& entity) {
...
}
void RenderSystem::initialize() {
// add GltfRenderer
registerComponents<Camera, Light, MeshRenderer, SceneRenderer>();
...
// add GltfRenderer
if (entity->hasComponent())
{
auto & gltfrenderer = entity->getComponent();
//for (auto & meshrenderer : gltfrenderer.getMeshRenderers())
for (auto & meshrenderer : gltfrenderer.m_meshRenderers)
updateMaterials(meshrenderer);
}
}
// RenderGph.cpp
void RenderGraph::execute(RenderSystem& renderSystem) {
...
// add GltfRenderer
}
else if (entity->hasComponent())
{
if (!entity->isEnabled() || !entity->hasComponent())
continue;
const auto& gltfRenderer = entity->getComponent<SceneRenderer>();
if (!gltfRenderer.isEnabled())
continue;
auto m_ = entity->getComponent<Transform>().computeTransformMatrix();
renderSystem.m_modelUbo.sendData(entity->getComponent<Transform>().computeTransformMatrix(), 0);
auto m = entity->getComponent<Transform>().computeTransformMatrix();
gltfRenderer.draw(renderSystem.m_modelUbo, m);
}
In App:
Raz::Entity& clock = world.addEntityWithComponentRaz::Transform();
auto & clockRenderer = clock.addComponentRaz::SceneRenderer(Raz::GltfSceneFormat::load(RAZ_ROOT "assets/watch_case.gltf"));
auto hours = clockRenderer.getTransformNode("hours_hend");
auto minutes = clockRenderer.getTransformNode("hours_hend");
auto seconds = clockRenderer.getTransformNode("hours_hend");
app.run([&] (float deltaTime) {
// get current hours_value, minutes_value, seconds_value
hours.value()->setRotation(hours_value);
minutes.value()->setRotation(minutes_value);
seconds.value()->setRotation(seconds_value);
});
Example implementation in attached files:
This really works.
You are free to use this code as you wish.
Vladimir Razumov.
After having tried many different things, launching unit tests which require graphics capabilities (using GLFW in this case) always fail. It is yet unknown if this is due to:
See:
Note: Xvfb
needs the package xquartz
to be installed by brew.
- name: Starting Xvfb
run: |
export DISPLAY=:99.0;
( sudo /usr/X11/bin/Xvfb :99 -ac -screen 0 1280x720x24 +render +iglx )&
- name: Test
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}
run: ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.
GLFW error 65545: NSGL: Failed to find a suitable pixel format
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error: Failed to create GLFW Window
/Users/runner/work/_temp/62d6113c-982d-45c8-abf4-0294b9601198.sh: line 1: 2157 Abort trap: 6 ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Error: Process completed with exit code 134.
See:
- name: Test
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}
run: /usr/X11/bin/Xvfb :99 & export DISPLAY=:99 & ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.
GLFW error 65545: NSGL: Failed to find a suitable pixel format
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
_XSERVTransSocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 2
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error: Failed to create GLFW Window
/Users/runner/work/_temp/1e2bfa6e-3279-423e-aa75-96161a9cb859.sh: line 1: 2149 Abort trap: 6 ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Error: Process completed with exit code 134.
See:
It has been pointed out that Cook-Torrance's most common explanations don't include the fact that the Fresnel component is actually symmetric.
See:
Something like this is supposedly a good solution: https://stackoverflow.com/a/35755737/3292304
Undefined symbols for architecture arm64:
"Raz::Microphone::openDevice(Raz::AudioFormat, unsigned int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
decltype(auto) sol::stack::stack_detail::call<true, 0ul, 1ul, 2ul, 3ul, void, Raz::AudioFormat, unsigned int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, sol::detail::default_construct&, Raz::Microphone* const&>(sol::types, void<Raz::AudioFormat, unsigned int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>, lua_State*, int, sol::detail::default_construct&, Raz::Microphone* const&) in libRaZ.a(LuaAudio.cpp.o)
decltype(auto) sol::stack::stack_detail::call<true, 0ul, 1ul, 2ul, void, Raz::AudioFormat, unsigned int, float, sol::detail::default_construct&, Raz::Microphone* const&>(sol::types, void<Raz::AudioFormat, unsigned int, float>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, lua_State*, int, sol::detail::default_construct&, Raz::Microphone* const&) in libRaZ.a(LuaAudio.cpp.o)
Raz::LuaWrapper::registerAudioTypes()::$_1::__invoke(Raz::Microphone&, Raz::AudioFormat, unsigned int, float) in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::recoverDevices()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::destroy()", referenced from:
int sol::detail::usertype_alloc_destroyRaz::Microphone(lua_State*) in libRaZ.a(LuaAudio.cpp.o)
"Raz::AudioSystem::openDevice(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::u_detail::binding<char const*, sol::overload_set<Raz::LuaWrapper::registerAudioTypes()::$_0, void (Raz::AudioSystem::)(std::__1::basic_string<char, std::__1::char_traits, std::_1::allocator > const&)>, Raz::AudioSystem>::call_with<true, false>(lua_State, void*) in libRaZ.a(LuaAudio.cpp.o)
int sol::u_detail::binding<char const*, sol::overload_set<Raz::LuaWrapper::registerAudioTypes()::$_0, void (Raz::AudioSystem::)(std::__1::basic_string<char, std::__1::char_traits, std::_1::allocator > const&)>, Raz::AudioSystem>::call_with<false, false>(lua_State, void*) in libRaZ.a(LuaAudio.cpp.o)
int sol::function_detail::call<sol::function_detail::overloaded_function<0, Raz::LuaWrapper::registerAudioTypes()::$_0, void (Raz::AudioSystem::)(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)>, 2, false>(lua_State) in libRaZ.a(LuaAudio.cpp.o)
"Raz::AudioSystem::recoverDevices()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::AudioSystem::destroy()", referenced from:
int sol::detail::usertype_alloc_destroyRaz::AudioSystem(lua_State*) in libRaZ.a(LuaAudio.cpp.o)
"Raz::AudioSystem::AudioSystem(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
Raz::AudioSystem& Raz::World::addSystemRaz::AudioSystem() in libRaZ.a(LuaCore.cpp.o)
Raz::AudioSystem& Raz::World::addSystem<Raz::AudioSystem, char const*>(char const*&&) in libRaZ.a(LuaCore.cpp.o)
int sol::call_detail::constructor_match<Raz::AudioSystem, true, true>::operator()<void (), 0ul, void>(sol::types<void ()>, std::__1::integral_constant<unsigned long, 0ul>, sol::types, sol::types<>, lua_State*, int, int) const in libRaZ.a(LuaAudio.cpp.o)
decltype(auto) sol::stack::stack_detail::call<true, 0ul, void, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, sol::detail::default_construct&, Raz::AudioSystem* const&>(sol::types, void<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&>, std::__1::integer_sequence<unsigned long, 0ul>, lua_State*, int, sol::detail::default_construct&, Raz::AudioSystem* const&) in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::init()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::call_detail::constructor_match<Raz::SoundEffect, true, true>::operator()<void (), 0ul, void>(sol::types<void ()>, std::__1::integral_constant<unsigned long, 0ul>, sol::types, sol::types<>, lua_State*, int, int) const in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::load(Raz::EchoParams const&)", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::load(Raz::ChorusParams const&)", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::load(Raz::DistortionParams const&)", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::load(Raz::ReverberationParams const&)", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::reset()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffect::destroy()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::detail::usertype_alloc_destroyRaz::SoundEffect(lua_State*) in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffectSlot::init()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::call_detail::constructor_match<Raz::SoundEffectSlot, true, true>::operator()<void (), 0ul, void>(sol::types<void ()>, std::__1::integral_constant<unsigned long, 0ul>, sol::types, sol::types<>, lua_State*, int, int) const in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffectSlot::destroy()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::detail::usertype_alloc_destroyRaz::SoundEffectSlot(lua_State*) in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::init()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::call_detail::constructor_match<Raz::Sound, true, true>::operator()<void (), 0ul, void>(sol::types<void ()>, std::__1::integral_constant<unsigned long, 0ul>, sol::types, sol::types<>, lua_State*, int, int) const in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::load()", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::destroy()", referenced from:
int sol::stack::call_into_lua<true, true, Raz::Sound, float, sol::member_function_wrapper<Raz::Sound (Raz::Microphone::)(float) const, Raz::Sound, Raz::Microphone, float>::caller, Raz::Sound (Raz::Microphone::&)(float) const, Raz::Microphone&>(sol::typesRaz::Sound, sol::types, lua_State*, int, sol::member_function_wrapper<Raz::Sound (Raz::Microphone::)(float) const, Raz::Sound, Raz::Microphone, float>::caller&&, Raz::Sound (Raz::Microphone::&)(float) const, Raz::Microphone&) in libRaZ.a(LuaAudio.cpp.o)
Raz::Sound::~Sound() in libRaZ.a(LuaAudio.cpp.o)
int sol::detail::usertype_alloc_destroyRaz::Sound(lua_State*) in libRaZ.a(LuaAudio.cpp.o)
Raz::Sound::~Sound() in libRaZ.a(LuaAudio.cpp.o)
int sol::stack::call_into_lua<true, true, Raz::Sound, Raz::Microphone&, sol::wrapper<Raz::Sound ()(Raz::Microphone&), void>::caller, Raz::Sound (&)(Raz::Microphone&)>(sol::typesRaz::Sound, sol::typesRaz::Microphone&, lua_State*, int, sol::wrapper<Raz::Sound ()(Raz::Microphone&), void>::caller&&, Raz::Sound (&)(Raz::Microphone&)) in libRaZ.a(LuaAudio.cpp.o)
Raz::Sound::~Sound() in libRaZ.a(LuaEntity.cpp.o)
Raz::Sound::~Sound() in libRaZ.a(LuaEntity.cpp.o)
...
"Raz::Listener::Listener(Raz::Vector<float, 3ul> const&, Raz::Matrix<float, 3ul, 3ul> const&)", referenced from:
decltype(auto) sol::stack::stack_detail::call<true, 0ul, 1ul, void, Raz::Vector<float, 3ul> const&, Raz::Matrix<float, 3ul, 3ul> const&, sol::detail::default_construct&, Raz::Listener* const&>(sol::types, void<Raz::Vector<float, 3ul> const&, Raz::Matrix<float, 3ul, 3ul> const&>, std::__1::integer_sequence<unsigned long, 0ul, 1ul>, lua_State*, int, sol::detail::default_construct&, Raz::Listener* const&) in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::Listener(Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&)", referenced from:
decltype(auto) sol::stack::stack_detail::call<true, 0ul, 1ul, 2ul, void, Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&, sol::detail::default_construct&, Raz::Listener* const&>(sol::types, void<Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, lua_State*, int, sol::detail::default_construct&, Raz::Listener* const&) in libRaZ.a(LuaAudio.cpp.o)
"Raz::WavFormat::load(Raz::FilePath const&)", referenced from:
Raz::LuaWrapper::registerFileFormatTypes() in libRaZ.a(LuaFileFormat.cpp.o)
"Raz::Microphone::recoverData(float) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
Raz::LuaWrapper::registerAudioTypes()::$_2::__invoke(Raz::Microphone&) in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::recoverSound(float) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
Raz::LuaWrapper::registerAudioTypes()::$_3::__invoke(Raz::Microphone&) in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::recoverCurrentDevice() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::recoverAvailableDuration() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::recoverAvailableSampleCount() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::stop() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Microphone::start() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::AudioSystem::recoverCurrentDevice() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::SoundEffectSlot::loadEffect(Raz::SoundEffect const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::unlinkSlot() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::recoverGain() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::setPosition(Raz::Vector<float, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::setVelocity(Raz::Vector<float, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::recoverPitch() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::recoverState() const", referenced from:
Raz::Sound::isPlaying() const in libRaZ.a(LuaAudio.cpp.o)
Raz::Sound::isPaused() const in libRaZ.a(LuaAudio.cpp.o)
Raz::Sound::isStopped() const in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::recoverPosition() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::recoverVelocity() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::recoverElapsedTime() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::play() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::stop() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::pause() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::rewind() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::setGain(float) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::linkSlot(Raz::SoundEffectSlot const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::setPitch(float) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Sound::setRepeat(bool) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::recoverGain() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::setPosition(Raz::Vector<float, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
int sol::call_detail::constructor_match<Raz::Listener, true, true>::operator()<void (Raz::Vector<float, 3ul> const&), 1ul, void, Raz::Vector<float, 3ul> const&>(sol::types<void (Raz::Vector<float, 3ul> const&)>, std::__1::integral_constant<unsigned long, 1ul>, sol::types, sol::types<Raz::Vector<float, 3ul> const&>, lua_State*, int, int) const in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::setVelocity(Raz::Vector<float, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::setOrientation(Raz::Matrix<float, 3ul, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::setOrientation(Raz::Vector<float, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::setOrientation(Raz::Vector<float, 3ul> const&, Raz::Vector<float, 3ul> const&) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::recoverPosition() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::recoverVelocity() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::recoverOrientation() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::recoverUpOrientation() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::recoverForwardOrientation() const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
"Raz::Listener::setGain(float) const", referenced from:
Raz::LuaWrapper::registerAudioTypes() in libRaZ.a(LuaAudio.cpp.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/RaZ_FullDemo] Error 1
make[1]: *** [examples/CMakeFiles/RaZ_FullDemo.dir/all] Error 2
[ 65%] Linking CXX executable RaZ_BloomDemo
Undefined symbols for architecture arm64:
"_png_do_expand_palette_rgb8_neon", referenced from:
_png_do_read_transformations in libRaZ.a(pngrtran.c.o)
"_png_do_expand_palette_rgba8_neon", referenced from:
_png_do_read_transformations in libRaZ.a(pngrtran.c.o)
"_png_init_filter_functions_neon", referenced from:
_png_read_filter_row in libRaZ.a(pngrutil.c.o)
"_png_riffle_palette_neon", referenced from:
_png_do_read_transformations in libRaZ.a(pngrtran.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Platform: Mac M1 Pro
OS: Ventura 13.0.1
Hey there @Razakhel ! ๐๏ธ
Is there a planned roadmap for this framework? Or are there expected timelines when newer features are going to be added?
In addition, is there expected to be features like alpha channel support soon? Or is this project considered to be "abandoned" and will no longer be updated or worked on?
And gratz in advance!
Many resources are available, which need to be tested further:
Just a suggestion.
Reference:
https://github.com/KhronosGroup/glTF
Hi, the How to build RaZ wiki page has ***Writing in progress.***
. I have attached a patch to add instructions for the Building on Linux
section.
I think there is an error in file GltfLoad.cpp
Available:
347 if (mat.pbrData.baseColorTexture && images[mat.pbrData.baseColorTexture->textureIndex])
348 matProgram.setTexture(Texture2D::create(*images[mat.pbrData.baseColorTexture->textureIndex]), MaterialTexture::BaseColor);
...
Right:
add const std::vectorfastgltf::Texture& textures as parameter in void loadMaterials
347 if (mat.pbrData.baseColorTexture && textures[mat.pbrData.baseColorTexture->textureIndex].imageIndex)
{
auto imageIndex = textures[mat.pbrData.baseColorTexture->textureIndex].imageIndex.value();
matProgram.setTexture(Texture2D::create(*images[imageIndex]), MaterialTexture::BaseColor);
}
if (mat.emissiveTexture && textures[mat.emissiveTexture->textureIndex].imageIndex)
{
auto imageIndex = textures[mat.emissiveTexture->textureIndex].imageIndex.value();
matProgram.setTexture(Texture2D::create(*images[imageIndex]), MaterialTexture::Emissive);
}
if (mat.occlusionTexture && textures[mat.occlusionTexture->textureIndex].imageIndex) { // Ambient occlusion
const Image ambientOcclusionImg = extractAmbientOcclusionImage(*images[mat.occlusionTexture->textureIndex]);
matProgram.setTexture(Texture2D::create(ambientOcclusionImg), MaterialTexture::Ambient);
}
if (mat.normalTexture && textures[mat.normalTexture->textureIndex].imageIndex)
{
auto imageIndex = textures[mat.normalTexture->textureIndex].imageIndex.value();
matProgram.setTexture(Texture2D::create(*images[imageIndex]), MaterialTexture::Normal);
}
if (mat.pbrData.metallicRoughnessTexture && textures[mat.pbrData.metallicRoughnessTexture->textureIndex].imageIndex) {
const auto [metalnessImg, roughnessImg] = extractMetalnessRoughnessImages(*images[mat.pbrData.metallicRoughnessTexture->textureIndex]);
matProgram.setTexture(Texture2D::create(metalnessImg), MaterialTexture::Metallic);
matProgram.setTexture(Texture2D::create(roughnessImg), MaterialTexture::Roughness);
}
At least it works correctly for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.