C++ Неизвестный спецификатор переопределния
Изучаю OpenGL и при попытке добавить источник света выводит ошибку "Неизвестный спецификатор переопределния", хотя в MSVC определяет класс Model
Light.hpp:
#pragma once
#include "Model.hpp"
#include <glm/glm.hpp>
struct Light {
Model model;
glm::vec3 pos;
};
Model.hpp:
#pragma once
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "Light.hpp"
#include <glm/glm.hpp>
#include <vector>
class Model {
public:
void create(GLfloat vertices[], int size, GLuint indices[], int iSize, int verticesCount);
void loadFromFile(const char* path);
void draw();
void addTexture(GLuint _texture) { textures.push_back(_texture); }
GLuint getShader() { return shader; }
void setColor(glm::vec3 _color) { color = _color; }
void setColor(float r, float g, float b) { color = glm::vec3(r, g, b); }
void setModelMatrix(glm::mat4 mat) { modelMatrix = mat; }
void setShader(GLuint _shader) { shader = _shader; }
void setLight(Light _light) { light = _light; }
private:
GLuint VAO, EBO;
GLuint shader;
std::vector<GLuint> textures = std::vector<GLuint>();
glm::mat4 modelMatrix = glm::mat4(1.0);
glm::vec3 color = glm::vec3(1.0f);
int verticesCount;
Light light = Light();
};