GteBaseEngine.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>
10 using namespace gte;
11 
13 {
14 }
15 
17  :
18  mXSize(0),
19  mYSize(0),
20  mClearDepth(1.0f),
21  mClearStencil(0)
22 {
23  mClearColor.fill(1.0f);
24 }
25 
26 void BaseEngine::SetFont(std::shared_ptr<Font> const& font)
27 {
28  mActiveFont = font;
29 }
30 
32 {
33  mDefaultBlendState = std::make_shared<BlendState>();
34  mDefaultDepthStencilState = std::make_shared<DepthStencilState>();
35  mDefaultRasterizerState = std::make_shared<RasterizerState>();
36 
37 #if defined(GTE_GRAPHICS_USE_NAMED_OBJECTS)
38  mDefaultBlendState->SetName("BaseEngine::mDefaultBlendState");
39  mDefaultDepthStencilState->SetName("BaseEngine::mDefaultDepthStencilState");
40  mDefaultRasterizerState->SetName("BaseEngine::mDefaultRasterizerState");
41 #endif
42 
46 }
47 
49 {
50  mDefaultBlendState = nullptr;
51  mActiveBlendState = nullptr;
52  mDefaultDepthStencilState = nullptr;
53  mActiveDepthStencilState = nullptr;
54  mDefaultRasterizerState = nullptr;
55  mActiveRasterizerState = nullptr;
56 }
std::shared_ptr< RasterizerState > mDefaultRasterizerState
std::shared_ptr< Font > mActiveFont
std::shared_ptr< RasterizerState > mActiveRasterizerState
std::shared_ptr< BlendState > mActiveBlendState
unsigned int mXSize
Definition: GteBaseEngine.h:95
void SetDefaultDepthStencilState()
std::array< float, 4 > mClearColor
Definition: GteBaseEngine.h:98
unsigned int mClearStencil
void CreateDefaultGlobalState()
virtual void SetFont(std::shared_ptr< Font > const &font)
std::shared_ptr< DepthStencilState > mActiveDepthStencilState
virtual ~BaseEngine()
unsigned int mYSize
Definition: GteBaseEngine.h:95
GLfloat f
Definition: glcorearb.h:1921
std::shared_ptr< BlendState > mDefaultBlendState
virtual void DestroyDefaultGlobalState()
void SetDefaultBlendState()
std::shared_ptr< DepthStencilState > mDefaultDepthStencilState
void SetDefaultRasterizerState()


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59