MAJOR UPDATE - REWORK TEXTURE

-support texture tga retirer

+support texture format standard ajouter
This commit is contained in:
2024-09-29 13:24:18 +02:00
parent c4b4ef83e3
commit bbbea117c3
9 changed files with 29 additions and 38 deletions

View File

@@ -17,23 +17,7 @@ Object::Object() : ModelClass()
Object::~Object()
{
if (m_Texture) {
m_Texture->Release();
m_Texture = nullptr;
}
}
bool Object::LoadTexture(ID3D11Device* device, ID3D11DeviceContext* deviceContext, const std::wstring& filename) {
HRESULT result = DirectX::CreateWICTextureFromFile(device, deviceContext, filename.c_str(), nullptr, &m_Texture);
if (FAILED(result)) {
return false;
}
return true;
}
ID3D11ShaderResourceView* Object::GetTexture() const
{
return m_Texture;
}
void Object::SetScaleMatrix(XMMATRIX scaleMatrix)