Minor changes
This commit is contained in:
parent
9dceced1e9
commit
28531f5118
|
|
@ -105,8 +105,9 @@ int main()
|
|||
framePipeline.RegisterRenderable(worldInstanceIndex1, &model, 0xFFFFFFFF, scissorBox);
|
||||
framePipeline.RegisterRenderable(worldInstanceIndex2, &model, 0xFFFFFFFF, scissorBox);
|
||||
|
||||
std::shared_ptr<Nz::PointLight> light = std::make_shared<Nz::PointLight>();
|
||||
light->UpdateColor(Nz::Color::Green);
|
||||
std::shared_ptr<Nz::SpotLight> light = std::make_shared<Nz::SpotLight>();
|
||||
light->UpdateInnerAngle(Nz::DegreeAnglef(15.f));
|
||||
light->UpdateOuterAngle(Nz::DegreeAnglef(20.f));
|
||||
|
||||
framePipeline.RegisterLight(light, 0xFFFFFFFF);
|
||||
|
||||
|
|
@ -165,6 +166,7 @@ int main()
|
|||
camAngles.pitch = Nz::Clamp(camAngles.pitch - event.mouseMove.deltaY*sensitivity, -89.f, 89.f);
|
||||
|
||||
camQuat = camAngles;
|
||||
light->UpdateRotation(camQuat);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,13 +60,15 @@ int main()
|
|||
labelWidget->SetPosition(0.f, 200.f, 0.f);
|
||||
labelWidget->UpdateText(Nz::SimpleTextDrawer::Draw("Je suis un LabelWidget !", 72));
|
||||
|
||||
unsigned int clickCount = 0;
|
||||
|
||||
Nz::ButtonWidget* buttonWidget = canvas2D.Add<Nz::ButtonWidget>();
|
||||
buttonWidget->SetPosition(200.f, 400.f);
|
||||
buttonWidget->UpdateText(Nz::SimpleTextDrawer::Draw("Press me senpai", 72));
|
||||
buttonWidget->Resize(buttonWidget->GetPreferredSize());
|
||||
buttonWidget->OnButtonTrigger.Connect([=](const Nz::ButtonWidget*)
|
||||
buttonWidget->OnButtonTrigger.Connect([&](const Nz::ButtonWidget*)
|
||||
{
|
||||
buttonWidget->Destroy();
|
||||
labelWidget->UpdateText(Nz::SimpleTextDrawer::Draw("You clicked the button " + std::to_string(++clickCount) + " times", 72));
|
||||
});
|
||||
|
||||
std::shared_ptr<Nz::Material> material = std::make_shared<Nz::Material>();
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ namespace Nz
|
|||
|
||||
|
||||
template<typename, typename = void>
|
||||
struct GetEnumAutoFlag : std::integral_constant<bool, true> {};
|
||||
struct GetEnumAutoFlag : std::bool_constant<true> {};
|
||||
|
||||
template<typename T>
|
||||
struct GetEnumAutoFlag<T, std::void_t<decltype(T::AutoFlag)>> : std::integral_constant<bool, T::AutoFlag> {};
|
||||
struct GetEnumAutoFlag<T, std::void_t<decltype(T::AutoFlag)>> : std::bool_constant<T::AutoFlag> {};
|
||||
|
||||
template<typename E>
|
||||
class Flags
|
||||
|
|
|
|||
|
|
@ -36,14 +36,17 @@
|
|||
#include <Nazara/Graphics/Camera.hpp>
|
||||
#include <Nazara/Graphics/Config.hpp>
|
||||
#include <Nazara/Graphics/DepthMaterial.hpp>
|
||||
#include <Nazara/Graphics/DepthPipelinePass.hpp>
|
||||
#include <Nazara/Graphics/DirectionalLight.hpp>
|
||||
#include <Nazara/Graphics/ElementRenderer.hpp>
|
||||
#include <Nazara/Graphics/Enums.hpp>
|
||||
#include <Nazara/Graphics/ForwardFramePipeline.hpp>
|
||||
#include <Nazara/Graphics/ForwardPipelinePass.hpp>
|
||||
#include <Nazara/Graphics/FrameGraph.hpp>
|
||||
#include <Nazara/Graphics/FramePass.hpp>
|
||||
#include <Nazara/Graphics/FramePassAttachment.hpp>
|
||||
#include <Nazara/Graphics/FramePipeline.hpp>
|
||||
#include <Nazara/Graphics/FramePipelinePass.hpp>
|
||||
#include <Nazara/Graphics/GraphicalMesh.hpp>
|
||||
#include <Nazara/Graphics/Graphics.hpp>
|
||||
#include <Nazara/Graphics/GuillotineTextureAtlas.hpp>
|
||||
|
|
|
|||
|
|
@ -15,11 +15,9 @@ package("qt5widgets")
|
|||
end)
|
||||
|
||||
on_fetch(function (package)
|
||||
print("on_fetch")
|
||||
local base = package:dep("qt5base")
|
||||
local qt = base:data("qtdir")
|
||||
if not qt then
|
||||
print("nani")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
|||
13
xmake.lua
13
xmake.lua
|
|
@ -107,6 +107,7 @@ NazaraModules = modules
|
|||
|
||||
includes("xmake/**.lua")
|
||||
|
||||
set_project("NazaraEngine")
|
||||
set_xmakever("2.6.3")
|
||||
|
||||
add_repositories("local-repo xmake-repo")
|
||||
|
|
@ -117,13 +118,17 @@ add_requires("libvorbis", { configs = { with_vorbisenc = false } })
|
|||
add_requires("openal-soft", { configs = { shared = true }})
|
||||
add_requires("newtondynamics", { debug = is_plat("windows") and is_mode("debug") }) -- Newton doesn't like compiling in Debug on Linux
|
||||
|
||||
set_project("NazaraEngine")
|
||||
|
||||
add_rules("mode.asan", "mode.coverage", "mode.debug", "mode.releasedbg")
|
||||
add_rules("mode.asan", "mode.debug", "mode.releasedbg")
|
||||
add_rules("plugin.vsxmake.autoupdate")
|
||||
add_rules("build_rendererplugins")
|
||||
|
||||
set_allowedmodes("debug", "releasedbg", "asan", "coverage")
|
||||
if is_plat("windows") then
|
||||
set_allowedmodes("debug", "releasedbg", "asan")
|
||||
else
|
||||
set_allowedmodes("debug", "releasedbg", "asan", "coverage")
|
||||
add_rules("mode.coverage")
|
||||
end
|
||||
|
||||
set_allowedplats("windows", "mingw", "linux", "macosx")
|
||||
set_allowedarchs("windows|x64", "mingw|x86_64", "linux|x86_64", "macosx|x86_64")
|
||||
set_defaultmode("debug")
|
||||
|
|
|
|||
Loading…
Reference in New Issue