Tramway SDK v0.1.1
Classes | Typedefs | Enumerations | Functions | Variables
tram::Render::API Namespace Reference

Rendering backend API. More...

Classes

struct  ClipPoint
 
struct  ClipTriangle
 
struct  ColorVertex
 
struct  D3DDrawListEntry
 
struct  D3DLight
 
struct  DynamicVertex
 
struct  FFPHelper
 
class  FragmentShader
 
struct  FVFHelper
 
struct  GLDrawListEntry
 
struct  GLLight
 
struct  GLMaterial
 
struct  LayerParameters
 
struct  LineVertex
 
class  LinkedShader
 
struct  Point2D
 
struct  Scanline
 
struct  ScanlineBuffer
 
class  ShaderBuffer
 
struct  ShaderUniformMatrices
 
struct  ShaderUniformModelMatrices
 
struct  StaticVertex
 
struct  SWDrawListEntry
 
struct  SWIndexArray
 
struct  SWLight
 
struct  SWTexture
 
struct  SWVertexArray
 
struct  VertexBufferMetadata
 
class  VertexShader
 

Typedefs

typedef uint32_t shaderflags_t
 

Enumerations

enum  ContextType {
  CONTEXT_OPENGL , CONTEXT_WEBGL , CONTEXT_DIRECT3D , CONTEXT_SOFTWARE ,
  CONTEXT_NONE
}
 
enum  ShaderFlag : shaderflags_t { SHADER_NONE = 0 , SHADER_SPECULAR = 1 , SHADER_LIGHTMAP = 2 }
 
enum  SWTextureMode { SW_NEAREST , SW_BLENDED }
 
enum  SWVertexType { SW_STATIC_LIGHTMAPPED , SW_DYNAMIC_BLENDED , SW_STATIC_COLORED , SW_SPRITE }
 

Functions

void Init ()
 
void RenderFrame ()
 
void SetScreenSize (float width, float height)
 
void SetScreenClear (vec3 clear_color, bool clear)
 
void SetLightingParameters (vec3 sun_direction, vec3 sun_color, vec3 ambient_color, layer_t layer)
 
void SetViewMatrix (const mat4 &matrix, layer_t layer)
 
void SetProjectionMatrix (const mat4 &matrix, layer_t layer)
 
void GetScreen (char *buffer, int w, int h)
 
void RegisterShader (vertexformat_t format, materialtype_t type, const char *vertex_shader, const char *fragment_shader)
 
drawlistentry_t InsertDrawListEntry ()
 
void RemoveDrawListEntry (drawlistentry_t entry)
 
uint32_t GetFlags (drawlistentry_t entry)
 
void SetFlags (drawlistentry_t entry, uint32_t flags)
 
void SetLayer (drawlistentry_t entry, layer_t layer)
 
void SetPose (drawlistentry_t entry, Pose *pose)
 
void SetLightmap (drawlistentry_t entry, texturehandle_t lightmap)
 
void SetEnvironmentMap (drawlistentry_t entry, texturehandle_t environmentmap)
 
void SetSphericalHarmonic (drawlistentry_t entry, sphericalharmonic_t harmonic)
 
void SetLights (drawlistentry_t entry, light_t *lights)
 
void SetMatrix (drawlistentry_t entry, const mat4 &matrix)
 
void SetFadeDistance (drawlistentry_t entry, float near, float far)
 
void SetDrawListVertexArray (drawlistentry_t entry, vertexarray_t vertex_array_handle)
 
void SetDrawListIndexArray (drawlistentry_t entry, indexarray_t index_array_handle)
 
void SetDrawListIndexRange (drawlistentry_t entry, uint32_t index_offset, uint32_t index_length)
 
void SetDrawListSpriteArray (drawlistentry_t entry, spritearray_t sprite_array_handle)
 
bool SetDrawListShader (drawlistentry_t entry, vertexformat_t vertex_format, materialtype_t material_type)
 
void SetDrawListMaterials (drawlistentry_t entry, size_t material_count, material_t *materials)
 
void SetDrawListColors (drawlistentry_t entry, size_t count, vec4 *color)
 
void SetDrawListTextureOffsets (drawlistentry_t entry, size_t count, vec4 *offset)
 
void SetDrawListAABB (drawlistentry_t entry, vec3 min, vec3 max)
 
void 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 CreateVertexArray (VertexDefinition vertex_format, vertexarray_t &vertex_array)
 
void UpdateVertexArray (vertexarray_t &vertex_buffer, size_t data_size, void *data)
 
texturehandle_t CreateTexture (ColorMode color_mode, TextureFilter texture_filter, uint32_t width, uint32_t height, void *data)
 
spritearray_t CreateSpriteArray ()
 
void UpdateSpriteArray (spritearray_t array, size_t data_size, void *data)
 
light_t MakeLight ()
 
void DeleteLight (light_t light)
 
void SetLightParameters (light_t light, vec3 location, vec3 color, float distance, vec3 direction, float exponent)
 
material_t MakeMaterial ()
 
void DeleteMaterial (material_t material)
 
void SetMaterialTexture (material_t material, texturehandle_t texture)
 
void SetMaterialColor (material_t material, vec4 color)
 
void SetMaterialSpecularWeight (material_t material, float weight)
 
void SetMaterialSpecularExponent (material_t material, float exponent)
 
void SetMaterialSpecularTransparency (material_t material, float transparency)
 
void SetMaterialReflectivity (material_t material, float reflectivity)
 
ContextType GetContext ()
 
uint32_t GetMaxIndexRangeLength ()
 
void SetDevice (void *)
 
bool IsDebugMode ()
 
void SetDebugMode (bool)
 
std::vector< uint32_t > light_tree_ids (200)
 
void SetDrawListSpecularities (drawlistentry_t entry, size_t count, float *weights, float *exponents, float *transparencies)
 
void SetDrawListTextures (drawlistentry_t entry, size_t texture_count, texturehandle_t *textures)
 
FVFHelper VertexDefinitionToFVF (VertexDefinition vertex_format)
 
void PackVertexBuffer (vertexarray_t &vertex_array, VertexDefinition vertex_format, FVFHelper helper, size_t vertex_count, void *vertex_data)
 
uint32_t MakeUniformBuffer (const char *name, uint32_t binding, uint32_t initial_size)
 
void UploadUniformBuffer (uint32_t handle, uint32_t data_size, void *data)
 
void SetViewParameters (vec3 position, quat rotation, uint32_t layer)
 
void BindUniformBlock (const char *name, uint32_t binding)
 
uint32_t FindShader (vertexformat_t format, materialtype_t type, shaderflags_t mask)
 
uint32_t GetAnyShader (shaderflags_t mask)
 
void CompileShaders ()
 
uint16_t IntColor (vec3 color)
 
vec3 RGBColor (uint16_t color)
 
void BlitDot (uint32_t x, uint32_t y, uint16_t color)
 
void BlitLineOctant0 (uint32_t x0, uint32_t y0, uint32_t delta_x, uint32_t delta_y, int32_t direction, uint32_t color)
 
void BlitLineOctant1 (uint32_t x0, uint32_t y0, uint32_t delta_x, uint32_t delta_y, int32_t direction, uint32_t color)
 
void BlitLine (int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint16_t color)
 
template<bool set_span_first>
void MakeSpans (int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t p0, int32_t p1, int32_t skip_first, Scanline **scanline_array)
 
void ScanlineConvertTriangle (ScanlineBuffer *scanlines, Point2D *vertices)
 
void RasterizeTriangle (ScanlineBuffer *scanlines, Point2D *vertices)
 
void RasterizeTriangleLightmapped (ScanlineBuffer *scanlines, Point2D *vertices, uint16_t color, vec2 *texture_uvs, vec2 *lightmap_uvs, SWTexture *texture, SWTexture *lightmap)
 
void RasterizeTriangleShadedTextured (ScanlineBuffer *scanlines, Point2D *vertices, vec3 *colors, vec3 *speculars, vec2 *texture_uvs, SWTexture *texture)
 
void ClipLineInClipSpace (vec4 &point0, vec4 &point1)
 
vec4 ClipSinglePointLine (vec4 *outside, vec4 *inside)
 
vec4 ClipSinglePointLineLeftPlane (vec4 outside, vec4 inside)
 
vec4 ClipSinglePointLineRightPlane (vec4 outside, vec4 inside)
 
vec4 ClipSinglePointLineBottomPlane (vec4 outside, vec4 inside)
 
vec4 ClipSinglePointLineTopPlane (vec4 outside, vec4 inside)
 
vec4 ClipSinglePointLineNearPlane (vec4 outside, vec4 inside)
 
vec4 ClipSinglePointLineFarPlane (vec4 outside, vec4 inside)
 
ClipPoint ClipSingleClipPointLineLeftPlane (ClipPoint outside, ClipPoint inside)
 
ClipPoint ClipSingleClipPointLineRightPlane (ClipPoint outside, ClipPoint inside)
 
ClipPoint ClipSingleClipPointLineBottomPlane (ClipPoint outside, ClipPoint inside)
 
ClipPoint ClipSingleClipPointLineTopPlane (ClipPoint outside, ClipPoint inside)
 
ClipPoint ClipSingleClipPointLineNearPlane (ClipPoint outside, ClipPoint inside)
 
ClipPoint ClipSingleClipPointLineFarPlane (ClipPoint outside, ClipPoint inside)
 
void PerspectiveDivision (vec4 &p)
 
void PerspectiveDivision (vec4 &p0, vec4 &p1)
 
std::pair< int32_t, int32_t > ClipSpaceToScreenSpace (const vec4 p)
 
bool PointVisible (vec4 p)
 
bool PointOutsideLeftPlane (vec4 p)
 
bool PointOutsideRightPlane (vec4 p)
 
bool PointOutsideBottomPlane (vec4 p)
 
bool PointOutsideTopPlane (vec4 p)
 
bool PointOutsideNearPlane (vec4 p)
 
bool PointOutsideFarPlane (vec4 p)
 
bool LineVisible (vec4 p0, vec4 p1)
 
bool TriangleVisible (vec4 p0, vec4 p1, vec4 p2)
 
void ClipRenderLine (vec4 p0, vec4 p1, uint16_t color)
 
size_t ClipTriangleList (ClipTriangle *triangles)
 
void ParseFormat (vertexarray_t &vertex_array, VertexDefinition vertex_format)
 
void PackVertices (vertexarray_t &vertex_array, void *data, size_t count)
 

Variables

Pool< D3DDrawListEntrydraw_list ("render list", 500, false)
 
Pool< D3DLightlight_list ("light list", 200, false)
 
Octree< uint32_t > light_tree
 
Pool< VertexBufferMetadatavertex_buffer_metadata ("vertex buffer metadata", 500, false)
 
vec3 screen_clear_color = {0.2f, 0.3f, 0.3f}
 
bool clear_screen = true
 
const DWORD STATIC_VERTEX_FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX2
 
const DWORD DYNAMIC_VERTEX_FVF = D3DFVF_XYZB4 | D3DFVF_LASTBETA_UBYTE4 | D3DFVF_NORMAL | D3DFVF_TEX1
 
const DWORD LINE_VERTEX_FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE
 
ShaderUniformMatrices matrices
 
ShaderUniformModelMatrices modelMatrices
 
const uint32_t matrix_uniform_binding = 0
 
const uint32_t model_matrix_uniform_binding = 1
 
const uint32_t light_uniform_binding = 2
 
const uint32_t bone_uniform_binding = 3
 
uint32_t matrix_uniform_buffer
 
uint32_t model_matrix_uniform_buffer
 
uint32_t light_uniform_buffer
 
uint32_t bone_uniform_buffer
 
const char * shader_path = "shaders/gles3/"
 
Pool< SWTexturetexture_list ("texture list", 200, false)
 
Pool< SWVertexArrayvertex_arrays ("vertex_arrays list", 200, false)
 
Pool< SWIndexArrayindex_arrays ("index_arrays list", 200, false)
 
ScanlineBufferscanlines = new ScanlineBuffer
 

Detailed Description

Rendering backend API.

Typedef Documentation

◆ shaderflags_t

Enumeration Type Documentation

◆ ContextType

Enumerator
CONTEXT_OPENGL 
CONTEXT_WEBGL 
CONTEXT_DIRECT3D 
CONTEXT_SOFTWARE 
CONTEXT_NONE 

◆ ShaderFlag

Enumerator
SHADER_NONE 
SHADER_SPECULAR 
SHADER_LIGHTMAP 

◆ SWTextureMode

Enumerator
SW_NEAREST 
SW_BLENDED 

◆ SWVertexType

Enumerator
SW_STATIC_LIGHTMAPPED 
SW_DYNAMIC_BLENDED 
SW_STATIC_COLORED 
SW_SPRITE 

Function Documentation

◆ BindUniformBlock()

void tram::Render::API::BindUniformBlock ( const char *  name,
uint32_t  binding 
)

◆ BlitDot()

void tram::Render::API::BlitDot ( uint32_t  x,
uint32_t  y,
uint16_t  color 
)

◆ BlitLine()

void tram::Render::API::BlitLine ( int32_t  x0,
int32_t  y0,
int32_t  x1,
int32_t  y1,
uint16_t  color 
)

◆ BlitLineOctant0()

void tram::Render::API::BlitLineOctant0 ( uint32_t  x0,
uint32_t  y0,
uint32_t  delta_x,
uint32_t  delta_y,
int32_t  direction,
uint32_t  color 
)

◆ BlitLineOctant1()

void tram::Render::API::BlitLineOctant1 ( uint32_t  x0,
uint32_t  y0,
uint32_t  delta_x,
uint32_t  delta_y,
int32_t  direction,
uint32_t  color 
)

◆ ClipLineInClipSpace()

void tram::Render::API::ClipLineInClipSpace ( vec4 point0,
vec4 point1 
)

◆ ClipRenderLine()

void tram::Render::API::ClipRenderLine ( vec4  p0,
vec4  p1,
uint16_t  color 
)

◆ ClipSingleClipPointLineBottomPlane()

ClipPoint tram::Render::API::ClipSingleClipPointLineBottomPlane ( ClipPoint  outside,
ClipPoint  inside 
)

◆ ClipSingleClipPointLineFarPlane()

ClipPoint tram::Render::API::ClipSingleClipPointLineFarPlane ( ClipPoint  outside,
ClipPoint  inside 
)

◆ ClipSingleClipPointLineLeftPlane()

ClipPoint tram::Render::API::ClipSingleClipPointLineLeftPlane ( ClipPoint  outside,
ClipPoint  inside 
)

◆ ClipSingleClipPointLineNearPlane()

ClipPoint tram::Render::API::ClipSingleClipPointLineNearPlane ( ClipPoint  outside,
ClipPoint  inside 
)

◆ ClipSingleClipPointLineRightPlane()

ClipPoint tram::Render::API::ClipSingleClipPointLineRightPlane ( ClipPoint  outside,
ClipPoint  inside 
)

◆ ClipSingleClipPointLineTopPlane()

ClipPoint tram::Render::API::ClipSingleClipPointLineTopPlane ( ClipPoint  outside,
ClipPoint  inside 
)

◆ ClipSinglePointLine()

vec4 tram::Render::API::ClipSinglePointLine ( vec4 outside,
vec4 inside 
)

◆ ClipSinglePointLineBottomPlane()

vec4 tram::Render::API::ClipSinglePointLineBottomPlane ( vec4  outside,
vec4  inside 
)

◆ ClipSinglePointLineFarPlane()

vec4 tram::Render::API::ClipSinglePointLineFarPlane ( vec4  outside,
vec4  inside 
)

◆ ClipSinglePointLineLeftPlane()

vec4 tram::Render::API::ClipSinglePointLineLeftPlane ( vec4  outside,
vec4  inside 
)

◆ ClipSinglePointLineNearPlane()

vec4 tram::Render::API::ClipSinglePointLineNearPlane ( vec4  outside,
vec4  inside 
)

◆ ClipSinglePointLineRightPlane()

vec4 tram::Render::API::ClipSinglePointLineRightPlane ( vec4  outside,
vec4  inside 
)

◆ ClipSinglePointLineTopPlane()

vec4 tram::Render::API::ClipSinglePointLineTopPlane ( vec4  outside,
vec4  inside 
)

◆ ClipSpaceToScreenSpace()

std::pair< int32_t, int32_t > tram::Render::API::ClipSpaceToScreenSpace ( const vec4  p)

◆ ClipTriangleList()

size_t tram::Render::API::ClipTriangleList ( ClipTriangle triangles)

◆ CompileShaders()

void tram::Render::API::CompileShaders ( )

◆ CreateIndexedVertexArray()

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 
)

◆ CreateSpriteArray()

spritearray_t tram::Render::API::CreateSpriteArray ( )

◆ CreateTexture()

texturehandle_t tram::Render::API::CreateTexture ( ColorMode  color_mode,
TextureFilter  texture_filter,
uint32_t  width,
uint32_t  height,
void *  data 
)

◆ CreateVertexArray()

void tram::Render::API::CreateVertexArray ( VertexDefinition  vertex_format,
vertexarray_t vertex_array 
)

◆ DeleteLight()

void tram::Render::API::DeleteLight ( light_t  light)

◆ DeleteMaterial()

void tram::Render::API::DeleteMaterial ( material_t  material)

◆ FindShader()

uint32_t tram::Render::API::FindShader ( vertexformat_t  format,
materialtype_t  type,
shaderflags_t  mask 
)

◆ GetAnyShader()

uint32_t tram::Render::API::GetAnyShader ( shaderflags_t  mask)

◆ GetContext()

ContextType tram::Render::API::GetContext ( )

◆ GetFlags()

uint32_t tram::Render::API::GetFlags ( drawlistentry_t  entry)

◆ GetMaxIndexRangeLength()

uint32_t tram::Render::API::GetMaxIndexRangeLength ( )

◆ GetScreen()

void tram::Render::API::GetScreen ( char *  buffer,
int  w,
int  h 
)

◆ Init()

void tram::Render::API::Init ( )

◆ InsertDrawListEntry()

drawlistentry_t tram::Render::API::InsertDrawListEntry ( )

◆ IntColor()

uint16_t tram::Render::API::IntColor ( vec3  color)

◆ IsDebugMode()

bool tram::Render::API::IsDebugMode ( )

◆ light_tree_ids()

std::vector< uint32_t > tram::Render::API::light_tree_ids ( 200  )

◆ LineVisible()

bool tram::Render::API::LineVisible ( vec4  p0,
vec4  p1 
)

◆ MakeLight()

light_t tram::Render::API::MakeLight ( )

◆ MakeMaterial()

material_t tram::Render::API::MakeMaterial ( )

◆ MakeSpans()

template<bool set_span_first>
void tram::Render::API::MakeSpans ( int32_t  x0,
int32_t  y0,
int32_t  x1,
int32_t  y1,
int32_t  p0,
int32_t  p1,
int32_t  skip_first,
Scanline **  scanline_array 
)

◆ MakeUniformBuffer()

uint32_t tram::Render::API::MakeUniformBuffer ( const char *  name,
uint32_t  binding,
uint32_t  initial_size 
)

◆ PackVertexBuffer()

void tram::Render::API::PackVertexBuffer ( vertexarray_t vertex_array,
VertexDefinition  vertex_format,
FVFHelper  helper,
size_t  vertex_count,
void *  vertex_data 
)

◆ PackVertices()

void tram::Render::API::PackVertices ( vertexarray_t vertex_array,
void *  data,
size_t  count 
)

◆ ParseFormat()

void tram::Render::API::ParseFormat ( vertexarray_t vertex_array,
VertexDefinition  vertex_format 
)

◆ PerspectiveDivision() [1/2]

void tram::Render::API::PerspectiveDivision ( vec4 p)

◆ PerspectiveDivision() [2/2]

void tram::Render::API::PerspectiveDivision ( vec4 p0,
vec4 p1 
)

◆ PointOutsideBottomPlane()

bool tram::Render::API::PointOutsideBottomPlane ( vec4  p)

◆ PointOutsideFarPlane()

bool tram::Render::API::PointOutsideFarPlane ( vec4  p)

◆ PointOutsideLeftPlane()

bool tram::Render::API::PointOutsideLeftPlane ( vec4  p)

◆ PointOutsideNearPlane()

bool tram::Render::API::PointOutsideNearPlane ( vec4  p)

◆ PointOutsideRightPlane()

bool tram::Render::API::PointOutsideRightPlane ( vec4  p)

◆ PointOutsideTopPlane()

bool tram::Render::API::PointOutsideTopPlane ( vec4  p)

◆ PointVisible()

bool tram::Render::API::PointVisible ( vec4  p)

◆ RasterizeTriangle()

void tram::Render::API::RasterizeTriangle ( ScanlineBuffer scanlines,
Point2D vertices 
)

◆ RasterizeTriangleLightmapped()

void tram::Render::API::RasterizeTriangleLightmapped ( ScanlineBuffer scanlines,
Point2D vertices,
uint16_t  color,
vec2 texture_uvs,
vec2 lightmap_uvs,
SWTexture texture,
SWTexture lightmap 
)

◆ RasterizeTriangleShadedTextured()

void tram::Render::API::RasterizeTriangleShadedTextured ( ScanlineBuffer scanlines,
Point2D vertices,
vec3 colors,
vec3 speculars,
vec2 texture_uvs,
SWTexture texture 
)

◆ RegisterShader()

void tram::Render::API::RegisterShader ( vertexformat_t  format,
materialtype_t  type,
const char *  vertex_shader,
const char *  fragment_shader 
)

◆ RemoveDrawListEntry()

void tram::Render::API::RemoveDrawListEntry ( drawlistentry_t  entry)

◆ RenderFrame()

void tram::Render::API::RenderFrame ( )

◆ RGBColor()

vec3 tram::Render::API::RGBColor ( uint16_t  color)

◆ ScanlineConvertTriangle()

void tram::Render::API::ScanlineConvertTriangle ( ScanlineBuffer scanlines,
Point2D vertices 
)

◆ SetDebugMode()

void tram::Render::API::SetDebugMode ( bool  mode)

◆ SetDevice()

void tram::Render::API::SetDevice ( void *  new_device)

◆ SetDrawListAABB()

void tram::Render::API::SetDrawListAABB ( drawlistentry_t  entry,
vec3  min,
vec3  max 
)

◆ SetDrawListColors()

void tram::Render::API::SetDrawListColors ( drawlistentry_t  entry,
size_t  count,
vec4 color 
)

◆ SetDrawListIndexArray()

void tram::Render::API::SetDrawListIndexArray ( drawlistentry_t  entry,
indexarray_t  index_array_handle 
)

◆ SetDrawListIndexRange()

void tram::Render::API::SetDrawListIndexRange ( drawlistentry_t  entry,
uint32_t  index_offset,
uint32_t  index_length 
)

◆ SetDrawListMaterials()

void tram::Render::API::SetDrawListMaterials ( drawlistentry_t  entry,
size_t  material_count,
material_t materials 
)

◆ SetDrawListShader()

void tram::Render::API::SetDrawListShader ( drawlistentry_t  entry,
vertexformat_t  vertex_format,
materialtype_t  material_type 
)

◆ SetDrawListSpecularities()

void tram::Render::API::SetDrawListSpecularities ( drawlistentry_t  entry,
size_t  count,
float *  weights,
float *  exponents,
float *  transparencies 
)

◆ SetDrawListSpriteArray()

void tram::Render::API::SetDrawListSpriteArray ( drawlistentry_t  entry,
spritearray_t  sprite_array_handle 
)

◆ SetDrawListTextureOffsets()

void tram::Render::API::SetDrawListTextureOffsets ( drawlistentry_t  entry,
size_t  count,
vec4 offset 
)

◆ SetDrawListTextures()

void tram::Render::API::SetDrawListTextures ( drawlistentry_t  entry,
size_t  texture_count,
texturehandle_t textures 
)

◆ SetDrawListVertexArray()

void tram::Render::API::SetDrawListVertexArray ( drawlistentry_t  entry,
vertexarray_t  vertex_array_handle 
)

◆ SetEnvironmentMap()

void tram::Render::API::SetEnvironmentMap ( drawlistentry_t  entry,
texturehandle_t  environmentmap 
)

◆ SetFadeDistance()

void tram::Render::API::SetFadeDistance ( drawlistentry_t  entry,
float  near,
float  far 
)

◆ SetFlags()

void tram::Render::API::SetFlags ( drawlistentry_t  entry,
uint32_t  flags 
)

◆ SetLayer()

void tram::Render::API::SetLayer ( drawlistentry_t  entry,
layer_t  layer 
)

◆ SetLightingParameters()

void tram::Render::API::SetLightingParameters ( vec3  sun_direction,
vec3  sun_color,
vec3  ambient_color,
layer_t  layer 
)

◆ SetLightmap()

void tram::Render::API::SetLightmap ( drawlistentry_t  entry,
texturehandle_t  lightmap 
)

◆ SetLightParameters()

void tram::Render::API::SetLightParameters ( light_t  light,
vec3  location,
vec3  color,
float  distance,
vec3  direction,
float  exponent 
)

◆ SetLights()

void tram::Render::API::SetLights ( drawlistentry_t  entry,
light_t lights 
)

◆ SetMaterialColor()

void tram::Render::API::SetMaterialColor ( material_t  material,
vec4  color 
)

◆ SetMaterialReflectivity()

void tram::Render::API::SetMaterialReflectivity ( material_t  material,
float  reflectivity 
)

◆ SetMaterialSpecularExponent()

void tram::Render::API::SetMaterialSpecularExponent ( material_t  material,
float  exponent 
)

◆ SetMaterialSpecularTransparency()

void tram::Render::API::SetMaterialSpecularTransparency ( material_t  material,
float  transparency 
)

◆ SetMaterialSpecularWeight()

void tram::Render::API::SetMaterialSpecularWeight ( material_t  material,
float  weight 
)

◆ SetMaterialTexture()

void tram::Render::API::SetMaterialTexture ( material_t  material,
texturehandle_t  texture 
)

◆ SetMatrix()

void tram::Render::API::SetMatrix ( drawlistentry_t  entry,
const mat4 matrix 
)

◆ SetPose()

void tram::Render::API::SetPose ( drawlistentry_t  entry,
Pose pose 
)

◆ SetProjectionMatrix()

void tram::Render::API::SetProjectionMatrix ( const mat4 matrix,
layer_t  layer 
)

◆ SetScreenClear()

void tram::Render::API::SetScreenClear ( vec3  clear_color,
bool  clear 
)

◆ SetScreenSize()

void tram::Render::API::SetScreenSize ( float  width,
float  height 
)

◆ SetSphericalHarmonic()

void tram::Render::API::SetSphericalHarmonic ( drawlistentry_t  entry,
sphericalharmonic_t  harmonic 
)

◆ SetViewMatrix()

void tram::Render::API::SetViewMatrix ( const mat4 matrix,
layer_t  layer 
)

◆ SetViewParameters()

void tram::Render::API::SetViewParameters ( vec3  position,
quat  rotation,
uint32_t  layer 
)

◆ TriangleVisible()

bool tram::Render::API::TriangleVisible ( vec4  p0,
vec4  p1,
vec4  p2 
)

◆ UpdateSpriteArray()

void tram::Render::API::UpdateSpriteArray ( spritearray_t  array,
size_t  data_size,
void *  data 
)

◆ UpdateVertexArray()

void tram::Render::API::UpdateVertexArray ( vertexarray_t vertex_buffer,
size_t  data_size,
void *  data 
)

◆ UploadUniformBuffer()

void tram::Render::API::UploadUniformBuffer ( uint32_t  handle,
uint32_t  data_size,
void *  data 
)

◆ VertexDefinitionToFVF()

FVFHelper tram::Render::API::VertexDefinitionToFVF ( VertexDefinition  vertex_format)

Variable Documentation

◆ bone_uniform_binding

const uint32_t tram::Render::API::bone_uniform_binding = 3

◆ bone_uniform_buffer

uint32_t tram::Render::API::bone_uniform_buffer

◆ clear_screen

static bool tram::Render::API::clear_screen = true

◆ draw_list

Pool< SWDrawListEntry > tram::Render::API::draw_list ( "render list"  ,
500  ,
false   
)

◆ DYNAMIC_VERTEX_FVF

const DWORD tram::Render::API::DYNAMIC_VERTEX_FVF = D3DFVF_XYZB4 | D3DFVF_LASTBETA_UBYTE4 | D3DFVF_NORMAL | D3DFVF_TEX1

◆ index_arrays

Pool< SWIndexArray > tram::Render::API::index_arrays("index_arrays list", 200, false) ( "index_arrays list"  ,
200  ,
false   
)

◆ light_list

Pool< SWLight > tram::Render::API::light_list ( "light list"  ,
200  ,
false   
)

◆ light_tree

Octree<uint32_t> tram::Render::API::light_tree

◆ light_uniform_binding

const uint32_t tram::Render::API::light_uniform_binding = 2

◆ light_uniform_buffer

uint32_t tram::Render::API::light_uniform_buffer

◆ LINE_VERTEX_FVF

const DWORD tram::Render::API::LINE_VERTEX_FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE

◆ matrices

ShaderUniformMatrices tram::Render::API::matrices

◆ matrix_uniform_binding

const uint32_t tram::Render::API::matrix_uniform_binding = 0

◆ matrix_uniform_buffer

uint32_t tram::Render::API::matrix_uniform_buffer

◆ model_matrix_uniform_binding

const uint32_t tram::Render::API::model_matrix_uniform_binding = 1

◆ model_matrix_uniform_buffer

uint32_t tram::Render::API::model_matrix_uniform_buffer

◆ modelMatrices

ShaderUniformModelMatrices tram::Render::API::modelMatrices

◆ scanlines

ScanlineBuffer* tram::Render::API::scanlines = new ScanlineBuffer

◆ screen_clear_color

static vec3 tram::Render::API::screen_clear_color = {0.2f, 0.3f, 0.3f}

◆ shader_path

const char* tram::Render::API::shader_path = "shaders/gles3/"

◆ STATIC_VERTEX_FVF

const DWORD tram::Render::API::STATIC_VERTEX_FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX2

◆ texture_list

Pool< SWTexture > tram::Render::API::texture_list("texture list", 200, false) ( "texture list"  ,
200  ,
false   
)

◆ vertex_arrays

Pool< SWVertexArray > tram::Render::API::vertex_arrays("vertex_arrays list", 200, false) ( "vertex_arrays list"  ,
200  ,
false   
)

◆ vertex_buffer_metadata

Pool< VertexBufferMetadata > tram::Render::API::vertex_buffer_metadata("vertex buffer metadata", 500, false) ( "vertex buffer metadata"  ,
500  ,
false   
)