SDL2 program only works if Renderer is created with SDL_RENDERER_SOFTWARE
问题 I've written a program using C++ and SDL2 which: creates a window gets the window's surface creates a renderer for the window renders some filled rectangles onto the window creates a texture from the window's surface clears the screen renders some filled circles onto the window creates a second texture from the window's surface enters an event loop, where every time a key is pressed: if circles are currently being displayed, SDL_RenderCopy() is used to copy the squares texture to the window.