charcoal/OpenGLEngine/MeshTypes.h

35 lines
649 B
C
Raw Normal View History

#pragma once
#include <glm/glm.hpp>
#include "Renderable.h"
namespace charcoal
{
namespace builtin
{
using namespace glm;
typedef vec3 Position;
typedef vec3 Normal;
typedef vec4 Color;
typedef vec2 UV;
typedef unsigned int Index;
// Simple types that implement the interfaces
struct BasicVertex
{
BasicVertex() : BasicVertex({ 0.0f, 0.0f, 0.0f }) {}
BasicVertex(const Position& position) : position(position) {}
void set_position(const Position& position) { this->position = position; }
Position position;
};
typedef Index BasicIndex;
typedef Renderable<BasicVertex, BasicIndex> BasicRenderable;
}
}