MSW/DX11/GteWindowSystem.cpp
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #include <GTEnginePCH.h>
13 using namespace gte;
14 
16 
18 {
19 }
20 
22 {
23 }
24 
26 {
27  Window::Parameters& p = static_cast<Window::Parameters&>(parameters);
28 
29  auto engine = std::make_shared<DX11Engine>(nullptr, p.handle, p.xSize,
30  p.ySize, D3D_DRIVER_TYPE_HARDWARE, nullptr, p.deviceCreationFlags,
31  p.featureLevel);
32 
33  if (engine->GetDevice())
34  {
35  parameters.engine = engine;
36  parameters.factory = std::make_shared<HLSLProgramFactory>();
37  parameters.created = true;
38  }
39  else
40  {
41  LogError("Cannot create graphics engine.");
42  parameters.engine = nullptr;
43  parameters.factory = nullptr;
44  parameters.created = false;
45  }
46 }
virtual void CreateEngineAndProgramFactory(MSWWindow::Parameters &parameters) override
std::shared_ptr< ProgramFactory > factory
Definition: GteWindowBase.h:35
#define LogError(message)
Definition: GteLogger.h:92
unsigned int deviceCreationFlags
Definition: GLX/GteWindow.h:31
std::shared_ptr< BaseEngine > engine
Definition: GteWindowBase.h:34
GLfloat GLfloat p
Definition: glext.h:11668
GTE_IMPEXP WindowSystem TheWindowSystem
D3D_FEATURE_LEVEL featureLevel


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:02