Skip to content

Instantly share code, notes, and snippets.

View Jackbenfu's full-sized avatar

Damien Bendejacq Jackbenfu

View GitHub Profile
@TheCherno
TheCherno / Instrumentor.h
Last active November 2, 2025 20:14
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
@noct
noct / gist:9884320
Created March 31, 2014 02:49
SDL2 Window Icon from resource
static void SDL_LoadWindowIcon(SDL_Window* window)
{
#if defined(_WIN32)
const unsigned int mask_r = 0x00ff0000;
const unsigned int mask_g = 0x0000ff00;
const unsigned int mask_b = 0x000000ff;
const unsigned int mask_a = 0xff000000;
const int res_id = 101;
const int size = 32;
const int bpp = 32;