07/include/Model.h

36 lines
1.2 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef MODEL_H
#define MODEL_H
#include "I_Model.h"
#include "Vertex.h"
// Класс модели без индексов
class Model_wo_indexes : public I_Model
{
public:
Model_wo_indexes(Vertex* vertexArray, uint32_t verteciesCount);
virtual ~Model_wo_indexes();
virtual void render(VkCommandBuffer commandBuffer);
protected:
void bindBuffers(VkCommandBuffer commandBuffer); // привязка используемых буферов данных
private:
uint32_t verteciesCount; // Количество вершин
VkBuffer vertexBuffer; // Буфер вершин
};
// Класс модели с индексами
class Model_w_indexes : public Model_wo_indexes
{
public:
Model_w_indexes(Vertex* vertexArray, uint32_t verteciesCount, uint32_t* indexArray, uint32_t indeciesCount);
virtual ~Model_w_indexes();
virtual void render(VkCommandBuffer commandBuffer);
protected:
void bindBuffers(VkCommandBuffer commandBuffer); // привязка используемых буферов данных
private:
uint32_t indeciesCount; // Количество индексов
VkBuffer indexBuffer; // Буфер индексов
};
#endif // MODEL_H