Skip to content

Replace SentinelDrawCallback with a define #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

nspitko
Copy link

@nspitko nspitko commented Sep 14, 2023

This mirrors the way ImGui does it (See also ImDrawCallback_ResetRenderState).

The primary motivation here is that it's possible to override the type of ImDrawCallback in the implementation, so any extension code needs to allow for whatever zany types the implementer may choose. (In our case, vclosure*)

With this change, the type should always be compatible, and we additionally support implementation overrides should some other extension or internal code be sitting on that sentinel value already in a way that would cause a conflict.

This mirrors the way ImGui does it (See also ImDrawCallback_ResetRenderState).
@nspitko
Copy link
Author

nspitko commented Sep 16, 2023

Note that #255 needs to be resolved before this can be merged, else it'll probably introduce a crash unless the user explicitly handles it in their backend.

@thedmd
Copy link
Owner

thedmd commented Sep 19, 2023

Thank you, I reintegrated changes to 0.9 and 0.10.

@thedmd thedmd closed this Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants