asset load method improvement

This commit is contained in:
devZoGok
2022-03-02 20:24:05 +02:00
parent bb8302f3ce
commit 074c3ee803
6 changed files with 38 additions and 8 deletions
+3 -3
View File
@@ -58,13 +58,13 @@ int main(){
textMat->addBoolUniform("texturingEnabled", true);
string frames[]{TEX_PATH + "bricks.jpg", TEX_PATH + "defaultTexture.jpg"};
AssetManager::getSingleton()->load(ImageReader::getSingleton(), frames[0]);
AssetManager::getSingleton()->load(ImageReader::getSingleton(), frames[1]);
AssetManager::getSingleton()->load(frames[0]);
AssetManager::getSingleton()->load(frames[1]);
Texture *texture = new Texture(frames, 2, false);
textMat->addTexUniform("textures[0]", texture, true);
for(int i = 0; i < numTexts; i++){
AssetManager::getSingleton()->load(FontReader::getSingleton(), FONT_PATH + fonts[i]);
AssetManager::getSingleton()->load(FONT_PATH + fonts[i]);
Text *text = new Text(FONT_PATH + fonts[i], texts[i], 0, 60000);
text->setLeftToRight(leftToRight[i]);