Tesseract-Engine/src/Componenets/Mesh.h

41 lines
762 B
C
Raw Normal View History

2024-12-25 23:58:56 +00:00
// Mesh.h
#pragma once
#include "Component.h"
2024-12-25 23:58:56 +00:00
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <yaml-cpp/yaml.h>
#include <vector>
#include <string>
#include "Engine/AssetManager.h"
2024-12-25 23:58:56 +00:00
// In MeshComponent.h
class MeshComponent : public Component
2024-12-25 23:58:56 +00:00
{
public:
std::vector<Submesh> submeshes; // List of submeshes
std::string MeshPath;
static const std::string name;
MeshComponent();
virtual const std::string& GetName() const override;
static const std::string& GetStaticName();
virtual void Update(float deltaTime) override;
// Serialization methods
virtual YAML::Node Serialize() override;
virtual void Deserialize(const YAML::Node& node) override;
// Render the mesh
void Draw(Shader* shader);
};