Tramway SDK
Classes | Namespaces | Functions | Variables
renderer.cpp File Reference
#include <render/opengl/renderer.h>
#include <render/api.h>
#include <templates/octree.h>
#include <GL/gl.h>
#include <GLES3/gl3.h>
#include <glm/gtc/type_ptr.hpp>

Classes

struct  tram::Render::API::ShaderUniformMatrices
 
struct  tram::Render::API::ShaderUniformModelMatrices
 
struct  tram::Render::API::LayerParameters
 
class  tram::Render::API::ShaderBuffer
 

Namespaces

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

Functions

Octree< uint32_t > tram::Render::API::light_tree ("light tree", 200)
 
std::vector< uint32_t > tram::Render::API::light_tree_ids (200)
 
uint32_t tram::Render::API::MakeUniformBuffer (const char *name, uint32_t binding, uint32_t initial_size)
 
void tram::Render::API::UploadUniformBuffer (uint32_t handle, uint32_t data_size, void *data)
 
void tram::Render::API::SetLightingParameters (vec3 sun_direction, vec3 sun_color, vec3 ambient_color, layer_t layer)
 
void tram::Render::API::SetViewParameters (vec3 position, quat rotation, layer_t layer)
 
void tram::Render::API::SetScreenSize (float width, float height)
 
void tram::Render::API::SetScreenClear (vec3 clear_color, bool clear)
 
void tram::Render::API::RenderFrame ()
 
drawlistentry_t tram::Render::API::InsertDrawListEntry ()
 
void tram::Render::API::RemoveDrawListEntry (drawlistentry_t entry)
 
uint32_t tram::Render::API::GetFlags (drawlistentry_t entry)
 
void tram::Render::API::SetFlags (drawlistentry_t entry, uint32_t flags)
 
void tram::Render::API::SetLayer (drawlistentry_t entry, layer_t layer)
 
void tram::Render::API::SetPose (drawlistentry_t entry, Pose *pose)
 
void tram::Render::API::SetLightmap (drawlistentry_t entry, texturehandle_t lightmap)
 
void tram::Render::API::SetDrawListColors (drawlistentry_t entry, size_t count, vec4 *color)
 
void tram::Render::API::SetDrawListSpecularities (drawlistentry_t entry, size_t count, float *weights, float *exponents, float *transparencies)
 
void tram::Render::API::SetDrawListTextureOffsets (drawlistentry_t entry, size_t count, vec4 *offset)
 
void tram::Render::API::SetLights (drawlistentry_t entry, light_t *lights)
 
void tram::Render::API::SetMatrix (drawlistentry_t entry, const mat4 &matrix)
 
void tram::Render::API::SetDrawListVertexArray (drawlistentry_t entry, vertexarray_t vertex_array_handle)
 
void tram::Render::API::SetDrawListIndexArray (drawlistentry_t entry, indexarray_t index_array_handle)
 
void tram::Render::API::SetDrawListIndexRange (drawlistentry_t entry, uint32_t index_offset, uint32_t index_length)
 
void tram::Render::API::SetDrawListShader (drawlistentry_t entry, vertexformat_t vertex_format, materialtype_t material_type)
 
void tram::Render::API::SetDrawListTextures (drawlistentry_t entry, size_t texture_count, texturehandle_t *textures)
 
light_t tram::Render::API::MakeLight ()
 
void tram::Render::API::DeleteLight (light_t light)
 
void tram::Render::API::SetLightParameters (light_t light, vec3 location, vec3 color, float distance, vec3 direction, float exponent)
 
texturehandle_t tram::Render::API::CreateTexture (ColorMode color_mode, TextureFilter texture_filter, uint32_t width, uint32_t height, void *data)
 
void tram::Render::API::CreateIndexedVertexArray (VertexDefinition vertex_format, vertexarray_t &vertex_array, indexarray_t &index_array, size_t vertex_size, void *vertex_data, size_t index_size, void *index_data)
 
void tram::Render::API::CreateVertexArray (VertexDefinition vertex_format, vertexarray_t &vertex_array)
 
void tram::Render::API::UpdateVertexArray (vertexarray_t &vertex_buffer, size_t data_size, void *data)
 
void tram::Render::API::SetViewMatrix (const mat4 &matrix, layer_t layer)
 
void tram::Render::API::SetProjectionMatrix (const mat4 &matrix, layer_t layer)
 
void tram::Render::API::GetScreen (char *buffer, int w, int h)
 
void tram::Render::API::Init ()
 
ContextType tram::Render::API::GetContext ()
 
uint32_t tram::Render::API::GetMaxIndexRangeLength ()
 
void tram::Render::API::SetDevice (void *)
 

Variables

ShaderUniformMatrices tram::Render::API::matrices
 
ShaderUniformModelMatrices tram::Render::API::modelMatrices
 
const uint32_t tram::Render::API::matrix_uniform_binding = 0
 
const uint32_t tram::Render::API::model_matrix_uniform_binding = 1
 
const uint32_t tram::Render::API::light_uniform_binding = 2
 
const uint32_t tram::Render::API::bone_uniform_binding = 3
 
uint32_t tram::Render::API::matrix_uniform_buffer
 
uint32_t tram::Render::API::model_matrix_uniform_buffer
 
uint32_t tram::Render::API::light_uniform_buffer
 
uint32_t tram::Render::API::bone_uniform_buffer
 
Pool< D3DDrawListEntry > tram::Render::API::draw_list ("render list", 500, false)
 
Pool< D3DLight > tram::Render::API::light_list ("light list", 200, false)