[Webkit-unassigned] [Bug 272074] WebGL not enabled.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 2 23:21:18 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=272074

--- Comment #1 from Deepu S <ashoka.deepu at gmail.com> ---
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('WebKit2', '4.0')

from gi.repository import Gtk, WebKit2

window = Gtk.Window()
window.set_default_size(800, 600)
window.connect("destroy", Gtk.main_quit)

scrolled_window = Gtk.ScrolledWindow()
webview = WebKit2.WebView()
settings = webview.get_settings()
settings.set_enable_webgl(True)
settings.set_enable_accelerated_2d_canvas(True)
settings.set_hardware_acceleration_policy(WebKit2.HardwareAccelerationPolicy.ALWAYS)

webview.set_settings(settings)

webview.load_uri("https://get.webgl.org")
scrolled_window.add(webview)

window.add(scrolled_window)
window.show_all()
Gtk.main()

here is the python code used. libwebkit2gtk-4.0-dev is installed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240403/34f1a32e/attachment.htm>


More information about the webkit-unassigned mailing list