SpriteGen/main.cpp
2024-07-27 10:18:00 -07:00

52 lines
956 B
C++

#include <ehs/EHS.h>
#include <ehs/Log.h>
#include <lwe/RenderWindow.h>
#include <lwe/GameLoop.h>
#include "MainLvl.h"
int main()
{
ehs::Initialize("SpriteGen", "Release", {1, 0, 0});
ehs::Log::EnableImmediateMode(true);
lwe::RenderWindow::AddExtensions();
lwe::GpuInstance::Initialize(true);
lwe::GpuDevice device = std::move(lwe::GpuDevice::GetBest());
lwe::GpuQueueFamily* family = device.GetQueueFamily(lwe::QueueType::GRAPHICS);
lwe::GpuInterface inf(&device);
lwe::RenderWindow::AddExtensions(&inf);
lwe::GpuQueue primary(family, &inf, 1.0f);
inf.Initialize();
lwe::RenderWindow win(&inf, &primary);
win.Create_8(ehs::GetAppName_8(), {0, 0}, {1024, 768});
win.Show();
lwe::GameLoop gl(&win, 0, 0);
gl.EnableTimeLock(true);
gl.SetMaxTPS(60);
gl.AddLevel(new MainLvl());
gl.Initialize();
gl.Start();
gl.UnInitialize();
win.Close();
inf.Release();
lwe::GpuInstance::Release();
ehs::Uninitialize();
return 0;
}