You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We pass in the Surface so that we can calculate the byte offset to the
pixel data based on the surface pixel format.
We have to calculate pitch based on the image width and pixel format
because the pitch field from the SDL_Surface struct is not exposed in
the wrapper.
See: haskell-game/sdl2#175
See https://wiki.libsdl.org/SDL_Surface?highlight=%28%5CbCategoryStruct%5Cb%29%7C%28SDLStructTemplate%29
I can get it via
but I don't know if it's not guaranteed to be equal always, e.e.g, in some exotic pixel formats.
The text was updated successfully, but these errors were encountered: