GteDX11GraphicsObject.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 {
15  {
16  // Sampler, blend, depth-stencil, and rasterizer states have only a
17  // finite number of possibilities in DX11. If you create a state
18  // whose settings duplicate one already in existence, DX11 gives you
19  // a pointer to the existing one, incrementing the reference count
20  // internally. GTE does not track the duplicates, so we cannot
21  // assert that the reference count is zero.
22  if (mDXObject)
23  {
24  mDXObject->Release();
25  }
26  }
27  else
28  {
30  }
31 }
32 
34  :
35  GEObject(gtObject),
36  mDXObject(nullptr)
37 {
38 }
39 
41 {
42  mName = name;
43  HRESULT hr = SetPrivateName(mDXObject, mName);
44  CHECK_HR_RETURN_NONE("Failed to set private name");
45 }
bool IsDrawingState() const
DX11GraphicsObject(GraphicsObject const *gtObject)
#define CHECK_HR_RETURN_NONE(msg)
HRESULT SetPrivateName(ID3D11DeviceChild *object, std::string const &name)
GLuint const GLchar * name
Definition: glcorearb.h:781
ULONG FinalRelease(T *&object)
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
virtual void SetName(std::string const &name) override
ID3D11DeviceChild * mDXObject
std::string mName
Definition: GteGEObject.h:33
GraphicsObject * mGTObject
Definition: GteGEObject.h:32


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