Browsing Websites with WebGL in Python / PyQT
I want to write a Python application that will render a website with WebGL content. That's my script:
import sys
from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.QtCore import QFileInfo
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
webView = QtWebKit.QWebView()
webView.setGeometry(QtCore.QRect(30, 20, 591, 511))
webView.settings().setAttribute(QtWebKit.QWebSettings.WebGLEnabled, True)
webView.settings().setAttribute(QtWebKit.QWebSettings.AcceleratedCompositingEnabled, True)
webView.load(QtCore.QUrl('http://webglsamples.org/aquarium/aquarium.html'))
webView.show()
sys.exit(app.exec_())
This is similar to the "WebGLEnabled" setting that does not work. Do you have ideas? Maybe you have some sample code working in PyQT or PySide?
+3
source to share
No one has answered this question yet
Check out similar questions: