~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/Direct3DBase.h

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#pragma once
 
2
 
 
3
#include "DirectXHelper.h"
 
4
 
 
5
// Helper class that initializes DirectX APIs for 3D rendering.
 
6
ref class Direct3DBase abstract
 
7
{
 
8
internal:
 
9
    Direct3DBase();
 
10
 
 
11
public:
 
12
    virtual void Initialize();
 
13
    virtual void CreateDeviceResources();
 
14
    virtual void CreateWindowSizeDependentResources();
 
15
    virtual void UpdateForRenderResolutionChange(float width, float height);
 
16
    virtual void UpdateForWindowSizeChange(float width, float height);
 
17
    virtual void Render() = 0;
 
18
 
 
19
internal:
 
20
    virtual ID3D11Texture2D* GetTexture()
 
21
    {
 
22
        return m_renderTarget.Get();
 
23
    }
 
24
 
 
25
protected private:
 
26
    // Direct3D Objects.
 
27
    Microsoft::WRL::ComPtr<ID3D11Device1> m_d3dDevice;
 
28
    Microsoft::WRL::ComPtr<ID3D11DeviceContext1> m_d3dContext;
 
29
    Microsoft::WRL::ComPtr<ID3D11Texture2D> m_renderTarget;
 
30
    Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_renderTargetView;
 
31
    Microsoft::WRL::ComPtr<ID3D11DepthStencilView> m_depthStencilView;
 
32
 
 
33
    // Cached renderer properties.
 
34
    D3D_FEATURE_LEVEL m_featureLevel;
 
35
    Windows::Foundation::Size m_renderTargetSize;
 
36
    Windows::Foundation::Rect m_windowBounds;
 
37
};
 
 
b'\\ No newline at end of file'