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
| #!/usr/bin/env sh | |
| glslc shader.vert -o vert.spv | |
| glslc shader.frag -o frag.spv |
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 main | |
| import "core:log" | |
| import "core:mem" | |
| import "core:runtime" | |
| import "vendor:glfw" | |
| import gl "vendor:OpenGL" | |
| 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
| package main | |
| import "core:runtime" | |
| main :: proc() { | |
| context.assertion_failure_proc = print_call_frames | |
| foo() | |
| } |
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 main | |
| import "core:fmt" | |
| import "core:io" | |
| import "core:odin/ast" | |
| import "core:odin/parser" | |
| import "core:os" | |
| import "core:path/filepath" | |
| import "core:slice" | |
| import "core:strings" |
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
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit | |
| of the public at large and to the detriment of our heirs and | |
| successors. We intend this dedication to be an overt act of |
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 rlights | |
| import rl "vendor:raylib" | |
| MAX_LIGHTS :: 4 | |
| Light :: struct { | |
| type: LightType, | |
| enabled: b32, | |
| position: [3]f32, |
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
| program: entry.c program.odin | |
| odin build . -out:program -no-entry-point -build-mode:object | |
| clang entry.c program.o -o program | |
| rm program.o |
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 vendor_wgpu_example_fontstash | |
| import intr "base:intrinsics" | |
| import "core:fmt" | |
| import "core:math/linalg" | |
| import sa "core:container/small_array" | |
| import fs "vendor:fontstash" | |
| import "vendor:wgpu" |
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 main | |
| import "core:c/libc" | |
| import "core:fmt" | |
| import "core:io" | |
| import "core:os" | |
| import "core:time" | |
| import "core:unicode/utf8" | |
| @(require) |
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
| deep_clone :: proc(value: $T, allocator := context.allocator, temp_allocator := context.temp_allocator) -> (clone: T) { | |
| internal_deep_clone :: proc(value: any, clone: any, ptrs: ^map[rawptr]rawptr) { | |
| // Forgive me father for I have sinned. | |
| using reflect | |
| value_core := any_core(value) | |
| clone_core := any_core(clone) | |
| assert(value_core.id == clone_core.id) | |
| fti := type_info_of(value_core.id) |