Closed
Description
SDL 3 has window comptime constants wrapped by SDL_UINT64_C, these are important but ignored by rust-bindgen
Source
#define SDL_WINDOW_FULLSCREEN SDL_UINT64_C(0x0000000000000001)
#define SDL_WINDOW_OPENGL SDL_UINT64_C(0x0000000000000002)
#define SDL_WINDOW_OCCLUDED SDL_UINT64_C(0x0000000000000004)
// many more
Expected rust binding
pub const SDL_WINDOW_FULLSCREEN: u64 = 0x0000000000000001;
pub const SDL_WINDOW_OPENGL: u64 = 0x0000000000000002;
pub const SDL_WINDOW_OCCLUDED: u64 = 0x0000000000000004;
Zig is perfectly able to resolve these
const sdl = @cImport({
@cInclude("SDL3/SDL.h");
});
pub fn main() !void {
_ = sdl.SDL_Init(sdl.SDL_INIT_VIDEO | sdl.SDL_INIT_EVENTS;);
const window = sdl.SDL_CreateWindow(
"zig_sdl",
640,
480,
sdl.SDL_WINDOW_RESIZABLE | sdl.SDL_WINDOW_VULKAN
);
}
Metadata
Metadata
Assignees
Labels
No labels