stuff-from-scratch/test/graphics/TestOpenGlRendering.cpp

33 lines
685 B
C++
Raw Normal View History

2021-09-26 12:40:52 +00:00
#include "TestCase.h"
#include "TestCaseRunner.h"
2022-11-11 11:48:42 +00:00
#include "GuiApplication.h"
2021-09-26 12:40:52 +00:00
#include <memory>
#include <string>
#include <iostream>
class TestOpenGlRendering : public TestCase
{
public:
bool Run() override
{
2022-11-11 11:48:42 +00:00
auto app = std::make_unique<GuiApplication>();
2021-09-26 12:40:52 +00:00
2022-11-11 11:48:42 +00:00
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11);
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app->run();
2021-09-26 12:40:52 +00:00
return true;
}
};
int main()
{
TestCaseRunner runner;
runner.AddTestCase("TestOpenGlRendering", std::make_unique<TestOpenGlRendering>());
const auto testsPassed = runner.Run();
return testsPassed ? 0 : -1;
}