Привязка текстуры к модели
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define MODEL_H
|
||||
|
||||
#include "Buffers.h"
|
||||
#include "Texture.h"
|
||||
|
||||
#include <GLM/glm.hpp>
|
||||
#include <GLM/gtc/quaternion.hpp>
|
||||
@@ -65,6 +66,7 @@ class Model : public Node
|
||||
void load_indices(GLuint* indices, GLuint count); // Загрузка индексов в буфер
|
||||
void load_texCoords(glm::vec2* texCoords, GLuint count); // Загрузка текстурных координат в буфер
|
||||
void set_index_range(size_t first_byteOffset, size_t count); // Ограничение диапазона из буфера индексов
|
||||
void set_texture(Texture& texture); // Привязка текстуры к модели
|
||||
|
||||
private:
|
||||
VAO vao;
|
||||
@@ -72,6 +74,7 @@ class Model : public Node
|
||||
BO texCoords_vbo; // буфер с текстурными координатами
|
||||
GLuint verteces_count; // Количество вершин
|
||||
size_t first_index_byteOffset, indices_count; // Сдвиг в байтах для первого и количество индексов
|
||||
Texture texture_diffuse; // Диффузная текстура
|
||||
};
|
||||
|
||||
#endif // MODEL_H
|
||||
|
||||
Reference in New Issue
Block a user