Merge branch 'main' into la-fusion-de-l'enfer
This commit is contained in:
@@ -8,7 +8,9 @@
|
||||
#include <d3d11.h>
|
||||
#include <directxmath.h>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
using namespace DirectX;
|
||||
using namespace std;
|
||||
|
||||
@@ -39,35 +41,50 @@ protected:
|
||||
float nx, ny, nz;
|
||||
};
|
||||
|
||||
struct Vertex {
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
struct Texture {
|
||||
float u, v;
|
||||
};
|
||||
|
||||
struct Normal {
|
||||
float nx, ny, nz;
|
||||
};
|
||||
|
||||
struct Face {
|
||||
int v1, v2, v3;
|
||||
int t1, t2, t3;
|
||||
int n1, n2, n3;
|
||||
};
|
||||
|
||||
public:
|
||||
ModelClass();
|
||||
ModelClass(const ModelClass&);
|
||||
~ModelClass();
|
||||
|
||||
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, char*);
|
||||
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, char*, char*);
|
||||
void Shutdown();
|
||||
void Render(ID3D11DeviceContext*);
|
||||
|
||||
int GetIndexCount();
|
||||
|
||||
ID3D11ShaderResourceView* GetTexture();
|
||||
ID3D11ShaderResourceView* GetTexture(int);
|
||||
|
||||
private:
|
||||
bool InitializeBuffers(ID3D11Device*);
|
||||
void ShutdownBuffers();
|
||||
void RenderBuffers(ID3D11DeviceContext*);
|
||||
bool LoadTexture(ID3D11Device*, ID3D11DeviceContext*, char*);
|
||||
void ReleaseTexture();
|
||||
bool LoadTextures(ID3D11Device*, ID3D11DeviceContext*, char*, char*);
|
||||
void ReleaseTextures();
|
||||
|
||||
bool LoadModel(char*);
|
||||
void ReleaseModel();
|
||||
|
||||
private:
|
||||
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
|
||||
TextureClass* m_Texture;
|
||||
|
||||
protected:
|
||||
int m_vertexCount, m_indexCount;
|
||||
TextureClass* m_Textures;
|
||||
ModelType* m_model;
|
||||
int m_vertexCount, m_indexCount;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user