28 lines
612 B
C++
28 lines
612 B
C++
#include <Orange/Core/Result.h>
|
|
|
|
#include <Orange/Render/Window.h>
|
|
#include <Orange/Render/Renderer.h>
|
|
|
|
using namespace orange;
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
(void)argc; (void)argv;
|
|
|
|
Result<Window> r_window = Window::Create();
|
|
if (!r_window)
|
|
return 1;
|
|
|
|
Result<Instance> r_instance = Instance::Create(*r_window, "Orange");
|
|
if (!r_instance)
|
|
return 1;
|
|
|
|
PhysicalDevice physicalDevice = PickBestPhysicalDevice(r_instance->PhysicalDevices());
|
|
|
|
Result<Device> r_device = Device::Create(*r_instance, physicalDevice);
|
|
if (!r_device)
|
|
return 1;
|
|
|
|
return 0;
|
|
}
|