-
currently using SDL2 hw-accelerated 32bit RGBA mode, i'm getting a mere 16 fps. which videomode works best on the GPU in the PSP ? |
Beta Was this translation helpful? Give feedback.
Answered by
rofl0r
Mar 10, 2024
Replies: 1 comment 5 replies
-
How are you use it? SDL2 is okay for drawing shapes and sprites, but for generating and displaying surfaces pixel by pixel the implementation is slow. You'll probably have better luck using libgu or libgum directly. There are some examples available here: https://github.com/pspdev/pspsdk/tree/master/src/samples/gu |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alright, after reading the source code of the PSP implementation it becomes clear that the PSP implements only 2 videomodes "natively":
SDL_PIXELFORMAT_ABGR8888
andSDL_PIXELFORMAT_BGR565
. by natively i mean that these map directly to modes supported by the GU. using anything else basically requires SDL to recalculate every single pixel in the texture to one of those 2 formats.i also found the function
SDL_LockTextureToSurface
which provides a temporary surface which let's me write directly to the texture's memory (which i assume is in VRAM).using this function, the ABGR mode, and removing SDL_RenderClear() from the draw loop now give me 75 fps with nothing else changed.
the code now lo…