A few questions about the raylib implementation #4806
Unanswered
aglebionek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While playing around with some gamedev using oding+raylib, I've noticed that the raylib Texture struct takes 20 bytes, and the Image takes 24.
Here are the Texture and Image structs to serve as examples, and a helper PixelFormat enum definition.
PixelFormat specifies c.int, taking 4 bytes, however, with only 25 values inside, it could be defined using a single byte. I then noticed that all enums (except Gesture) are defined this way.
Looking again at the structs above, if the width and height properties represent the pixel size, they could probably use just 2 bytes each instead of 4.
My questions are:
Beta Was this translation helpful? Give feedback.
All reactions