Import material textures with mesh assets
This commit is contained in:
@@ -104,6 +104,18 @@ TEST(Material, SetGetTexture) {
|
||||
EXPECT_EQ(material.GetTexture("uDiffuse").Get(), texture);
|
||||
}
|
||||
|
||||
TEST(Material, SetTextureReplacesExistingBinding) {
|
||||
Material material;
|
||||
Texture* firstTexture = new Texture();
|
||||
Texture* secondTexture = new Texture();
|
||||
|
||||
material.SetTexture("uDiffuse", ResourceHandle<Texture>(firstTexture));
|
||||
material.SetTexture("uDiffuse", ResourceHandle<Texture>(secondTexture));
|
||||
|
||||
EXPECT_EQ(material.GetTextureBindingCount(), 1u);
|
||||
EXPECT_EQ(material.GetTexture("uDiffuse").Get(), secondTexture);
|
||||
}
|
||||
|
||||
TEST(Material, HasProperty) {
|
||||
Material material;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user