-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackground.h
More file actions
46 lines (35 loc) · 1.15 KB
/
Copy pathBackground.h
File metadata and controls
46 lines (35 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include <d3d11_1.h>
#include <d3dcompiler.h>
#include <directxcolors.h>
#include <DirectXCollision.h>
#include "DDSTextureLoader.h"
#include "resource.h"
#include <iostream>
#include "structures.h"
/*
This could be a drawable game object...
*/
using namespace DirectX;
class Background
{
public:
Background();
~Background();
void release();
virtual HRESULT initMesh(ID3D11Device* pd3dDevice);
void draw(ID3D11Device* pd3dDevice, ID3D11DeviceContext* pContext);
ID3D11Buffer* getVertexBuffer() { return m_pVertexBuffer; }
ID3D11Buffer* getIndexBuffer() { return m_pIndexBuffer; }
ID3D11ShaderResourceView** getTextureResourceView() { return &m_pTextureResourceView; }
XMFLOAT4X4* getTransform() { return &m_World; }
ID3D11SamplerState** getTextureSamplerState() { return &m_pSamplerLinear; }
protected:
void depthTest(const bool isOn, ID3D11Device* pd3dDevice, ID3D11DeviceContext* pContext);
private:
XMFLOAT4X4 m_World;
ID3D11Buffer* m_pVertexBuffer;
ID3D11Buffer* m_pIndexBuffer;
ID3D11ShaderResourceView* m_pTextureResourceView;
ID3D11SamplerState * m_pSamplerLinear;
};