feat(windows): a window - win32.ll, WGL on it, and a windowed Windows build
win32.ll implements cocoa.ll's contracts over user32 and xinput: the message pump, the held-key set and frame key in Ludic codes, the mouse with raw input for cursor mode 2, clip-based cursor modes released on focus loss, XInput pads, and the software framebuffer present. win32_gl.ll puts the WGL 4.1 core context on that window (vsync, borderless full screen); gl_win.ll's context code is now lgl_wgl_core, shared with the headless hidden window, whose win_gl_* stubs move to gl_win_nowin.ll. audio_win.ll links Audio.* silently for now. Verified: macOS fixpoint, ludic-dev test 135/135, selfhost-test 32/32; on the PC gl_triangle renders identically headless and in a real window, and Maroon Lake builds windowed and runs a playtest to frame 240 in the desktop session. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
1bc255bc40
commit
00d25dcc3e
8 changed files with 1696 additions and 442 deletions
44
runtime/native/gl_win_nowin.ll
Normal file
44
runtime/native/gl_win_nowin.ll
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
; ============================================================================
|
||||
; gl_win_nowin.ll — the window half of Gl.* in a headless Windows build.
|
||||
;
|
||||
; gl.ludic names win_gl_* on its is_windowed() branch. A headless build compiles that
|
||||
; branch to nothing, but the names still have to resolve; a windowed build links
|
||||
; win32_gl.ll, which defines them on the real window, in place of this file.
|
||||
; ============================================================================
|
||||
|
||||
define i32 @win_gl_attach() {
|
||||
entry:
|
||||
ret i32 0
|
||||
}
|
||||
define void @win_gl_resize(i32 %w, i32 %h) {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
define void @win_gl_swap() {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
define i32 @win_gl_scale() {
|
||||
entry:
|
||||
ret i32 1
|
||||
}
|
||||
define void @win_gl_swap_interval(i32 %n) {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
define void @win_gl_drawable(ptr %out) {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
define void @win_gl_update() {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
define void @win_gl_retina(i32 %on) {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
define void @win_toggle_fullscreen() {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue