[gtkglarea/jjardon/gtk3: 9/16] 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/16] gtkgl/gtkglarea.c: Colormaps doesnt exist anymore
- Date: Wed, 26 Mar 2014 00:12:07 +0000 (UTC)
commit 7c90cac1d04cce31a28928883c5361c20ebee7d1
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 98ef7aa..ee3b90a 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]