Simple dx render example.
This commit is contained in:
parent
36515556b8
commit
e0cad34d55
22 changed files with 339 additions and 60 deletions
|
@ -1,11 +1,16 @@
|
|||
#include "TestCase.h"
|
||||
#include "TestCaseRunner.h"
|
||||
|
||||
#include "MainApplication.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "TestUiApplication.h"
|
||||
|
||||
#include "TestFramework.h"
|
||||
|
||||
#include "DesktopManager.h"
|
||||
#include "MeshPrimitives.h"
|
||||
#include "MeshNode.h"
|
||||
#include "Scene.h"
|
||||
#include "Widget.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
@ -14,5 +19,16 @@ 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>(DiscretePoint(0, 0));
|
||||
|
||||
mesh_node->setMesh(mesh.get());
|
||||
|
||||
scene->addNode(mesh_node.get());
|
||||
scene->update(nullptr);
|
||||
gui_app->run();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue