Skip to content

Instantly share code, notes, and snippets.

View AdmiralPotato's full-sized avatar
🐐
Probably filling databases with Goats

Admiral Potato AdmiralPotato

🐐
Probably filling databases with Goats
View GitHub Profile
@thales17
thales17 / msys2-SDL2-Setup.md
Last active April 14, 2024 07:20
msys2 sdl2 setup

Download and install msys2 64bit

Update msys2

  • Update msys2 64bit after install by running pacman -Syu if pacman needs to be updated you might have to close and reopen the terminal and run pacman -Syu again

Install build tools

  • pacman -S git mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_mixer mingw64/mingw-w64-x86_64-SDL2_image mingw64/mingw-w64-x86_64-SDL2_ttf mingw64/mingw-w64-x86_64-SDL2_net mingw64/mingw-w64-x86_64-cmake make

Compile Hello World

@BeRo1985
BeRo1985 / qtangent_quaternion.glsl
Last active October 18, 2017 10:14
GLSL QTangent and Quaternion code stuff
// Copyright (C) 2017, Benjamin 'BeRo' Rosseaux - benjamin@rosseaux.de
// License: CC0
vec4 matrixToQTangent(mat3 m){
float f = 1.0;
if(((((((m[0][0]*m[1][1]*m[2][2])+
(m[0][1]*m[1][2]*m[2][0])
)+
(m[0][2]*m[1][0]*m[2][1])
)-
anonymous
anonymous / gist:7200880
Created October 28, 2013 17:20
Processing motion blur
/* passable motion blur effect using frame blending
* basically move your 'draw()' into 'sample()', time runs from 0 to 1
* by dave
* http://beesandbombs.tumblr.com
*/
int samplesPerFrame = 32; // more is better but slower. 32 is enough probably
int numFrames = 48;
float shutterAngle = 2.0; // this should be between 0 and 1 realistically. exaggerated for effect here
int[][] result;
anonymous
anonymous / gist:7186832
Created October 27, 2013 19:27
void setup() {
size(500, 500);
noFill();
strokeWeight(3);
strokeJoin(BEVEL);
}
float th1, th2, r, x, y, t;
int N = 16;