This file contains 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
if red > 0 | |
{ | |
shader_set(sh_red); | |
shade_alpha = shader_get_uniform(sh_red, "alpha"); | |
shader_set_uniform_f(shade_alpha, 0); | |
draw_self(); | |
shader_reset(); | |
} |
This file contains 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
// Thanks to Jeroen for giving me his random algorithm code! | |
package main | |
import "w4" | |
Input :: struct #packed { | |
gamepads: [4]w4.Buttons, | |
mouse: struct #packed { | |
pos: [2]i16, |
This file contains 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
// Add this in vendor\vulkan\core.odin | |
VK_KHR_MAINTENANCE_1_SPEC_VERSION :: 2 | |
VK_KHR_MAINTENANCE_1_EXTENSION_NAME :: "VK_KHR_maintenance1" | |
VK_KHR_MAINTENANCE_2_SPEC_VERSION :: 1 | |
VK_KHR_MAINTENANCE_2_EXTENSION_NAME :: "VK_KHR_maintenance2" | |
VK_KHR_MAINTENANCE_3_SPEC_VERSION :: 1 | |
VK_KHR_MAINTENANCE_3_EXTENSION_NAME :: "VK_KHR_maintenance3" | |
VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION :: 1 | |
VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME :: "VK_NV_viewport_array2" |
This file contains 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 tokenizer | |
import "core:text/scanner" | |
import "core:unicode" | |
import "core:strings" | |
import "core:slice" | |
Tokenizer :: struct { | |
src: string, | |
} |
This file contains 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 kit | |
////////////////////////////////////////////////////////////////////////////// | |
// Embedded font | |
////////////////////////////////////////////////////////////////////////////// | |
@(private) | |
font_png := [?]byte{ | |
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, | |
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x01, 0x00, |
This file contains 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 app | |
import win32 "core:sys/windows" | |
import "core:intrinsics" | |
import "core:runtime" | |
L :: intrinsics.constant_utf16_cstring | |
@(private) | |
Context :: struct { | |
should_close: bool, |
This file contains 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 main | |
import "app" | |
import "core:slice" | |
import "core:math" | |
import "core:math/linalg" | |
import "core:fmt" | |
Vector2f32 :: linalg.Vector2f32 | |
Vector3f32 :: linalg.Vector3f32 |
This file contains 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 main | |
import "jo:app" | |
import "core:mem" | |
import "core:os" | |
import "core:strings" | |
import "core:text/edit" | |
import stbtt "vendor:stb/truetype" | |
Glyph :: struct { |
This file contains 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 main | |
import "jo:app" | |
import win32 "core:sys/windows" | |
import "vendor:directx/d3d11" | |
import "vendor:directx/d3d_compiler" | |
import "vendor:directx/dxgi" | |
D3D11_Context :: struct { |
This file contains 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 main | |
// Original: https://gist.github.com/d7samurai/261c69490cce0620d0bfc93003cd1052 | |
import "jo:app" | |
import "vendor:directx/d3d11" | |
import "vendor:directx/dxgi" | |
import "vendor:directx/d3d_compiler" |