SDL常用函数:
博客参考:原作者-----快速传送门(为了后期复习,就没有写那么清楚)
SDL_Init(uint32 flag);
SDL_Window* SDL_CreateWindowFrom( const void*data);
SL_Renderer* SDL_CreateRenderer(SDL_Window* window, int index, uint32 flag);
SDL_Texture* SDL_CreateTexture(SDL_Renderer * renderer,Uint32 format,int access, int w, int h)
int SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch);
int SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch);
int SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect);
void SDL_RenderPresent(SDL_Renderer * renderer);
分界线:不太熟悉部分
void SDL_DestroyTexture(SDL_Texture* texture );
void SDL_UnlockTexture(SDL_Texture * texture);
SDL_delay();
void SDL_DestroyRenderer(SDL_Renderer * renderer);、
void SDL_DestroyWindow(SDL_Window * window);
void SDL_Quit(void);
int SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha);
int SDL_OpenAudio(SDL_AudioSpec * desired,SDL_AudioSpec * obtained);
void SDL_PauseAudio(int pause_on);
SDL_Surface * SDL_GetWindowSurface(SDL_Window * window);