mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
improved shader uniform assignment
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user