I was going to write a blog, but I'm not writing it or a video.
Here's the code for the test:
#include <SDL.h> #include <stdio.h>const int screen_width = 640;const int screen_height = 480;int main ( int argc, char* args[] ) { SDL_Window* window = NULL; sdl_surface* screensurface = null; if ( SDL_Init ( SDL_ init_video ) < 0 ) { printf ( "sdl could not initialize! sdl_error: %s\n", SDL_GetError () ); } else { window = sdl_createwindow ( "sdl tutorial", SDL_WINDOWPOS_ undefined, sdl_windowpos_undefined, screen_width, screen_height, sdl_window_shown ); &Nbsp; if ( window == NULL ) { printf ( "Window could not be created! sdl_error: %s\n ", sdl_geterror () ); } else { screensurface = sdl_getwindowsurface ( window ); sdl_fillrect ( screensurface, null, sdl_maprgb ( screenSurface->format, 0xFF, 0xFF, 0xFF ); ) sdl_updatewindowsurface ( window ); &nbsP; sdl_delay ( 2000 ); } } sdl_destroywindow ( window ); sdl_quit (); return 0;}
Development library:
Http://pan.baidu.com/s/1sjQf5Kx
Video: sdl_vs2010_ Development environment Configuration