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

Fix GLbyte definition for aarch64 #74

Merged

Conversation

SimonDanisch
Copy link
Member

@SimonDanisch SimonDanisch commented Jan 25, 2022

@@ -9,7 +9,7 @@ const GLdouble = Cdouble
const GLushort = Cushort
const GLuint = Cuint
const GLint64 = Clonglong
const GLbyte = Cchar
const GLbyte = Int8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps worth adding a comment to guard against regression given this doesn't have test coverage as CI isn't run on aarch64?

Suggested change
const GLbyte = Int8
const GLbyte = Int8 # Cannot be a Cchar as Cchar is unsigned on aarch64

Copy link
Member Author

@SimonDanisch SimonDanisch Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, I'm not really sure why we initially used Cchar here, so there is a big chance, that it was just completely wrong...
So I don't think we actually need to motivate that we don't use Cchar anymore.
See the new Clang wrapped constants, that use the OpenGL headers as the source of trueth:

const khronos_int8_t = Int8

const GLbyte = khronos_int8_t

Which does seem to prove, that Cchar was simply just wrongly translated early on.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fair

@SimonDanisch SimonDanisch merged commit 5ffbcc1 into JuliaGL:master Jan 25, 2022
@Octogonapus Octogonapus deleted the bug/RGB/fix_glbyte_for_aarch64 branch January 25, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants