版权声明:K5出品,必属精品,欢迎收藏评论 https://blog.csdn.net/a694861283/article/details/87874268
//#include "SDL/SDL.h"
#include "SDL.h"
int main( int argc, char* args[] )
{
//声明表面
SDL_Surface* hello = NULL;
SDL_Surface* screen = NULL;
//启动SDL
SDL_Init( SDL_INIT_EVERYTHING );
//设置窗口
screen=SDL_SetVideoMode(1920,1080,32,SDL_SWSURFACE);
//加载图像
hello=SDL_LoadBMP("hello.bmp");
//将图像贴到窗口
SDL_BlitSurface(hello,NULL,screen,NULL);
//更新窗口
SDL_Flip(screen);
//暂停
SDL_Delay(2000);
//退出SDL
SDL_Quit();
return 0;
}