Wiki

Clone wiki

glxx / ExtensionUsage

#include <glxx/gl_2_1.h>                            //Bring all functions and #defines from OpenGL 2.1
#include <glxx/gl_arb_texture_buffer_object.h>      //Bring all funcitons and #defines from _texture_buffer_object
//...

on_OpenGL_init()
{
    if (!has_gl_2_1())
        // "OpenGL 2.1 is not supported";
    if (!load_gl_2_1())
        // "Could not load OpenGL 2.1";

    if (!has_gl_arb_texture_buffer_object())
        // "Does not support GL_ARB_texture_buffer_object";
    if (!load_gl_arb_texture_buffer_object())
        // "Could not load GL_ARB_texture_buffer_object";
    // ...
}

on_OpenGL_paint()
{
    // ...
    glClear(GL_COLOR_BUFFER_BIT);
    // ...
    glTexBufferARB(GL_TEXTURE_BUFFER_ARB, GL_RGBA8, idbuffer);
    // ...
}

Updated