[prev in list] [next in list] [prev in thread] [next in thread]
List: gtkmm
Subject: Re: [gtkmm] [gtkglmm] Cannot set pixel format for a Gdk::GL::Pixmap?
From: Jonathan Brandmeyer <jbrandmeyer () earthlink ! net>
Date: 2004-05-22 16:00:12
Message-ID: 1085241612.2676.21.camel () illuvatar
[Download RAW message or body]
> GdkGLExt-WARNING **: cannot set pixel format
> GdkGLExt-WARNING **: cannotcreate GdkGLPixmap
>
> these error messages occur upon calling the following function from
> the
> configure method of a Gtk::GL::DrawingArea:
>
> //DrawingArea.h
> class MyDrawingArea : public Gtk::GL::DrawingArea
> {
> Glib::RefPtr<Gdk::GL::Pixmap> GLbuffer;
> Glib::RefPtr<Gdk::GL::Config> GLconfig;
> Glib::RefPtr<Gdk::Pixmap> buffer;
> };
>
First, a Gtk::GL::DrawingArea is backed internally by a Gdk::GL::Window,
not a Pixmap. It is a convince widget for on-screen drawing, and I'm
not sure what you need to do for off-screen rendering.
> bool MyDrawingArea ::configure(GdkEventConfigure* event)
> {
> ...
> GLbuffer = Gdk::GL::Pixmap::set_gl_capability(buffer, GLconfig); //it
> is
> this line that causes the error.
> ...
> }
I call DrawingArea::set_gl_capability() in the constructor of my derived
class with the Gdk::GL::Config object that I have allocated.
DrawingArea::on_configure() is called when the widget is resized (maybe
other times too, this is the only one I know of).
> Needless to say, it was working before. (Isn't that always the way for
> novice programmers?) Also, the example applications provided with the
> gtkglextmm packages work properly.
I learned a lot about the library by studying the example apps. Perhaps
one or more of them would be a good starting point for you.
HTH,
Jonathan Brandmeyer
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic