2022-06-19 04:33:41 +01:00
|
|
|
#include <Orange/Core/Result.h>
|
|
|
|
|
|
|
|
#include <Orange/Render/Window.h>
|
2022-08-04 03:00:54 +01:00
|
|
|
#include <Orange/Render/RenderContext.h>
|
|
|
|
#include <Orange/Render/Swapchain.h>
|
2022-06-19 04:33:41 +01:00
|
|
|
|
|
|
|
using namespace orange;
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
|
2022-08-04 18:23:08 +01:00
|
|
|
auto r_window = Window::Create();
|
2022-06-19 04:33:41 +01:00
|
|
|
if (!r_window)
|
|
|
|
return 1;
|
|
|
|
|
2022-08-04 18:23:08 +01:00
|
|
|
auto r_renderContext = RenderContext::Create("Cube Test");
|
2022-08-04 03:00:54 +01:00
|
|
|
if (!r_renderContext)
|
2022-08-02 22:27:01 +01:00
|
|
|
return 1;
|
|
|
|
|
2022-08-04 18:23:08 +01:00
|
|
|
auto r_surface = r_window->CreateSurface(r_renderContext->Instance());
|
2022-08-04 03:00:54 +01:00
|
|
|
if (!r_surface)
|
|
|
|
return 1;
|
2022-08-03 05:33:52 +01:00
|
|
|
|
2022-08-04 18:23:08 +01:00
|
|
|
auto r_swapchain = Swapchain::Create(*r_renderContext, *r_surface);
|
2022-08-04 03:00:54 +01:00
|
|
|
if (!r_swapchain)
|
2022-08-02 22:27:01 +01:00
|
|
|
return 1;
|
2022-06-19 04:33:41 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|