Skip to content
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

Use uint8 for GLchar and GLcharARB. Fix #47. #48

Merged
merged 1 commit into from
Nov 15, 2014
Merged

Conversation

errcw
Copy link
Member

@errcw errcw commented Nov 15, 2014

Per discussion in #47 use uint8 for GLchar instead of int8. Prefer uint8 over byte because some GL functions, such as glGetString use GLubyte rather than GLchar.

My only hesitation is that this change represents an API change that has the possibility of breaking client code. I expect the majority of use cases to be funneled through gl.Str which makes the change transparent but any direct string manipulation will be affected.

@dmitshur
Copy link
Member

My only hesitation is that this change represents an API change that has the possibility of breaking client code.

That would be a compile time error that's easy to spot and fix, right?

@errcw
Copy link
Member Author

errcw commented Nov 15, 2014

Yep, it should be a trivial fix for code hurt by this delta.

@dmitshur
Copy link
Member

Great. The change in this PR leads to a better API.

LGTM.

errcw added a commit that referenced this pull request Nov 15, 2014
Use uint8 for GLchar and GLcharARB. Fix #47.
@errcw errcw merged commit cd1168c into go-gl:master Nov 15, 2014
@slimsag
Copy link
Member

slimsag commented Nov 15, 2014

This looks great! I am really glad you worked out a solution to this.

LGTM =)

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.

None yet

3 participants