Skip to content

Instantly share code, notes, and snippets.

View adarshwshaw's full-sized avatar
🎯
Focusing

Adarsh Shaw adarshwshaw

🎯
Focusing
View GitHub Profile
@adarshwshaw
adarshwshaw / main.c
Last active August 24, 2025 16:55
Windows legacy opengl window with win32
#include <Windows.h>
#include <gl/GL.h>
#include <stdio.h>
#define WND_WIDTH 800
#define WND_HEIGHT 600
// TODO(mordern opengl) :
// https://gist.github.com/nickrolfe/1127313ed1dbf80254b614a721b3ee9c
_Bool running = 1;
@adarshwshaw
adarshwshaw / assert.c
Last active October 1, 2025 12:58
debugbreak
#include <stdio.h>
// for compile time asserts
#define static_assert(cond, msg) \
typedef char static_assert_##__LINE__[(cond)? 1 : -1]
static_assert(sizeof(int)==4, 4bitint);
//for run time asserts
#define assert(cond, msg) \