#ifndef MESH_RENDER_ENTITY_H
#define MESH_RENDER_ENTITY_H

#include "renderable.h"
#include "resources.h"
#include "scene_node_entity.h"
#include "transformable.h"
#include "utils/drop.h"
#include "utils/mirror.h"

typedef struct MeshRenderEntity {
    SceneNode *node;
    Transformable transform;
    ModelResource model;
    ShaderResource shader;
} MeshRenderEntity;

extern SceneNode *CreateMeshRenderEntity(char const *resource_path);
extern void DestroyMeshRenderEntity(MeshRenderEntity *self);

extern void MeshRenderEntityEnterTree(MeshRenderEntity *self);
extern void MeshRenderEntityExitTree(MeshRenderEntity *self);

extern void MeshRenderEntityDraw(MeshRenderEntity *self);

DECL_REFLECT(MeshRenderEntity);
decl_typeclass_impl(Drop, MeshRenderEntity);
decl_typeclass_impl(SceneNodeEntity, MeshRenderEntity);
decl_typeclass_impl(Renderable, MeshRenderEntity);

#endif // !MESH_RENDER_ENTITY_H
