charcoal/OpenGLEngine/MeshTypes.h
elipzer d63f341d89 More builtin abstraction
Got the builtin basicscene to render. For some reason, it seems
like the model matrices are not working correctly. The two shapes
that are supposed to be rendering on screen are not moving around
as they should be.
2018-09-13 19:21:34 -04:00

35 lines
649 B
C++

#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;
}
}