mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
renderer/gles2: Interpret matrix as column major in shader
Avoids us needing to transpose.
This commit is contained in:
parent
3de330ec85
commit
6f67bfe5ab
2 changed files with 1 additions and 9 deletions
|
@ -309,10 +309,6 @@ static bool gles2_render_subtexture_with_matrix(
|
||||||
float gl_matrix[9];
|
float gl_matrix[9];
|
||||||
wlr_matrix_multiply(gl_matrix, renderer->projection, matrix);
|
wlr_matrix_multiply(gl_matrix, renderer->projection, matrix);
|
||||||
|
|
||||||
// OpenGL ES 2 requires the glUniformMatrix3fv transpose parameter to be set
|
|
||||||
// to GL_FALSE
|
|
||||||
wlr_matrix_transpose(gl_matrix, gl_matrix);
|
|
||||||
|
|
||||||
push_gles2_debug(renderer);
|
push_gles2_debug(renderer);
|
||||||
|
|
||||||
if (!texture->has_alpha && alpha == 1.0) {
|
if (!texture->has_alpha && alpha == 1.0) {
|
||||||
|
@ -368,10 +364,6 @@ static void gles2_render_quad_with_matrix(struct wlr_renderer *wlr_renderer,
|
||||||
float gl_matrix[9];
|
float gl_matrix[9];
|
||||||
wlr_matrix_multiply(gl_matrix, renderer->projection, matrix);
|
wlr_matrix_multiply(gl_matrix, renderer->projection, matrix);
|
||||||
|
|
||||||
// OpenGL ES 2 requires the glUniformMatrix3fv transpose parameter to be set
|
|
||||||
// to GL_FALSE
|
|
||||||
wlr_matrix_transpose(gl_matrix, gl_matrix);
|
|
||||||
|
|
||||||
push_gles2_debug(renderer);
|
push_gles2_debug(renderer);
|
||||||
|
|
||||||
if (color[3] == 1.0) {
|
if (color[3] == 1.0) {
|
||||||
|
|
|
@ -4,6 +4,6 @@ attribute vec2 texcoord;
|
||||||
varying vec2 v_texcoord;
|
varying vec2 v_texcoord;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
gl_Position = vec4(proj * vec3(pos, 1.0), 1.0);
|
gl_Position = vec4(vec3(pos, 1.0) * proj, 1.0);
|
||||||
v_texcoord = texcoord;
|
v_texcoord = texcoord;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue