RE: How I can do Double Buffer whether OpenGl Ext?





From the logo example:

    
    /*
     * Configure OpenGL-capable visual.
     */
    
    /* Try double-buffered visual */
    glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB    |
                                          GDK_GL_MODE_DEPTH  |
                                          GDK_GL_MODE_DOUBLE);
    if (glconfig == NULL)
    {
        g_print ("*** Cannot find the double-buffered visual.\n");
        g_print ("*** Trying single-buffered visual.\n");
        
        /* Try single-buffered visual */
        glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB   |
                                              GDK_GL_MODE_DEPTH);
        if (glconfig == NULL)
        {
            g_print ("*** No appropriate OpenGL-capable visual found.\n");
            exit (1);
        }
    }
    
......

    /* Set OpenGL-capability to the widget. */
    gtk_widget_set_gl_capability (drawing_area,
                                  glconfig,
                                  NULL,
                                  TRUE,
                                  GDK_GL_RGBA_TYPE);
    


This function first tries to create a glconfig using double buffered, if fails, uses single buffer). This 
works on OS X 10.6 Snow Leopard. 




 EMAILING FOR THE GREATER GOOD
Join me

Date: Tue, 9 Feb 2010 04:41:12 -0300
Subject: How I can do Double Buffer whether OpenGl Ext?
From: grojas icc gmail com
To: gtk-app-devel-list gnome org

Hi,

I'm trying to do a double buffer with pixbuf and draw area, whether to use
OpenGL Ext, but i don't know if it is posible or not.

Any idea?

Thanks.

Gustavo R.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
                                          


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]