vendor:sdl3: Add missing bindings and fix some issues#6108
Open
VoidStarCaster wants to merge 18 commits intoodin-lang:masterfrom
Open
vendor:sdl3: Add missing bindings and fix some issues#6108VoidStarCaster wants to merge 18 commits intoodin-lang:masterfrom
VoidStarCaster wants to merge 18 commits intoodin-lang:masterfrom
Conversation
…roperties constants, removed #by_ptr for SetWindowFullscreenMode() mode (odin-lang#6092)
…, RenderTextureRotated: removed #by_ptr for center since it can be null
…ions (RectEmptyFloat, RectsEqualEpsilon, RectsEqualFloat), fix typo in RectsEqual name (was RectEqual), GetRectEnclosingPoints and GetRectEnclosingPointsFloat: Remove #by_ptr for clip since it can be null
…ternalStorageFlags bit_set
gingerBill
reviewed
Jan 9, 2026
gingerBill
reviewed
Jan 9, 2026
| GetRectIntersection :: proc(#by_ptr A, B: Rect, result: ^Rect) -> bool --- | ||
| GetRectUnion :: proc(#by_ptr A, B: Rect, result: ^Rect) -> bool --- | ||
| GetRectEnclosingPoints :: proc(points: [^]Point, count: c.int, #by_ptr clip: Rect, result: ^Rect) -> bool --- | ||
| GetRectEnclosingPoints :: proc(points: [^]Point, count: c.int, clip: ^Rect, result: ^Rect) -> bool --- |
gingerBill
reviewed
Jan 9, 2026
vendor/sdl3/sdl3_rect.odin
Outdated
| GetRectIntersectionFloat :: proc(#by_ptr A, B: FRect, result: ^FRect) -> bool --- | ||
| GetRectUnionFloat :: proc(#by_ptr A, B: FRect, result: ^FRect) -> bool --- | ||
| GetRectEnclosingPointsFloat :: proc(points: [^]FPoint, count: c.int, #by_ptr clip: FRect, result: ^FRect) -> bool --- | ||
| GetRectEnclosingPointsFloat :: proc(points: [^]FPoint, count: c.int, clip: ^FRect, result: ^FRect) -> bool --- |
gingerBill
reviewed
Jan 9, 2026
vendor/sdl3/sdl3_render.odin
Outdated
| RenderFillRects :: proc(renderer: ^Renderer, rects: [^]FRect, count: c.int) -> bool --- | ||
| RenderTexture :: proc(renderer: ^Renderer, texture: ^Texture, srcrect, dstrect: Maybe(^FRect)) -> bool --- | ||
| RenderTextureRotated :: proc(renderer: ^Renderer, texture: ^Texture, srcrect, dstrect: Maybe(^FRect), angle: f64, #by_ptr center: FPoint, flip: FlipMode) -> bool --- | ||
| RenderTextureRotated :: proc(renderer: ^Renderer, texture: ^Texture, srcrect, dstrect: Maybe(^FRect), angle: f64, center: ^FPoint, flip: FlipMode) -> bool --- |
gingerBill
reviewed
Jan 9, 2026
vendor/sdl3/sdl3_video.odin
Outdated
| GetWindowPixelDensity :: proc(window: ^Window) -> f32 --- | ||
| GetWindowDisplayScale :: proc(window: ^Window) -> f32 --- | ||
| SetWindowFullscreenMode :: proc(window: ^Window, #by_ptr mode: DisplayMode) -> bool --- | ||
| SetWindowFullscreenMode :: proc(window: ^Window, mode: ^DisplayMode) -> bool --- |
Author
There was a problem hiding this comment.
The uses of Maybe(^T) in SDL bindings are pretty inconsistent, some functions have it, some are missing it (for example GetRenderLogicalPresentationRect could have it for rect and RenderGeometry could have it for indices), so I just defaulted to ^T. Should it be used on any parameter that can be nil ?
gingerBill
approved these changes
Jan 9, 2026
Author
|
I fixed the misuse of tab for alignment and fixed a missing pointer in a |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes several issues with vendor:sdl3 that I opened (#6092, #6098 and #6102).
I also did a pass on most files and fixed other issues (wrong types or #by_ptr where pointer can be nil), typos, added missing bindings and constants, and added #force_inline for several macros.