Sn0wball-Studios / Snowball-Engine

light weight modular game engine
GNU General Public License v3.0
0 stars 0 forks source link

implement creating images from buffers, allow custom loaders #3

Closed BBQGiraffe closed 3 years ago

BBQGiraffe commented 3 years ago

added in the ability to load images from frame buffers

BBQGiraffe commented 3 years ago

no longer works because I haven't written this into BBQLib yet

BBQGiraffe commented 3 years ago

I tried to implement this in the newest BBQLib update but they're different on the SDL2 and SFML backends so one of them is broken(probably SDL2) Screenshot from 2021-08-30 01-51-13 Screenshot from 2021-08-30 01-47-47

BBQGiraffe commented 3 years ago

confirmed that SDL2 is the broken one as SFML imports raw image data just fine Screenshot from 2021-08-30 02-10-14 Screenshot from 2021-08-30 02-10-00

BBQGiraffe commented 3 years ago

it seems I was converting the frame buffer to a IntPtr incorrectly, the pixels are in the right order but I seem to have mixed up the format Screenshot from 2021-08-30 02-15-50

BBQGiraffe commented 3 years ago

changing from SDL_PIXELFORMAT_RGBA8888 to SDL_PIXELFORMAT_ABGR8888 seems to have fixed it I'm just as confused as you are but I dare not poke the SDL2 spaghetti monster Screenshot from 2021-08-30 02-18-09

BBQGiraffe commented 3 years ago

I think SDL2-CS might be broken because both the image and SFML use RGBA :confused:

BBQGiraffe commented 3 years ago

SDL_PIXELFORMAT_RGBA8888 works fine on my other computer so I honestly have no idea what's wrong and I'm too tired to care

BBQGiraffe commented 3 years ago

no longer broken, for now