GteDX11InputLayoutManager.h
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 #pragma once
9 
13 
14 namespace gte
15 {
16 
18 {
19 public:
20  // Construction and destruction.
21  virtual ~DX11InputLayoutManager();
23 
24  // Management functions. The Unbind(vbuffer) removes all pairs that
25  // involve vbuffer. The Unbind(vshader) removes all pairs that involve
26  // vshader.
27  DX11InputLayout* Bind(ID3D11Device* device, VertexBuffer const* vbuffer, Shader const* vshader);
28  virtual bool Unbind(VertexBuffer const* vbuffer) override;
29  virtual bool Unbind(Shader const* vshader) override;
30  virtual void UnbindAll() override;
31  virtual bool HasElements() const override;
32 
33 private:
34  typedef std::pair<VertexBuffer const*, Shader const*> VBSPair;
35 
36  class LayoutMap : public ThreadSafeMap<VBSPair, std::shared_ptr<DX11InputLayout>>
37  {
38  public:
39  virtual ~LayoutMap();
40  LayoutMap();
41 
42  void GatherMatch(VertexBuffer const* vbuffer, std::vector<VBSPair>& matches);
43  void GatherMatch(Shader const* vshader, std::vector<VBSPair>& matches);
44  };
45 
47 };
48 
49 }
std::pair< VertexBuffer const *, Shader const * > VBSPair
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


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