Sharing data between GdkGLContexts of GtkGLAreas?
- From: Rudolf Walter Kiss Szakacs <rudolf wg gmail com>
- To: gtk-list gnome org
- Subject: Sharing data between GdkGLContexts of GtkGLAreas?
- Date: Sat, 24 Oct 2015 23:01:57 +0300
[I originally posted this to gtk-app-devel-list exactly 2 months ago.
Since I got no response, I'm re-posting it here.]
Hi,
I'm thinking about creating an app that shows different views of the
same scene in several GtkGLAreas (the one added in 3.16).
I was wondering if there was a way to set up the OpenGL contexts of
those GtkGLAreas in such a way that they share data.
I read that I can tweak context creation in a handler of the
"create-context" signal of GtkGLArea. GdkGLContext does have the
"shared-context" construct-only property. However, I also read that I
need to call the gdk_window_create_gl_context function to create a
context for a widget (or rather, the gdk window of the widget). Using
that, there is no way for me to specify that I want the context to
share data with an existing one.
Looking at the source, I saw that gdk_window_create_gl_context creates
a context that shares data with the "paint context" of the window, as
returned by gdk_window_get_paint_gl_context. The latter function is
also responsible for the creation of the paint context in case it
doesn't exist yet. It creates the paint context as not sharing data
with anyone, and I can see no way to ask it to do otherwise.
If there is indeed a way to achieve such data sharing, I would love to
know about it.
If not, can this be taken as a feature request?
Many thanks,
Walter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]