37 lines
No EOL
929 B
C++
37 lines
No EOL
929 B
C++
#include "TestCase.h"
|
|
#include "TestCaseRunner.h"
|
|
|
|
#include "TestUiApplication.h"
|
|
|
|
#include "TestFramework.h"
|
|
|
|
#include "DesktopManager.h"
|
|
#include "MeshPrimitives.h"
|
|
#include "MeshNode.h"
|
|
#include "TextNode.h"
|
|
#include "Scene.h"
|
|
#include "Widget.h"
|
|
|
|
#include "Pointer.h"
|
|
#include "String.h"
|
|
#include <iostream>
|
|
|
|
TEST_CASE(TestDirectXRendering, "graphics")
|
|
{
|
|
auto gui_app = TestCaseRunner::getInstance().getTestApplication();
|
|
|
|
auto drawing_context = gui_app->getDesktopManager()->getWindowManager()->getMainWindow();
|
|
|
|
auto scene = drawing_context->getScene();
|
|
|
|
auto mesh = MeshPrimitives::buildRectangleAsTriMesh();
|
|
auto mesh_node = std::make_unique<MeshNode>(Transform(DiscretePoint(0, 0)));
|
|
mesh_node->setMesh(mesh.get());
|
|
scene->addNode(mesh_node.get());
|
|
|
|
auto text_node = std::make_unique<TextNode>("Test", Transform(DiscretePoint(100, 100)));
|
|
scene->addNode(text_node.get());
|
|
|
|
scene->update();
|
|
gui_app->run();
|
|
}; |