zengine-old/engine/src/main.cpp

29 lines
844 B
C++
Raw Normal View History

2024-02-18 21:33:25 +08:00
#include <iostream>
#include <thread>
2024-03-11 00:56:40 +08:00
#include "vulkanapi/window.h"
#include "object/mesh/actor.h"
#include "object/property/actor_property.h"
#include "asset/asset_manager.h"
#include "render/renderapi.h"
2024-02-28 23:32:18 +08:00
#include "zlog.h"
2024-03-09 18:17:53 +08:00
using namespace engineapi;
2024-02-18 21:33:25 +08:00
int main(int argc, char** argv)
{
2024-02-28 23:32:18 +08:00
const char* name = "zengine";
zlog::info("hello {}", name);
2024-03-11 00:56:40 +08:00
RenderAPI::MakeInstance();
auto wnd = vulkanapi::Window(3, 640, 720, name);
2024-03-09 18:17:53 +08:00
ActorProperty property;
property.id = 1;
2024-03-13 22:29:47 +08:00
property.flags = Asset::ASSET_SHARED_FLAG | Asset::ASSET_ASYNC_FLAG;
2024-03-09 18:17:53 +08:00
property.path = "assets/models/cube.obj";
2024-03-11 00:56:40 +08:00
AssetManager instance;
AssetManager::Instance = &instance;
2024-03-09 18:17:53 +08:00
auto actor = ActorMesh::New(property);
while (true) {
2024-02-28 23:32:18 +08:00
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}
2024-03-09 18:17:53 +08:00
delete actor;
2024-02-18 21:33:25 +08:00
return 0;
2023-07-05 09:27:55 +08:00
}