1. yotis
  2. glxx

Wiki

Clone wiki

glxx / UsingWGL

#include <glxx/gl_3_3_core.h>
#include <wglxx/wgl_arb_create_context.h> // Include this for wgl_arb_create_context

on_OpenGL_init() {

    if (!has_wgl_arb_create_context())
        // Does not support WGL_ARB_extensions_string
    if (!load_wgl_arb_create_context())
        // Can't load WGL_ARB_extensions_string functions
    
    glGetIntegerv(WGL_CONTEXT_FLAGS_ARB, &wgl_context_flags);

    if (!has_3_3_core())
        // Does not support OpenGL version 3.3
    if (!load_3_3_core())
        // Can't load OpenGL 3.3 core functions.
    // ...
}

on_OpenGL_paint() 
{
    glClear(GL_COLOR_BUFFER_BIT);
}

Updated