Tramway SDK
Classes | Namespaces | Typedefs | Enumerations | Functions
render.h File Reference
#include <vector>
#include <render/animation.h>

Go to the source code of this file.

Classes

struct  tram::Render::vertexarray_t
 
struct  tram::Render::indexarray_t
 
struct  tram::Render::drawlistentry_t
 
struct  tram::Render::texturehandle_t
 
struct  tram::Render::light_t
 

Namespaces

namespace  tram
 
namespace  tram::Render
 
namespace  tram::Render::API
 

Typedefs

typedef vec3 tram::Render::color_t
 
typedef uint32_t tram::Render::layer_t
 
typedef uint32_t tram::Render::vertexformat_t
 
typedef uint32_t tram::Render::materialtype_t
 

Enumerations

enum  tram::Render::VertexFormats : vertexformat_t {
  tram::Render::VERTEX_STATIC , tram::Render::VERTEX_DYNAMIC , tram::Render::VERTEX_SPRITE , tram::Render::VERTEX_LINE ,
  tram::Render::VERTEX_LAST
}
 
enum  tram::Render::MaterialTypes : materialtype_t {
  tram::Render::MATERIAL_TEXTURE , tram::Render::MATERIAL_TEXTURE_ALPHA , tram::Render::MATERIAL_LIGHTMAP , tram::Render::MATERIAL_MSDF ,
  tram::Render::MATERIAL_GLYPH , tram::Render::MATERIAL_WATER , tram::Render::MATERIAL_FLAT_COLOR , tram::Render::MATERIAL_LAST
}
 
enum  tram::Render::MaterialFilter { tram::Render::FILTER_NEAREST , tram::Render::FILTER_LINEAR }
 

Functions

void tram::Render::Init ()
 Initializes the rendering system. More...
 
void tram::Render::Render ()
 Renders a single frame. More...
 
void tram::Render::Project (const vec3 &point, vec3 &result, layer_t layer)
 
vec3 tram::Render::ProjectInverse (vec3 point, layer_t layer)
 
void tram::Render::SetSunDirection (color_t direction, layer_t layer)
 Sets the sun direction. More...
 
void tram::Render::SetSunColor (color_t color, layer_t layer)
 Sets the sun color. More...
 
void tram::Render::SetAmbientColor (color_t color, layer_t layer)
 Sets the ambient color. More...
 
void tram::Render::SetScreenSize (float width, float height)
 
void tram::Render::SetOrthoRatio (float ratio, layer_t layer)
 
void tram::Render::SetViewFov (float fov, layer_t layer)
 
float tram::Render::GetViewFov (layer_t layer)
 
void tram::Render::SetViewDistance (float dist, layer_t layer)
 
float tram::Render::GetViewDistance (layer_t layer)
 
void tram::Render::SetViewPosition (vec3 position, layer_t layer)
 Sets the view position. More...
 
void tram::Render::SetViewRotation (quat rotation, layer_t layer)
 Sets the view rotation. More...
 
vec3 tram::Render::GetViewPosition (layer_t layer)
 Returns the view position for a given layer. More...
 
quat tram::Render::GetViewRotation (layer_t layer)
 Returns the view rotation for a given layer. More...
 
void tram::Render::AddLine (vec3 from, vec3 to, vec3 color)
 
void tram::Render::AddLineMarker (vec3 location, vec3 color)
 
void tram::Render::AddLineAABB (vec3 min, vec3 max, vec3 center, quat rotation, vec3 color)
 
void tram::Render::AddSphere (vec3 pos, float radius, color_t color)
 
void tram::Render::AddCylinder (vec3 pos, float height, float radius, color_t color)
 
void tram::Render::AddCube (vec3 pos, float height, float radius, color_t color)
 
const color_t tram::Render::COLOR_WHITE (1.0f, 1.0f, 1.0f)
 
const color_t tram::Render::COLOR_RED (1.0f, 0.0f, 0.0f)
 
const color_t tram::Render::COLOR_GREEN (0.0f, 1.0f, 0.0f)
 
const color_t tram::Render::COLOR_BLUE (0.0f, 0.0f, 1.0f)
 
const color_t tram::Render::COLOR_YELLOW (1.0f, 1.0f, 0.0f)
 
const color_t tram::Render::COLOR_PINK (1.0f, 0.0f, 1.0f)
 
const color_t tram::Render::COLOR_CYAN (0.0f, 1.0f, 1.0f)
 
const color_t tram::Render::COLOR_BLACK (0.0f, 0.0f, 0.0f)
 
const color_t tram::Render::COLOR_GRAY (0.3f, 0.3f, 0.3f)
 
vertexformat_t tram::Render::RegisterVertexFormat (const char *name)
 
materialtype_t tram::Render::RegisterMaterialType (const char *name)
 
vertexformat_t tram::Render::FindVertexFormat (const char *name)
 
materialtype_t tram::Render::FindMaterialType (const char *name)
 
const char * tram::Render::GetVertexFormatName (vertexformat_t type)
 
const char * tram::Render::GetMaterialTypeName (materialtype_t type)