PNG is now a resource.

You can now load textures threaded.
PNG will now throw exceptions when errors happend
SpriteComponent is now working without billboarding.
This commit is contained in:
Tleety
2016-02-10 17:50:17 +01:00
parent 04c23be136
commit 53265bbc90
17 changed files with 149 additions and 83 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
#include "Frame.h"
#include "../Rendering/Texture.h"
#include "../Rendering/Util/CommonFunctions.h"
namespace GUI
{
@@ -55,10 +56,10 @@ public:
return;
}
m_Texture = ResourceManager::Load<Texture>(resourceName);
m_Texture = CommonFunctions::LoadTexture(resourceName, false);
m_TextureName = resourceName;
if (m_Texture == nullptr) {
m_Texture = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
m_Texture = CommonFunctions::LoadTexture("Textures/Core/ErrorTexture.png", false);
}
SizeToTexture();