sdl - SDL2 C++ - Multiple Image Rendering Bug -
before begin, ide use code::blocks. i going practice things learned online sdl in project separate study project. wanted load image of ball on top of background. worked fine in study project. replicated code on test project, , ball disappeared. background visible. i removed codes involve background , worked fine. my code: #include <iostream> #include <cstdlib> #include <sdl.h> #include <sdl_image.h> #undef main using namespace std; sdl_texture *loadtexture (string filepath, sdl_renderer *rendertarget){ sdl_texture *texture = 0; sdl_surface *surface = img_load(filepath.c_str()); texture = sdl_createtexturefromsurface(rendertarget, surface); sdl_freesurface(surface); return texture; } int main () { sdl_window *window = 0; sdl_texture *ball = 0; sdl_texture *background_sky = 0; sdl_renderer *rendertarget = 0; int framew, frameh; int texturew, textureh; //--crop instructions--// framew = textu...