Hello World for SDL2

SDL2 setting for visual studio.

http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/msvsnet2010u/index.php

1. SDL_Init( SDL_INIT_VIDEO );

2. window = SDL_CreateWindow( "SDL Tutorial", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN );

3. screenSurface = SDL_GetWindowSurface( window );

4. SDL_FillRect( screenSurface, NULL, SDL_MapRGB( screenSurface->format, 0xFF, 0xFF, 0xFF ) );

5. SDL_UpdateWindowSurface( window );

6. SDL_DestroyWindow( window );

The above five line code will create a SDL window and create a surface from this window, than we fill this surface with color(0xff, 0xff, 0xff) and update this window use the surface we create before, finally we just destroy the window and return this program

最新文章

  1. browser-sync
  2. 一次部署HTTPS的相关事件引发的思考
  3. hosts.allow和hosts.deny
  4. Converse.js – 开源的 XMPP 聊天客户端
  5. [URAL]刷题记录表
  6. winform画图闪烁问题
  7. 关于ScrollerView的一些小心得
  8. Windows环境下JDK安装与环境变量配置详细的图文教程
  9. Android核心分析之十四Android GWES之输入系统
  10. uboot在s3c2440上的移植(2)
  11. springmvc(六)——视图和视图解析器
  12. VS调试错误:“没有可用于当前位置的源代码”的解决方案
  13. POJ 2135 Farm Tour (最小费用最大流模板)
  14. UVa 10223 - How many nodes ?
  15. PatrolRobot(UVa1600)BFS
  16. jQuery event,冒泡,默认事件用法
  17. FindBugs简单应用
  18. 用js来实现那些数据结构(数组篇01)
  19. SQLServer 存储过程+定时任务发邮件
  20. ssm中整合Mybatis可以扫描到放在mapper下面的xml文件的方法

热门文章

  1. HDU 1532 Drainage Ditches EK算法 flod算法
  2. windows上传文件到linux
  3. ylbtech-dbs:ylbtech-PurpleBill(票据管理系统)
  4. JAVA 对象初始化的过程
  5. PHP框架 Laravel Eloquent ORM 批量插入数据 && 批量更新目前没有
  6. Redis中7种集合类型应用场景&redis常用命令
  7. mysql基础语法之(全文索引)
  8. Spring配置项<context:annotation-config/>说明
  9. isAnagram
  10. JQuery上传插件uploadify整理(Options)