SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
940 stars 13 forks source link

Image viewer is broken when running with sdl2-compat #352

Closed chadchoi closed 1 month ago

chadchoi commented 1 month ago

It's working fine with the real SDL2.

SpartanJ commented 1 month ago

Hi, there's no stable release of SDL3 (and in consequence no stable SDL2-compat, a few weeks ago they just declared that their ABI is stable in 3.1.3 pre-release). This is not supported by the project and I think it's too early to try to support it (also there's no reason to do it yet, although SDL3 new features are great I don't need any of them). Also, I must clarify that image loading does not use any SDL2/3 feature, so I'm not sure what's not working for you.

chadchoi commented 1 month ago

Hi, there's no stable release of SDL3 (and in consequence no stable SDL2-compat, a few weeks ago they just declared that their ABI is stable in 3.1.3 pre-release). This is not supported by the project and I think it's too early to try to support it (also there's no reason to do it yet, although SDL3 new features are great I don't need any of them).

This report is more about letting you know my discovery rather than a real issue (for now, because sdl2-compat is not officially used by the project). But it will be useful if you ever want to use sdl2-compat in the future.

Also, I must clarify that image loading does not use any SDL2/3 feature, so I'm not sure what's not working for you.

I only report what I find. When using sdl2-compat, ecode will fail to load any images regardless of the image formats.

SpartanJ commented 1 month ago

I appreciate the intention, although I must clarify: sdl2-compat will never be used, when the time comes SDL3 will be added as another backend for window and input management (this will not happen anytime soon). I'm not interested in using any compat, it's always problematic, I already had the experience when I went from SDL to SDL2, sdl-compat had problems, as you are having now with sdl2-compat, this is because it's quite hard to mimic the exact same behaviour, also there are always limitations.

 I only report what I find. When using sdl2-compat, ecode will fail to load any images regardless of the image formats.

I see, textures are not loading correctly, then this is an OpenGL context issue, if it's not working it's an sdl2-compat issue, since sdl2-compat should try to guarantee that the context (or OpenGL initial state) is exactly the same as if were created with SDL2.