Not sure if this is the right place, but if not, I’ll delete it… I’m assuming there are some people using sdl_gpu here
So I have a GPU_Image loaded into ‘tile’ - and if I dump ‘tile’ via GPU_CopySurfaceFromImage() and SDL_SaveBMP(), then the resulting image looks just the same as the original source. I’m happy that ‘tile’ is ok.
Then I have some code:
_bg = GPU_CreateImage(W, H, GPU_FORMAT_RGBA);
GPU_Target *target = GPU_GetTarget(_bg);
tile->anchor_x = 0;
tile->anchor_y = 0;
int w = tile->w;
int h = tile->h;
for (int y=0; y<H; y+=h)
for (int x=0; x<W; x+=w)
GPU_Blit(tile, NULL, target, x, y);
GPU_FreeImage(tile);
… and the resulting ‘_bg’ image looks … washed out. Testing with a bright tile like:
… the resulting tiled _bg looks like:
I’m wondering if there is something I have to add to the code above, or if it’s perhaps a color-space issue, or anyone got any better ideas ?
Cheers