graphics: Bug fix: Remove modelview_matrix

This commit is contained in:
Hajime Hoshi 2016-10-25 03:17:14 +09:00
parent a2cc291573
commit 96053702ed
2 changed files with 0 additions and 3 deletions

View File

@ -241,7 +241,6 @@ func (p *programContext) begin() error {
tx, ty, 0, 1, tx, ty, 0, 1,
} }
if !areSameFloat32Array(p.state.lastModelviewMatrix, modelviewMatrix) { if !areSameFloat32Array(p.state.lastModelviewMatrix, modelviewMatrix) {
c.UniformFloats(p.program, "modelview_matrix", modelviewMatrix)
if p.state.lastModelviewMatrix == nil { if p.state.lastModelviewMatrix == nil {
p.state.lastModelviewMatrix = make([]float32, 16) p.state.lastModelviewMatrix = make([]float32, 16)
} }

View File

@ -39,7 +39,6 @@ func shader(c *opengl.Context, id shaderId) string {
var shaders = map[shaderId]string{ var shaders = map[shaderId]string{
shaderVertexModelview: ` shaderVertexModelview: `
uniform highp mat4 projection_matrix; uniform highp mat4 projection_matrix;
uniform highp mat4 modelview_matrix; // TODO: Remove this
attribute highp vec2 vertex; attribute highp vec2 vertex;
attribute highp vec2 tex_coord; attribute highp vec2 tex_coord;
attribute highp vec4 geo_matrix_body; attribute highp vec4 geo_matrix_body;
@ -48,7 +47,6 @@ varying highp vec2 vertex_out_tex_coord;
void main(void) { void main(void) {
vertex_out_tex_coord = tex_coord; vertex_out_tex_coord = tex_coord;
mat4 x = modelview_matrix; // temporary hack not to omit modelview_matrix
mat4 geo_matrix = mat4( mat4 geo_matrix = mat4(
vec4(geo_matrix_body[0], geo_matrix_body[2], 0, 0), vec4(geo_matrix_body[0], geo_matrix_body[2], 0, 0),
vec4(geo_matrix_body[1], geo_matrix_body[3], 0, 0), vec4(geo_matrix_body[1], geo_matrix_body[3], 0, 0),