improved shader uniform assignment

This commit is contained in:
devZoGok
2021-11-13 10:34:37 +02:00
parent 3cce34310f
commit 003eb44938
10 changed files with 58 additions and 49 deletions
+2 -2
View File
@@ -52,11 +52,11 @@ int main(){
* attaches a diffuse texture with 2 images
*/
Material *textMat = new Material(PATH + "text");
textMat->addVariable("texturingEnabled", true);
textMat->addBoolUniform("texturingEnabled", true);
string frames[]{TEX_PATH + "bricks.jpg", TEX_PATH + "defaultTexture.jpg"};
Texture *texture = new Texture(frames, 2);
textMat->addVariable("textures[0]", texture, true);
textMat->addTexUniform("textures[0]", texture, true);
for(int i = 0; i < numTexts; i++){
Text *text = new Text(FONT_PATH + fonts[i], texts[i], 0, 60000);