Skip to content

Instantly share code, notes, and snippets.

View hadron13's full-sized avatar
🔨
bonk

hadron13

🔨
bonk
  • your power supply
View GitHub Profile
SDL_SysWMinfo wmInfo;
SDL_VERSION(&wmInfo.version);
SDL_GetWindowWMInfo(window, &wmInfo);
HWND window_handle = wmInfo.info.win.window;
BOOL USE_DARK_MODE = true;
DwmSetWindowAttribute(window_handle, DWMWA_USE_IMMERSIVE_DARK_MODE,
&USE_DARK_MODE, sizeof(USE_DARK_MODE));
package htpt
import "core:fmt"
import "core:strings"
import "vendor:sdl2"
import "vendor:sdl2/net"
import "core:time"
main :: proc(){
float rand(vec2 c){
return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43658.5453);
}
float noise(vec2 p, float freq ){
float unit = 1.0/freq;
vec2 ij = floor(p/unit);
vec2 xy = mod(p,unit)/unit;
//xy = 3.*xy*xy-2.*xy*xy*xy;
xy = .5*(1.-cos(3.1415*xy));