Documentation for module: Graphics
Former-commit-id: 5fba876346aec7b35bc618002b669ff194e58544
This commit is contained in:
24
tests/Engine/Graphics/Model.cpp
Normal file
24
tests/Engine/Graphics/Model.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <Nazara/Graphics/Model.hpp>
|
||||
#include <Catch/catch.hpp>
|
||||
|
||||
SCENARIO("Model", "[GRAPHICS][MODEL]")
|
||||
{
|
||||
GIVEN("The standford dragon model")
|
||||
{
|
||||
WHEN("We get general informations")
|
||||
{
|
||||
THEN("These results are expected")
|
||||
{
|
||||
Nz::ModelRef model = Nz::Model::New();
|
||||
REQUIRE(model->LoadFromFile("resources/Engine/Graphics/dragon_recon/dragon_vrip_res4.obj"));
|
||||
|
||||
REQUIRE(model->GetMaterialCount() == 2);
|
||||
REQUIRE(model->GetSkin() == 0);
|
||||
REQUIRE(model->GetSkinCount() == 1);
|
||||
|
||||
Nz::Material* material = model->GetMaterial(0);
|
||||
REQUIRE(material->GetAmbientColor() == Nz::Color(128));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user