Skip to content

Commit

Permalink
with bit depths higher than 32, use GL_RGBA16 for textures (should work)
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@26903 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 6, 2020
1 parent 28ab9e7 commit 755c685
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
GL_TEXTURE0, GL_TEXTURE1, GL_TEXTURE2, GL_QUADS, GL_LINE_LOOP, GL_LINES, GL_COLOR_BUFFER_BIT,
GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER,
GL_DONT_CARE, GL_TRUE, GL_DEPTH_TEST, GL_SCISSOR_TEST, GL_LIGHTING, GL_DITHER,
GL_RGB, GL_RGBA, GL_BGR, GL_BGRA, GL_RGBA8, GL_RGB8, GL_RGB10_A2, GL_RGB565, GL_RGB5_A1, GL_RGBA4,
GL_RGB, GL_RGBA, GL_BGR, GL_BGRA, GL_RGBA8, GL_RGB8, GL_RGB10_A2, GL_RGB565, GL_RGB5_A1, GL_RGBA4, GL_RGBA16,
GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_SHORT_5_6_5,
GL_BLEND, GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA,
GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_BASE_LEVEL,
Expand Down Expand Up @@ -132,6 +132,7 @@
GL_RGB565 : "RGB565",
GL_RGB5_A1 : "RGB5_A1",
GL_RGBA4 : "RGBA4",
GL_RGBA16 : "GL_RGBA16",
}
DATATYPE_TO_STR = {
GL_UNSIGNED_INT_2_10_10_10_REV : "UNSIGNED_INT_2_10_10_10_REV",
Expand Down Expand Up @@ -291,7 +292,10 @@ def get_bit_depth(self, pixel_depth=0):

def init_formats(self):
self.RGB_MODES = list(GLWindowBackingBase.RGB_MODES)
if self.bit_depth==30:
if self.bit_depth>32:
self.internal_format = GL_RGBA16
self.RGB_MODES.append("r210")
elif self.bit_depth==30:
self.internal_format = GL_RGB10_A2
self.RGB_MODES.append("r210")
elif self.bit_depth==16:
Expand Down

0 comments on commit 755c685

Please sign in to comment.