61 lines
1.2 KiB
C++
61 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <glm/glm.hpp>
|
|
#include "Renderable.h"
|
|
#include "PoseableBatch.h"
|
|
#include "VertexFragmentShaderProgram.h"
|
|
|
|
namespace charcoal
|
|
{
|
|
namespace builtin
|
|
{
|
|
using namespace glm;
|
|
|
|
typedef vec3 Position;
|
|
typedef vec3 Normal;
|
|
typedef vec4 ColorRGBA;
|
|
typedef vec3 ColorRGB;
|
|
typedef vec2 UV;
|
|
|
|
typedef unsigned int Index;
|
|
|
|
// Generic Vertices
|
|
|
|
struct PVertex
|
|
{
|
|
void set_position(const Position& position) { this->position = position; }
|
|
|
|
Position position;
|
|
};
|
|
|
|
struct PNVertex
|
|
{
|
|
void set_position(const Position& position) { this->position = position; }
|
|
void set_normal(const Normal& normal) { this->normal = normal; }
|
|
|
|
Position position;
|
|
Normal normal;
|
|
};
|
|
|
|
// Other Data Types
|
|
|
|
struct Light
|
|
{
|
|
Light(const ColorRGB& ambient) : ambient(ambient) {}
|
|
|
|
ColorRGB ambient;
|
|
};
|
|
|
|
// typedefs for builtin types
|
|
|
|
typedef PVertex BasicVertex;
|
|
typedef Index BasicIndex;
|
|
typedef Renderable<BasicVertex, BasicIndex> BasicRenderable;
|
|
typedef PoseableBatch<BasicVertex, BasicIndex> BasicBatch;
|
|
|
|
typedef PNVertex LitVertex;
|
|
typedef Index LitIndex;
|
|
typedef Renderable<LitVertex, LitIndex> LitRenderable;
|
|
typedef PoseableBatch<LitVertex, LitIndex> LitBatch;
|
|
}
|
|
} |