add default uniform values in default window shader

This commit is contained in:
faiface 2016-12-17 12:57:48 +01:00
parent 947cb02f8c
commit 12a6bd1e25
1 changed files with 5 additions and 0 deletions

View File

@ -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()