From 12a6bd1e2571c7c585a10573aa2734524c89e178 Mon Sep 17 00:00:00 2001
From: faiface <faiface@ksp.sk>
Date: Sat, 17 Dec 2016 12:57:48 +0100
Subject: [PATCH] add default uniform values in default window shader

---
 window.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/window.go b/window.go
index 76891a7..7867ea3 100644
--- a/window.go
+++ b/window.go
@@ -7,6 +7,7 @@ import (
 	"github.com/faiface/pixel/pixelgl"
 	"github.com/go-gl/gl/v3.3-core/gl"
 	"github.com/go-gl/glfw/v3.2/glfw"
+	"github.com/go-gl/mathgl/mgl32"
 	"github.com/pkg/errors"
 )
 
@@ -114,6 +115,10 @@ func NewWindow(config WindowConfig) (*Window, error) {
 			defaultVertexShader,
 			defaultFragmentShader,
 		)
+
+		// default uniforms
+		w.defaultShader.SetUniformAttr(maskColorVec4, mgl32.Vec4{1, 1, 1, 1})
+		w.defaultShader.SetUniformAttr(transformMat3, mgl32.Ident3())
 	})
 	if err != nil {
 		w.Delete()
-- 
GitLab