Skip to content

Instantly share code, notes, and snippets.

View markodevv's full-sized avatar

Marko markodevv

View GitHub Profile
@nickrolfe
nickrolfe / windows_modern_opengl_context.c
Last active October 13, 2024 00:03
Sample code showing how to create a window using a modern OpenGL core profile context without any libraries other than the standard Win32 wglXXX calls.
// Sample code showing how to create a modern OpenGL window and rendering context on Win32.
#include <windows.h>
#include <gl/gl.h>
#include <stdbool.h>
typedef HGLRC WINAPI wglCreateContextAttribsARB_type(HDC hdc, HGLRC hShareContext,
const int *attribList);
wglCreateContextAttribsARB_type *wglCreateContextAttribsARB;