1. yotis
  2. glxx

Wiki

Clone wiki

glxx / UsingLoaders

#include <glxx.h>
glxx::gl_version_1_5_deprecated::Loader* gl15;
glxx::gl_arb_framebuffer_object::Loader* fbo;

on_OpenGL_init()
{
    if (!glxx::has_gl_version_1_5_deprectaed())
        // OpenGL 1.5 is not supported
    gl15 = new glxx::gl_version_1_5_deprecated::Loader(); // RAII!
    if (!gl15->isLoaded())
        // Can't load OpenGL 1.5

    if (!glxx::has_gl_arb_framebuffer_object())
        // GL_ARB_framebuffer_object is not supported
    fbo = new glxx::gl_arb_framebuffer_object::Loader(); // RAII!
    if (!fbo->isLoaded())
        // Can't load GL_ARB_framebuffer_object

    // ...
}

on_OpenGL_paint()
{
   // ...
   gl15->Clear(GL_COLOR_BUFFER_BIT);
   // ...
   fbo->IsRenderBuffer(buffer_id);
   // ...
}

Updated