Documentation for module: Graphics
Former-commit-id: 1757c33318443aade1dc38e16d053240d7dc885c
This commit is contained in:
25
tests/Engine/Graphics/SkyboxBackground.cpp
Normal file
25
tests/Engine/Graphics/SkyboxBackground.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <Nazara/Graphics/SkyboxBackground.hpp>
|
||||
#include <Catch/catch.hpp>
|
||||
|
||||
SCENARIO("SkyboxBackground", "[GRAPHICS][SKYBOXBACKGROUND]")
|
||||
{
|
||||
GIVEN("A skybox background with a loaded image")
|
||||
{
|
||||
Nz::TextureRef textureRef = Nz::Texture::New();
|
||||
textureRef->LoadCubemapFromFile("resources/Engine/Graphics/skybox.png");
|
||||
Nz::SkyboxBackgroundRef skyboxBackgroundRef = Nz::SkyboxBackground::New(textureRef);
|
||||
|
||||
WHEN("We assign it parameters")
|
||||
{
|
||||
skyboxBackgroundRef->SetMovementOffset(Nz::Vector3f::Unit());
|
||||
skyboxBackgroundRef->SetMovementScale(1.f);
|
||||
|
||||
THEN("We can get it")
|
||||
{
|
||||
REQUIRE(skyboxBackgroundRef->GetMovementOffset() == Nz::Vector3f::Unit());
|
||||
REQUIRE(skyboxBackgroundRef->GetMovementScale() == Approx(1.f));
|
||||
REQUIRE(skyboxBackgroundRef->GetTexture().Get() == textureRef.Get());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user