Skip to content

Instantly share code, notes, and snippets.

View jdolan's full-sized avatar

Jay Dolan jdolan

View GitHub Profile
@Twinklebear
Twinklebear / main.cpp
Last active June 22, 2024 14:15
Example of render to texture with SDL2
#include <iostream>
#ifdef __linux__
#include <SDL2/SDL.h>
#elif defined(_WIN32)
#include <SDL.h>
#endif
const int WIN_WIDTH = 640;
const int WIN_HEIGHT = 480;
#ifndef _SDL_opengl_load_h
#define _SDL_opengl_load_h
extern PFNGLBLENDCOLORPROC SDL_glBlendColor;
#define glBlendColor SDL_glBlendColor
extern PFNGLBLENDEQUATIONPROC SDL_glBlendEquation;
#define glBlendEquation SDL_glBlendEquation
extern PFNGLDRAWRANGEELEMENTSPROC SDL_glDrawRangeElements;
@Grayson
Grayson / crayons.tsv
Created December 13, 2015 19:42
Color values from OSX's "Crayon" color picker pane
Name CSS Hex R G B
Licorice #000000 0x000000 0 0 0
Lead #191919 0x191919 25 25 25
Tungsten #333333 0x333333 51 51 51
Iron #4C4C4C 0x4C4C4C 76 76 76
Steel #666666 0x666666 102 102 102
Tin #7F7F7F 0x7F7F7F 127 127 127
Nickel #808080 0x808080 128 128 128
Aluminum #999999 0x999999 153 153 153
Magnesium #B3B3B3 0xB3B3B3 179 179 179