Skip to content

Commit 7a28e03

Browse files
committed
Correct way of obtaining Framebuffer Object ID
Seems that QT5 does not provide it, but we can ask GL directly.
1 parent 35e3209 commit 7a28e03

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

SkiaPyQt5Example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ def mouseMoveEvent(self, event):
4646
def _create_surface(self):
4747
# Called in initializeGL and resizeGL to (re)create the Skia surface
4848
w, h = self.width(), self.height()
49-
#fb_id = self.defaultFramebufferObject()
50-
fb_id = 0
49+
fb_id = gl.glGetIntegerv(gl.GL_FRAMEBUFFER_BINDING)
5150
if w == 0 or h == 0:
5251
self.surface = None
5352
return

0 commit comments

Comments
 (0)