-
Notifications
You must be signed in to change notification settings - Fork 130
readme: sokol_gp #224
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
Open
sudokit
wants to merge
1
commit into
vlang:master
Choose a base branch
from
sudokit:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
readme: sokol_gp #224
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does your compare with the older
sokol_qp?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not by too much, enum members named a bit differently and the sokol_gp header file is newer (some functions different because of that). I can prob also try submitting a pr for the original repo if thats better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am considering replacing the older one and keeping it because it is significantly outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah was thinking about that too but just felt wrong to replace it. I guess it would just be easier to replace it in order to get the latest version. Just if you could check that the code is according to the V naming convention and that stuff. First day with V so not too familiar yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say "up-to-date" in the description... it's only true if you always keep the wrapper up-to-date. Otherwise the first time sokol_gp is updated, the wrapper is no longer up-to-date.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. If it was a different thing (as in different functionality of the wrapper), and they both still work, I'd say keep both. If they are basically the same thing, just one more up-to-date than the other, or one will compile with latest V where the other won't, there's no reason to keep the other.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so the old one just plain doesnt work. It uses deprecated attribute annotation and when trying to use it fails with an error.
And i couldnt figure what that error meant, but i think it has something to do with the new sokol library headers not having context and hence harder to fix without completely remaking the wrapper, so thats what i did.
another thing, some things arent working. like drawing many of something. cant figure out how to pass
const sgp_point* pointsfrom V for exampleUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there was a fairly recent breaking change in the sokol headers, which could explain that error.
When you find an error in someone else's package, there's always the possibility of submitting a PR to them or just sending an email asking if they're willing to update theirs.
The autocomplete is still WIP, so it won't always be accurate as to what the compiler allows (or doesn't).
As far as passing an array from V to C code... an array in V is not a C array, it is a struct with several fields, including a C-style array named
data. So you can pass&points.datato C and it will look like passing a C array.However, you need to make sure the C code won't try to modify the length of the array, or V will not understand the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sokol projects is very dependent on the sokol version they were written for/against. A fact that not everyone is aware of. Sokol is a very active project that often has breaking changes but it also has very stable releases. So projects written against sokol 2 years ago works with sokol at that point in time, but not newer versions of sokol.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry disappeared for a while. That's for the .data, it worked. I totally forgot about that. And yeah ig I can try submitting a PR