SDL2:显示文字
#include <iostream>
/*因SDL2是C语言开发,所以这里需要加入C语言声明*/
extern "C"
{
#include "SDL.h"
#include "SDL_ttf.h"
}
/*因为SDL2内部存在main函数,则需要将其去掉。否则编译失败!*/
#undef main
const int SCREEN_WIDTH = 680;
const int SCREEN_HEIGHT = 240;
int main(int, char**)
{
// 初始...
原创
2022-05-02 15:17:16 ·
1007 阅读 ·
0 评论