fix: glViewPort() takes integral arguments
This commit is contained in:
parent
3584736155
commit
ca9f3f2d92
|
@ -142,7 +142,9 @@ if HAVE_OPENGL:
|
||||||
if not self.uploaded:
|
if not self.uploaded:
|
||||||
self.uploadTexture()
|
self.uploadTexture()
|
||||||
|
|
||||||
glViewport(0, 0, self.width() * self.devicePixelRatio(), self.height() * self.devicePixelRatio())
|
dpr = self.devicePixelRatio()
|
||||||
|
vp = (0, 0, int(self.width() * dpr), int(self.height() * dpr))
|
||||||
|
glViewport(*vp)
|
||||||
glEnable(GL_TEXTURE_2D)
|
glEnable(GL_TEXTURE_2D)
|
||||||
glBindTexture(GL_TEXTURE_2D, self.texture)
|
glBindTexture(GL_TEXTURE_2D, self.texture)
|
||||||
glColor4f(1, 1, 1, 1)
|
glColor4f(1, 1, 1, 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user