mirror of
https://github.com/ApfelTeeSaft/vb01.git
synced 2026-08-26 19:33:45 +00:00
implemented font reader
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include "node.h"
|
||||
#include "animationController.h"
|
||||
#include "animationChannel.h"
|
||||
#include "imageReader.h"
|
||||
#include "fontReader.h"
|
||||
#include "assetManager.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace vb01;
|
||||
@@ -55,10 +58,14 @@ 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]);
|
||||
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]);
|
||||
|
||||
Text *text = new Text(FONT_PATH + fonts[i], texts[i], 0, 60000);
|
||||
text->setLeftToRight(leftToRight[i]);
|
||||
text->setScale(.5);
|
||||
|
||||
Reference in New Issue
Block a user