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
// D3D12 single-function triangle sample. | |
// | |
// Usage: | |
// - copy SDL2.dll from Odin/vendor/sdl2 to your project directory | |
// - odin run . | |
// | |
// Contributors: | |
// - Jakub Tomšů (updated to newest Odin version) | |
// - Karl Zylinski <[email protected]> (Initial port) | |
// |
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
#!/usr/bin/env sh | |
glslc shader.vert -o vert.spv | |
glslc shader.frag -o frag.spv |
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 | |
// This is how you can manually initialize a window and OpenGL context on windows, instead of using SDL or GLFW. | |
// Also renders a colorful quad onto the screen. | |
// I made this as an exercise and getting into Odin. | |
// This is my first "complete" odin program, so there's probably much better ways of doing this :D | |
import "base:runtime" | |
import "core:fmt" | |
import "core:c" |