Skip to content

Instantly share code, notes, and snippets.

YukiSnowy / main.cpp
Last active Sep 18, 2022
example SDL2 Vulkan application
View main.cpp
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
SDL_Window *window;
char* window_name = "example SDL2 Vulkan application";
hotwatermorning / lldb.txt
Created Feb 17, 2017
Step into std::function with lldb of Xcode
View lldb.txt
(lldb) settings show target.process.thread.step-avoid-regexp
target.process.thread.step-avoid-regexp (regex) = ^std::
(lldb) settings set target.process.thread.step-avoid-regexp ""

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);