forked from vixorien/D3D11Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sky.h
37 lines (33 loc) · 1.14 KB
/
Sky.h
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
#pragma once
#include "DXCore.h"
#include <DirectXMath.h>
#include <wrl/client.h> // Used for ComPtr - a smart pointer for COM objects
#include "Mesh.h"
#include <memory>
#include "SimpleShader.h"
#include "Camera.h"
class Sky
{
public:
//giving this a default constructor since the game class wants that in its constructor
Sky();
Sky(std::shared_ptr<Mesh> mesh,
Microsoft::WRL::ComPtr<ID3D11SamplerState> sampler,
Microsoft::WRL::ComPtr<ID3D11Device> device,
std::shared_ptr<SimpleVertexShader> vertexShaderSky,
std::shared_ptr<SimplePixelShader> pixelShaderSky,
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> skyFaces
);
~Sky();
void Draw(
Microsoft::WRL::ComPtr<ID3D11DeviceContext> context,
std::shared_ptr<Camera> camera);
private:
Microsoft::WRL::ComPtr<ID3D11SamplerState> sampleState;
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> cubeMapSubresourceView;
Microsoft::WRL::ComPtr<ID3D11DepthStencilState> depthState;
Microsoft::WRL::ComPtr<ID3D11RasterizerState> rasterizerState;
std::shared_ptr<Mesh> geometryMesh;
std::shared_ptr<SimplePixelShader> pixelShader;
std::shared_ptr<SimpleVertexShader> vertexShader;
};