Skip to content

Instantly share code, notes, and snippets.

View brianpmaher's full-sized avatar

Brian Maher brianpmaher

View GitHub Profile
@brianpmaher
brianpmaher / win32_opengl.c
Created February 9, 2025 20:51 — forked from mmozeiko/win32_opengl.c
setting up and using modern OpenGL 4.5 core context on Windows
// example how to set up OpenGL core context on Windows
// and use basic functionality of OpenGL 4.5 version
// important extension functionality used here:
// (4.3) KHR_debug: https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_debug.txt
// (4.5) ARB_direct_state_access: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_direct_state_access.txt
// (4.1) ARB_separate_shader_objects: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_separate_shader_objects.txt
// (4.2) ARB_shading_language_420pack: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shading_language_420pack.txt
// (4.3) ARB_explicit_uniform_location: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_explicit_uniform_location.txt
@brianpmaher
brianpmaher / color.bat
Last active February 1, 2025 22:26 — forked from mlocati/win10colors.cmd
ANSI Colors in standard Windows 10 shell
@echo off
::
:: Color codes for Windows cmd prompt
::
:: Credit to Michele Locati for the color codes (https://gist.github.com/mlocati/fdabcaeb8071d5c75a2d51712db24011#file-win10colors-cmd)
::
set SHOW_COLOR_EXAMPLES=1
@brianpmaher
brianpmaher / windows_modern_opengl_context.c
Created June 29, 2022 13:38 — forked from nickrolfe/windows_modern_opengl_context.c
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;