Skip to content
forked from VisualGMQ/toy2d

A toy 2D renderder based on Vulkan

Notifications You must be signed in to change notification settings

zengweitick/toy2d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toy2D

Toy2d是一个模仿SDL2_Renderer功能的2D玩具渲染器,是我在学习Vulkan过程中编写的。

我把我的学习过程录制成视频放在B站了,有兴趣的可以看看。每个视频对应一个分支,可前往不同分支获得不同阶段的代码。

主分支是最终代码。

编译

工程使用CMake。需要预先安装好VulkanSDK

Linux和MacOSX下安装好SDL2,然后运行

cmake -S . -B cmake-build
cmake --build cmake-build

Windows下我只使用VS编译了(其他平台未测试)。下载编译好的SDL2文件, 然后再CMake的时候指定SDL2路径:

SDL2_ROOT = <your dir to SDL2>/SDL2-2.0.22-VC

然后编译

cmake -S . -B cmake-build
cmake --build cmake-build

产生sandbox可执行文件。请在工程根目录下运行(便于找到资源文件)。

About

A toy 2D renderder based on Vulkan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 79.0%
  • C++ 19.1%
  • CMake 1.7%
  • GLSL 0.2%