This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package htpt | |
import "core:fmt" | |
import "core:strings" | |
import "vendor:sdl2" | |
import "vendor:sdl2/net" | |
import "core:time" | |
main :: proc(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |