Former-commit-id: f83290f7d0b5106624a37956edfc0ea623eb61a8 [formerly 7260760404ad152543aaac13fc61861c8f82c15b] [formerly 4cce81216b3f42daab22c52353acc7626d52cdad [formerly c79538e86f953f326636bdacac778d5936988eee]] Former-commit-id: 26b41fdde348870cc75535d80a4bd9a209184668 [formerly e12ae06222e2fb77a6f68c5788f0901485b95218] Former-commit-id: 6f47bc28420ebe23ce378a80324430fe898c1e99
28 lines
710 B
C++
28 lines
710 B
C++
#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::ModelParameters params;
|
|
params.mesh.optimizeIndexBuffers = false;
|
|
|
|
Nz::ModelRef model = Nz::Model::New();
|
|
REQUIRE(model->LoadFromFile("resources/Engine/Graphics/dragon_recon/dragon_vrip_res4.obj", params));
|
|
|
|
REQUIRE(model->GetMaterialCount() == 1);
|
|
REQUIRE(model->GetSkin() == 0);
|
|
REQUIRE(model->GetSkinCount() == 1);
|
|
|
|
Nz::Material* material = model->GetMaterial(0);
|
|
REQUIRE(material->GetAmbientColor() == Nz::Color::Black);
|
|
}
|
|
}
|
|
}
|
|
}
|