大佬,这是什么问题啊?
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
int main (){if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)){SDL_Log("Error!%s",SDL_GetError());return -1;}
SDL_Window * win = SDL_CreateWindow("Hello",0,0,1600,720,2);
if (win == NULL){SDL_Log("Error!%s",SDL_GetError());return -1;}
SDL_Renderer * rdr = SDL_CreateRenderer(win,-1,0);
if (rdr == NULL){SDL_Log("Error!%s",SDL_GetError());return -1;}
SDL_Surface * surf ;
SDL_Rect rect={0,0,100,100};SDL_RenderClear(rdr); SDL_SetRenderDrawBlendMode(rdr,SDL_BLENDMODE_BLEND);
while (1){ SDL_SetRenderDrawColor(rdr,0,0,0,255);// SDL_RenderClear(rdr);
rect.x++;
rect.y+=2; SDL_SetRenderDrawColor(rdr,0,185,200,255); SDL_RenderFillRect(rdr,&rect); SDL_RenderPresent(rdr); }
SDL_Delay(20000);
SDL_DestroyRenderer(rdr); SDL_DestroyWindow(win); SDL_FreeSurface(surf);
return 0;
}



#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
int main (){if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)){SDL_Log("Error!%s",SDL_GetError());return -1;}
SDL_Window * win = SDL_CreateWindow("Hello",0,0,1600,720,2);
if (win == NULL){SDL_Log("Error!%s",SDL_GetError());return -1;}
SDL_Renderer * rdr = SDL_CreateRenderer(win,-1,0);
if (rdr == NULL){SDL_Log("Error!%s",SDL_GetError());return -1;}
SDL_Surface * surf ;
SDL_Rect rect={0,0,100,100};SDL_RenderClear(rdr); SDL_SetRenderDrawBlendMode(rdr,SDL_BLENDMODE_BLEND);
while (1){ SDL_SetRenderDrawColor(rdr,0,0,0,255);// SDL_RenderClear(rdr);
rect.x++;
rect.y+=2; SDL_SetRenderDrawColor(rdr,0,185,200,255); SDL_RenderFillRect(rdr,&rect); SDL_RenderPresent(rdr); }
SDL_Delay(20000);
SDL_DestroyRenderer(rdr); SDL_DestroyWindow(win); SDL_FreeSurface(surf);
return 0;
}


