textures du model
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Filename: modelclass.h
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef _MODELCLASS_H_
|
||||
#define _MODELCLASS_H_
|
||||
|
||||
@@ -12,6 +9,11 @@
|
||||
#include <directxmath.h>
|
||||
using namespace DirectX;
|
||||
|
||||
///////////////////////
|
||||
// MY CLASS INCLUDES //
|
||||
///////////////////////
|
||||
#include "textureclass.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: ModelClass
|
||||
@@ -19,10 +21,11 @@ using namespace DirectX;
|
||||
class ModelClass
|
||||
{
|
||||
private:
|
||||
|
||||
struct VertexType
|
||||
{
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT4 color;
|
||||
XMFLOAT2 texture;
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -30,20 +33,25 @@ public:
|
||||
ModelClass(const ModelClass&);
|
||||
~ModelClass();
|
||||
|
||||
bool Initialize(ID3D11Device*);
|
||||
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*);
|
||||
void Shutdown();
|
||||
void Render(ID3D11DeviceContext*);
|
||||
|
||||
int GetIndexCount();
|
||||
|
||||
ID3D11ShaderResourceView* GetTexture();
|
||||
|
||||
private:
|
||||
bool InitializeBuffers(ID3D11Device*);
|
||||
void ShutdownBuffers();
|
||||
void RenderBuffers(ID3D11DeviceContext*);
|
||||
bool LoadTexture(ID3D11Device*, ID3D11DeviceContext*, char*);
|
||||
void ReleaseTexture();
|
||||
|
||||
private:
|
||||
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
|
||||
int m_vertexCount, m_indexCount;
|
||||
TextureClass* m_Texture;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user