Skip to content

Commit

Permalink
Swap channels for cairo surfaces sent to GL Textures (WayfireWM#816)
Browse files Browse the repository at this point in the history
* Swap channels for cairo surfaces sent to GL Textures

Intended fix for WayfireWM#807 . 

Compiled and tested on intel gfx with no side effects.

* Removed unneeded assignments
  • Loading branch information
trigg authored Oct 22, 2020
1 parent 4b9987b commit e92f43a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/common/wayfire/plugins/common/cairo-util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ static void cairo_surface_upload_to_texture(
GL_CALL(glBindTexture(GL_TEXTURE_2D, buffer.tex));
GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_BLUE));
GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED));
GL_CALL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
buffer.width, buffer.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, src));
}

0 comments on commit e92f43a

Please sign in to comment.