[gtkglarea/jjardon/gtk3: 9/21] gtkgl/gtkglarea.c: Colormaps doesnt exist anymore
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkglarea/jjardon/gtk3: 9/21] gtkgl/gtkglarea.c: Colormaps doesnt exist anymore
- Date: Tue, 5 Aug 2014 01:10:45 +0000 (UTC)
commit 346150be3afd2777b81eda764cd64c21ecf31270
Author: Javier Jardón <jjardon gnome org>
Date: Mon Mar 24 18:32:37 2014 +0000
gtkgl/gtkglarea.c: Colormaps doesnt exist anymore
docs/HOWTO.txt | 11 ++---------
docs/gtkglarea.txt | 2 +-
gtkgl/gtkglarea.c | 10 ----------
3 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/docs/HOWTO.txt b/docs/HOWTO.txt
index 37aa796..5b14045 100644
--- a/docs/HOWTO.txt
+++ b/docs/HOWTO.txt
@@ -12,25 +12,18 @@
2. How do I make any widget opengl widget?
- Your widget needs an OpenGL capable visual and you also need to set
- a colormap for it. The widget must also have an X window (not all
- widgets have it).
+ Your widget needs an OpenGL capable visual.
+ The widget must also have an X window (not all widgets have it).
/* get visual using gdk_gl_choose_visual */
visual = gdk_gl_choose_visual(visual_attributes);
- /* set visual and colormap */
- gtk_widget_push__colormap(gdk_colormap_new(visual, TRUE));
-
/* create your widget */
widget = gtk_foobar_new();
/* disable backing store (only in GTK-1.4) */
gtk_widget_set_double_buffered(widget, FALSE);
- /* restore old values */
- gtk_widget_pop_colormap();
-
3. How do I render to such widget?
diff --git a/docs/gtkglarea.txt b/docs/gtkglarea.txt
index c7f6a82..de2be32 100644
--- a/docs/gtkglarea.txt
+++ b/docs/gtkglarea.txt
@@ -25,7 +25,7 @@ share
DESCRIPTION
Make an OpenGL widget, attrList is passed to glXChooseVisual
GLX call. See glXChooseVisual man page for explanation of
- attrList. Widget is created with visual and colormap of the
+ attrList. Widget is created with visual of the
requested type and GLX context is created for this widget. You
can't do opengl calls on widget until it has X window. X window
is not created until widget is realized.
diff --git a/gtkgl/gtkglarea.c b/gtkgl/gtkglarea.c
index e30673d..fc4e9a3 100644
--- a/gtkgl/gtkglarea.c
+++ b/gtkgl/gtkglarea.c
@@ -105,19 +105,9 @@ gtk_gl_area_share_new (int *attrlist, GtkGLArea *share)
if (glcontext == NULL)
return NULL;
-#if defined GDK_WINDOWING_X11
- /* use colormap and visual suitable for OpenGL rendering */
- gtk_widget_push_colormap(gdk_colormap_new(visual,TRUE));
-#endif
-
gl_area = g_object_new(GTK_TYPE_GL_AREA, NULL);
gl_area->glcontext = glcontext;
-#if defined GDK_WINDOWING_X11
- /* pop back defaults */
- gtk_widget_pop_colormap();
-#endif
-
return GTK_WIDGET(gl_area);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]