Skip to content

Commit

Permalink
add glHint GL_PERSPECTIVE_CORRECTION_HINT as per mesa docs
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@7602 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 14, 2014
1 parent eb9ae12 commit 6215e3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
GL_RGB, GL_RGBA, GL_BGR, GL_BGRA, \
GL_BLEND, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, \
GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_2D, \
GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST, \
glHint, \
glBlendFunc, \
glActiveTexture, glTexSubImage2D, \
glGetString, glViewport, glMatrixMode, glLoadIdentity, glOrtho, \
Expand Down Expand Up @@ -305,6 +307,10 @@ def gl_init(self):
glLoadIdentity()
glOrtho(0.0, w, h, 0.0, -1.0, 1.0)
glMatrixMode(GL_MODELVIEW)
# Mesa docs claim: this hint can improve the speed of texturing
#when perspective-correct texture coordinate interpolation isn't needed,
#such as when using a glOrtho() projection:
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST)
# Could be more optimal to use vertex arrays:
# glEnableClientState(GL_VERTEX_ARRAY)
# glEnableClientState(GL_TEXTURE_COORD_ARRAY)
Expand Down

0 comments on commit 6215e3d

Please sign in to comment.