Minor Update - Skybox Update - V9.3.0
This commit is contained in:
30
enginecustom/src/inc/system/Skybox.h
Normal file
30
enginecustom/src/inc/system/Skybox.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
#include "d3dclass.h"
|
||||
#include "object.h"
|
||||
|
||||
class Skybox
|
||||
{
|
||||
public:
|
||||
|
||||
Skybox();
|
||||
~Skybox();
|
||||
|
||||
void Initialize(D3DClass* d3dClassRef); // Get all the required references
|
||||
|
||||
Object* ConstructSkybox();
|
||||
|
||||
|
||||
// Variables
|
||||
|
||||
std::vector<ID3D11ShaderResourceView*> textures;
|
||||
std::vector<XMMATRIX> translations;
|
||||
|
||||
private:
|
||||
|
||||
D3DClass* m_d3dClassRef; // Reference to the D3DClass instance
|
||||
Object* m_Skybox;
|
||||
|
||||
|
||||
};
|
@@ -30,8 +30,10 @@
|
||||
#include "reflectionshaderclass.h"
|
||||
#include "physics.h"
|
||||
#include "frustum.h"
|
||||
#include <fstream>
|
||||
#include "skybox.h"
|
||||
|
||||
|
||||
#include <fstream>
|
||||
#include <WICTextureLoader.h>
|
||||
#include <comdef.h> // Pour _com_error
|
||||
#include <chrono>
|
||||
@@ -167,13 +169,10 @@ private:
|
||||
bool RenderReflectionToTexture();
|
||||
bool RenderPass(const std::vector<std::reference_wrapper<std::vector<Object*>>>& RenderQueues, XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
|
||||
|
||||
void ConstructSkybox(); // Construct the skybox
|
||||
void UpdateSkyboxPosition(); // Update the skybox position
|
||||
bool RenderSkybox(XMMATRIX view, XMMATRIX projection); // Render the skybox
|
||||
void UpdateSkyboxPosition();
|
||||
|
||||
public :
|
||||
std::vector<ID3D11ShaderResourceView*> textures;
|
||||
std::vector<ID3D11ShaderResourceView*> m_SkyboxTextures;
|
||||
|
||||
private :
|
||||
|
||||
@@ -203,7 +202,6 @@ private :
|
||||
int m_screenWidth, m_screenHeight;
|
||||
CameraClass* m_Camera;
|
||||
PositionClass* m_Position;
|
||||
std::vector<XMMATRIX> m_SkyboxInitialTranslations;
|
||||
|
||||
// ------------------------------------ //
|
||||
// ------------- OBJECTS -------------- //
|
||||
|
Reference in New Issue
Block a user