The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL 1.2 and pngs with bmps...pngs not showing up
robear0001


Joined: 21 Dec 2015
Posts: 1
Has anyone ran across the problem with SDL_Image where a mix of pngs and bmps is having unusual results. I set up two apps, one was all pngs and they all load and display fine. Second app, is a mix of bmps and pngs, other wise code is the same. The difference is the pngs do not show up at all.

In a third app we have a mix of pngs and bmps but it seems to depend on when we blit the pngs and bmps as to whether they show up.

This is SDL 1.2 using opengl with double buffered screen. Our app is of the standard design with a drawGLScene function that has the
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0, SCREEN_WIDTH, 0.0, SCREEN_HEIGHT);

then the blit();

then ends with the swap_buffer call.

If we insert a glBlitfast of a png right before the swap it shows up. In the blit() function there are many blits both bmp and png and that is where we see the issue with the pngs.

r