GteDX11DrawTarget.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.
22  std::vector<DX11TextureRT*>& rtTextures, DX11TextureDS* dsTexture);
23  static std::shared_ptr<GEDrawTarget> Create(DrawTarget const* target,
24  std::vector<GEObject*>& rtTextures, GEObject* dsTexture);
25 
26  // Member access.
27  inline DX11TextureRT* GetRTTexture(unsigned int i) const;
28  inline DX11TextureDS* GetDSTexture() const;
29 
30  // Used in the Renderer::Draw function.
31  void Enable(ID3D11DeviceContext* context);
32  void Disable(ID3D11DeviceContext* context);
33 
34 private:
35  std::vector<DX11TextureRT*> mRTTextures;
37 
38  // Convenient storage for enable/disable of targets.
39  std::vector<ID3D11RenderTargetView*> mRTViews;
40  ID3D11DepthStencilView* mDSView;
41 
42  // Temporary storage during enable/disable of targets.
43  D3D11_VIEWPORT mSaveViewport;
44  std::vector<ID3D11RenderTargetView*> mSaveRTViews;
45  ID3D11DepthStencilView* mSaveDSView;
46 };
47 
48 inline DX11TextureRT* DX11DrawTarget::GetRTTexture(unsigned int i) const
49 {
50  return mRTTextures[i];
51 }
52 
54 {
55  return mDSTexture;
56 }
57 
58 }
std::vector< DX11TextureRT * > mRTTextures
std::vector< ID3D11RenderTargetView * > mRTViews
DX11TextureDS * mDSTexture
DX11TextureRT * GetRTTexture(unsigned int i) const
GLenum target
Definition: glcorearb.h:1662
DX11TextureDS * GetDSTexture() const
ID3D11DepthStencilView * mSaveDSView
ID3D11DepthStencilView * mDSView
D3D11_VIEWPORT mSaveViewport
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63
std::vector< ID3D11RenderTargetView * > mSaveRTViews


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