MSW/WGL/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<WGLEngine>(p.handle, (p.deviceCreationFlags > 0));
30  if (!engine->MeetsRequirements())
31  {
32  LogError("OpenGL 4.3 or later is required.");
33  parameters.engine = nullptr;
34  parameters.factory = nullptr;
35  parameters.created = false;
36  return;
37  }
38 
39  if (engine->GetDevice())
40  {
41  parameters.engine = engine;
42  parameters.factory = std::make_shared<GLSLProgramFactory>();
43  parameters.created = true;
44  }
45  else
46  {
47  LogError("Cannot create graphics engine.");
48  parameters.engine = nullptr;
49  parameters.factory = nullptr;
50  parameters.created = false;
51  }
52 }
virtual void CreateEngineAndProgramFactory(MSWWindow::Parameters &parameters) override
#define LogError(message)
Definition: GteLogger.h:92
unsigned int deviceCreationFlags
Definition: GLX/GteWindow.h:31
GLfloat GLfloat p
Definition: glext.h:11668
GTE_IMPEXP WindowSystem TheWindowSystem


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