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
| #include <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <stdint.h> | |
| #include <assert.h> | |
| #define COBJMACROS | |
| #pragma comment (lib, "dxguid") | |
| #include <dxgi1_3.h> | |
| #include <d3d11.h> | |
| typedef struct { |
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
| // Requires Common.h and Common.c from: https://github.com/TheSpydog/SDL_gpu_examples | |
| #include "Common.h" | |
| #include <SDL3/SDL_main.h> | |
| #include <stdint.h> | |
| #include <assert.h> | |
| int main(int argc, char **argv) { | |
| Context context = { 0 }; | |
| int frameNum = 0; | |
| uint64_t lastFrame = 0; |
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
| // Inspired by: https://github.com/nothings/stb/blob/master/stretchy_buffer.h | |
| // Note: untested code, no overflow checks, no range checks! | |
| printf(fmt cstring) int #Foreign("printf") #VarArgs | |
| StretchyBufferHeader struct { | |
| count int | |
| capacity int | |
| } |