Re: GTK+ 3.16.0 released



On 24.03.2015 14:25, Emmanuele Bassi wrote:
On 24 March 2015 at 10:45, LRN wrote:
* GDK supports rendering windows using OpenGL; currently
   this is implemented for X11 and Wayland using libepoxy

* GtkGLArea is a new widget for rendering with OpenGL

I thought it would also be good to let people know about this, rendering
windows using OpenGL is also implemented on Microsoft Windows as well,
also using libepoxy.

Provided that libepoxy is appropriately-patched to consider OpenGL 1.1 to be
the core implementation provided by opengl32.dll
 (otherwise it may crash at runtime when you try to call OpenGL 1.1 functions).

You mean all functions that were added in OpenGL 1.1 and not
deprecated after OpenGL 3.2?

GTK+ does not support legacy profiles, so using deprecated, pre-3.2
API is not going to be possible in any case.

Well, according to libepoxy, glDrawArrays is a 1.1 function:

static PFNGLDRAWARRAYSPROC
epoxy_glDrawArrays_resolver(void)
{
    static const enum gl_provider providers[] = {
        Desktop_OpenGL_1_1,
        OpenGL_ES_2_0,
        OpenGL_ES_1_0,
        GL_extension_GL_EXT_vertex_array,
        gl_provider_terminator
    };
    static const uint16_t entrypoints[] = {
        10254 /* "glDrawArrays" */,
        10254 /* "glDrawArrays" */,
        10254 /* "glDrawArrays" */,
        10267 /* "glDrawArraysEXT" */,
    };
    return gl_provider_resolver(entrypoint_strings + 10254 /* "glDrawArrays" */,
                                providers, entrypoints);
}

and gtk-demo does use it[1].

[1] https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/glarea.c#n262

-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org

Attachment: 0x922360B0.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature



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