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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ModernGL"
uuid = "66fc600b-dfda-50eb-8b99-91cfa97b1301"
version = "1.1.4"
version = "1.1.5"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
2 changes: 1 addition & 1 deletion src/glTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

const GLchar = Cuchar
const GLubyte = Cuchar
const GLintptr = Cptrdiff_t
Expand Down