• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Hasan-Jawaheri/Wasabi: Wasabi Vulkan Game Engine

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Hasan-Jawaheri/Wasabi

开源软件地址:

https://github.com/Hasan-Jawaheri/Wasabi

开源编程语言:

C++ 94.8%

开源软件介绍:

Wasabi

Wasabi Vulkan Game Engine is currently a work-in-progress port for HasX11 Game Engine. Wasabi is designed to allow C++ programmers to write games and graphics applications easily without having to worry about the details of the tedious graphics APIs (Vulkan, Direct3D, OpenGL, etc...).

Current Features

OpenAL Sounds

Sprites

Text

Lights

Effects & Materials

Particles

Soft Particles

Particle Lighting

Basic Shadows

Soft Shadows

Cascaded Shadowmaps

Multi-directional Shadows

Deferred Rendering

Seamless Infinite Terrains (Geometry clipmaps)

Skeletal Animations (GPU-based)

Geometry Instancing

Havok Physics (mostly replaced by bullet)

Bullet Physics

File format for game assets

Map Editor

Linux Support

Mac Support

Assimp integration (and getting rid of FBX SDK!)

Building

Requirements

  • Vulkan SDK. You may also need to install vendor/gpu specific driver for Vulkan (or maybe that's not a thing anymore...)
  • Install cmake 3.15.
  • Install python3.
  • (Windows) Visual Studio (make sure to add the feature Visual C++ tools for CMake during installation)
  • (MacOS) XCode

Building Wasabi

git submodule init && git submodule update
mkdir build && cd build
cmake ..

This will automatically initialize and update submodule dependencies. On Windows, this will generate a solution build/Wasabi.sln, which you can open to use Visual Studio on the source code to edit/compile.

Usage

To link an application to Wasabi, you will need to link to Vulkan and to the wasabi library libwasabi.a (or wasabi.lib on Windows). On mac, you will need to add the following frameworks as well: Cocoa, CoreAudio, IOKit, CoreFoundation, CoreVideo, AudioUnit. You may use the CMake helper in CMake/LinkToWasabi.cmake (e.g. link_target_to_wasabi(wasabi_test "<PATH_TO_WASABI>") in your cmake file) to automatically link to the engine.

#include "Wasabi/Wasabi.hpp"

class MyApplication : public Wasabi {
public:
    WError Setup() {
        // start the engine
        WError status = StartEngine(640, 480);
        if (!status) {
            // Failed to start the engine...
            return status;
        }
        return status;
    }
    bool Loop(float fDeltaTime) {
        return true; // return true to continue to next frame
    }
    void Cleanup() {
    }
};

Wasabi* WInitialize() {
    return new MyApplication();
}

To start the engine, you need to implement the function WInitialize and make it return a new instance of a class that implements the Wasabi abstract class (in this case MyApplication).

MyApplication must implement 3 functions from Wasabi: Setup, Loop and Cleanup:

  • Setup(): All application setup code goes here. You will need to call StartEngine(width, height) here. StartEngine() creates the window and initializes the engine's resources. You shouldn't create any Wasabi objects (WObject, WGeometry, WImage, etc...) before calling StartEngine().
  • Loop(): This function is called every frame. This is where you update your application.
  • Cleanup(): This is called before the engine exits so you can cleanup resources.

Resources

Doxygen documentation

Samples

Contribution

Contribution is highly appreciated! Please pick up or create an issue first. Once an issue has been selected and you wish to address it, fork the repository and create a branch to implement the necessary changes. Once you're done and you have tested your changes, submit a pull request and it shall be reviewed shortly and hopefully merged into the repository.

Acknowledgments

License

GNU Public license, feel free to go wild with this.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap