This repository has been archived on 2025-02-04. You can view files and clone it, but cannot push or open issues or pull requests.
helpless/oogabooga/gfx_interface.c
Charlie 05919248eb - Replace lodepng with stb_image (& add stb_truetype for fonts)
- Fix d3d11 Input assembler not being created correctly bug
- Fix framerate being locked by swap chain present
- Move enable_vsync to window
- sqrt & rsqrt simd
- Add release build & run in vscode tasks & launch
- Cleanup
2024-07-04 20:56:27 +02:00

32 lines
763 B
C

#if GFX_RENDERER == GFX_RENDERER_D3D11
#include <d3d11.h>
#include <dxgi.h>
#include <dxgi1_2.h>
#include <d3dcompiler.h>
#include <dxgidebug.h>
#include <d3dcommon.h>
typedef ID3D11ShaderResourceView * Gfx_Handle;
#elif GFX_RENDERER == GFX_RENDERER_VULKAN
#error "We only have a D3D11 renderer at the moment"
#elif GFX_RENDERER == GFX_RENDERER_METAL
#error "We only have a D3D11 renderer at the moment"
#else
#error "Unknown renderer GFX_RENDERER defined"
#endif
forward_global const Gfx_Handle GFX_INVALID_HANDLE;
typedef struct Gfx_Image {
u32 width, height;
u8 *data;
Gfx_Handle gfx_handle;
Allocator allocator;
} Gfx_Image;
typedef struct Gfx_Font {
u32 width, height;
u8 *data;
Gfx_Handle gfx_handle;
Allocator allocator;
} Gfx_Font;