Former-commit-id: 9bb17734f853246eadfdd547bbfdc8c54638cf0d [formerly ca377bfec10cb158b91d050af6a1f59835d04cce] Former-commit-id: 27d29d41082f8f796518c36d063e7b3afd6768e1
28 lines
708 B
C++
28 lines
708 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() == 2);
|
|
REQUIRE(model->GetSkin() == 0);
|
|
REQUIRE(model->GetSkinCount() == 1);
|
|
|
|
Nz::Material* material = model->GetMaterial(0);
|
|
REQUIRE(material->GetAmbientColor() == Nz::Color(128));
|
|
}
|
|
}
|
|
}
|
|
}
|