OpenGL, wxWidgets and Ubuntu 7.10

Andreas support at raumgeometrie.de
Thu Mar 27 23:42:54 PDT 2008



Hi,

sorry for the late answer.

The setup with Double-buffering on is as follows:

int AttribList [] = {WX_GL_RGBA , WX_GL_DOUBLEBUFFER};

TestGLCanvas::TestGLCanvas(GeoDocument* document, wxWindow *parent,
wxWindowID id,
    const wxPoint& pos, const wxSize& size, long style, const
wxString& name)
    : wxGLCanvas(parent, (wxGLCanvas*) NULL, id, pos, size, style|
wxFULL_REPAINT_ON_RESIZE , name, AttribList ), TheDocument(document),
Mytip(_("Hallo!"))
{

I pass the global Variable attribList to the constructor of the
baseclass.
While on linux it was sufficient to just pass WX_GL_DOUBLEBUFFER, on
Windows (where all of this wasn´t necessary, but I like to keep the
programs as similar as possible) the WX_GL_RGBA is needed (unless you
want no colors ...)


@Chris: I cannot say if this is distribution-specific, as I only have
ubuntu on that laptop with the modern card. On my older laptop with
suse, it was double-buffered.

I cannot post the glxinfo right now, as I would have to reboot for
that. No matter what the answer is: Depending on the system, different
defaults are used, which is not good.


Regards,

Andreas

P.S.: It seems I can´t send messages via the gmane news server any
more, any ideas?

crjjrc schrieb:
> On Mar 19, 9:10 am, crjjrc <crj... at gmail.com> wrote:
>
>> Double-buffering is explicitly requested if the GLX version is < 1.3.
>> Otherwise, it is left up to GLX to decide whether double-buffering is
>> default.  Note that this doesn't mean double-buffering is turned off
>> for later versions of OpenGL.  Perhaps Ubuntu just has double-
>> buffering turned off by default?
>
> Here's a bit more info from the glXChooseFBConfig man page.  This
> function gets a NULL attribute list for GLX >= 1.3, so the default
> values are used.  The description for the GLX_DOUBLEBUFFER attribute
> is:
>
> -------
> GLX_DOUBLEBUFFER
> Must be followed by True or False. If True is specified, then only
> double-buffered frame buffer configurations are considered; if False
> is specified, then only single-buffered frame buffer configurations
> are considered. The default value is GLX_DONT_CARE.
> -------
>
> So, it sounds like it's up to some distribution-specific code to
> decide whether double-buffering is used or not.  Is there something in
> Ubuntu 7.10 that prefers single-buffering?  Or does it just pick off
> the first visual that it finds, and the first happens to not be double-
> buffered?
>
> - Chris






More information about the wx-users mailing list