项目作者: navkagleb

项目描述 :
Game engine
高级语言: C++
项目地址: git://github.com/navkagleb/Ziben.git
创建时间: 2021-04-15T17:45:10Z
项目社区:https://github.com/navkagleb/Ziben

开源协议:MIT License

下载


Ziben Game Engine

Description

Ziben - 2D Game Engine based on OpenGL

ZibenEditor Example

Installation

Application supports only Windows Operating System and supports only MinGW compiler

Download the latest version of MinGW Compiler.
Add compiler to PATH environment variable

Download the CMake. Add CMake to PATH environment variable

  1. > git clone --recursive https://github.com/navkagleb/Labs/tree/master/Term4/OOP/Lab03

Go to created directory

  1. > mkdir build
  2. > cd build
  3. > cmake .. -G "MinGW Makefiles"
  4. > mingw32-make

Go to ‘Source’ directory and run the program

  1. > cd Source
  2. > ./SortAlgorithms

Integration

  • Ad submodule
    1. add_subdirectory(Ziben) # path to the 'random' library root
    2. # create target
    3. target_link_libraries(${TARGET} ZibenEngine) # add include path to a compiler

Usage

  1. #include <Ziben/Application.hpp>
  2. #include <Ziben/Scene/Layer.hpp>
  3. class Layer : public Ziben::Layer {
  4. void OnAttach() override {
  5. // Called to initialize the layer
  6. }
  7. void OnDetach() override {
  8. // Called before the layer is destroyed
  9. }
  10. void OnEvent(Ziben::Event& event) override {
  11. // Called to track window events
  12. }
  13. void OnUpdate(const Ziben::TimeStep& ts) override {
  14. // Call to update objects
  15. }
  16. void OnRender() override {
  17. // Called to render objects
  18. }
  19. void OnImGuiRender() override {
  20. // Called to render ImGui widgets
  21. }
  22. };
  23. class Application : public Ziben::Application {
  24. public:
  25. Application() : Ziben::Application("Window", 1280, 720) {
  26. PushLayer(new Layer);
  27. }
  28. };
  29. Ziben::Application* Ziben::CreateApplication(int argc, char** argv) {
  30. (void)argc;
  31. (void)argv;
  32. return new ::Application();
  33. }

License

MIT