4#ifndef TRAM_SDK_RENDER_H
5#define TRAM_SDK_RENDER_H
11struct IDirect3DVertexBuffer9;
12struct IDirect3DIndexBuffer9;
13struct IDirect3DTexture9;
128namespace API {
struct D3DDrawListEntry; }
129namespace API {
struct SWDrawListEntry; }
151namespace API {
struct GLLight; }
152namespace API {
struct D3DLight; }
153namespace API {
struct SWLight; }
const char * GetMaterialTypeName(materialtype_t type)
Definition: render.cpp:370
float GetViewDistance(layer_t layer)
Definition: render.cpp:196
const color_t COLOR_BLACK(0.0f, 0.0f, 0.0f)
void SetViewFov(float fov, layer_t layer)
Definition: render.cpp:178
MaterialTypes
Definition: render.h:74
@ MATERIAL_LIGHTMAP
Definition: render.h:77
@ MATERIAL_TEXTURE_ALPHA
Definition: render.h:76
@ MATERIAL_LAST
Definition: render.h:82
@ MATERIAL_GLYPH
Definition: render.h:79
@ MATERIAL_FLAT_COLOR
Definition: render.h:81
@ MATERIAL_WATER
Definition: render.h:80
@ MATERIAL_MSDF
Definition: render.h:78
@ MATERIAL_TEXTURE
Definition: render.h:75
vec3 color_t
Definition: render.h:17
vertexformat_t FindVertexFormat(const char *name)
Definition: render.cpp:348
const color_t COLOR_GRAY(0.3f, 0.3f, 0.3f)
const color_t COLOR_RED(1.0f, 0.0f, 0.0f)
void Init()
Initializes the rendering system.
Definition: render.cpp:94
const color_t COLOR_GREEN(0.0f, 1.0f, 0.0f)
uint32_t vertexformat_t
Definition: render.h:20
vertexformat_t RegisterVertexFormat(const char *name)
Definition: render.cpp:332
void AddCylinder(vec3 pos, float height, float radius, color_t color)
Definition: render.cpp:287
const color_t COLOR_YELLOW(1.0f, 1.0f, 0.0f)
void SetSunDirection(color_t direction, layer_t layer)
Sets the sun direction.
Definition: render.cpp:146
VertexFormats
Definition: render.h:66
@ VERTEX_SPRITE
Definition: render.h:69
@ VERTEX_DYNAMIC
Definition: render.h:68
@ VERTEX_STATIC
Definition: render.h:67
@ VERTEX_LAST
Definition: render.h:71
@ VERTEX_LINE
Definition: render.h:70
void Render()
Renders a single frame.
Definition: render.cpp:126
quat GetViewRotation(layer_t layer)
Returns the view rotation for a given layer.
Definition: render.cpp:224
void Project(const vec3 &point, vec3 &result, layer_t layer)
Definition: render.cpp:295
void SetViewDistance(float dist, layer_t layer)
Definition: render.cpp:192
void AddCube(vec3 pos, float height, float radius, color_t color)
Definition: render.cpp:291
void SetViewRotation(quat rotation, layer_t layer)
Sets the view rotation.
Definition: render.cpp:213
void SetViewPosition(vec3 position, layer_t layer)
Sets the view position.
Definition: render.cpp:205
materialtype_t RegisterMaterialType(const char *name)
Definition: render.cpp:340
void SetSunColor(color_t color, layer_t layer)
Sets the sun color.
Definition: render.cpp:154
float GetViewFov(layer_t layer)
Definition: render.cpp:183
uint32_t layer_t
Definition: render.h:18
materialtype_t FindMaterialType(const char *name)
Definition: render.cpp:356
uint32_t materialtype_t
Definition: render.h:21
const color_t COLOR_CYAN(0.0f, 1.0f, 1.0f)
const color_t COLOR_PINK(1.0f, 0.0f, 1.0f)
void AddLineAABB(vec3 min, vec3 max, vec3 center, quat rotation, vec3 color)
Definition: render.cpp:239
void SetOrthoRatio(float ratio, layer_t layer)
Definition: render.cpp:187
MaterialFilter
Definition: render.h:85
@ FILTER_NEAREST
Definition: render.h:86
@ FILTER_LINEAR
Definition: render.h:87
void AddLine(vec3 from, vec3 to, vec3 color)
Definition: render.cpp:228
void SetScreenSize(float width, float height)
Definition: render.cpp:167
const color_t COLOR_BLUE(0.0f, 0.0f, 1.0f)
const char * GetVertexFormatName(vertexformat_t type)
Definition: render.cpp:364
const color_t COLOR_WHITE(1.0f, 1.0f, 1.0f)
void AddSphere(vec3 pos, float radius, color_t color)
Definition: render.cpp:279
void SetAmbientColor(color_t color, layer_t layer)
Sets the ambient color.
Definition: render.cpp:162
vec3 GetViewPosition(layer_t layer)
Returns the view position for a given layer.
Definition: render.cpp:219
void AddLineMarker(vec3 location, vec3 color)
Definition: render.cpp:233
vec3 ProjectInverse(vec3 point, layer_t layer)
Definition: render.cpp:303
glm::vec3 vec3
Definition: math.h:12
glm::quat quat
Definition: math.h:13
Definition: direct3d.h:11
Definition: direct3d.h:40
Definition: renderer.h:31
Definition: renderer.h:21
Definition: software.h:66
Definition: software.h:58
Definition: software.h:12
Definition: software.h:25
Definition: software.h:50
API::GLDrawListEntry * gl
Definition: render.h:133
API::SWDrawListEntry * sw
Definition: render.h:135
API::D3DDrawListEntry * d3d
Definition: render.h:134
IDirect3DIndexBuffer9 * d3d_index_buffer
Definition: render.h:121
API::SWIndexArray * sw_index_array
Definition: render.h:122
uint32_t gl_index_buffer
Definition: render.h:120
API::GLLight * gl
Definition: render.h:157
API::D3DLight * d3d
Definition: render.h:158
API::SWLight * sw
Definition: render.h:159
uint32_t gl_texture_handle
Definition: render.h:144
IDirect3DTexture9 * d3d_texture_handle
Definition: render.h:145
API::SWTexture * sw_texture
Definition: render.h:146
API::SWVertexArray * sw_vertex_array
Definition: render.h:111
IDirect3DVertexBuffer9 * d3d_vertex_buffer
Definition: render.h:108
uint32_t gl_vertex_array
Definition: render.h:104
uint32_t gl_vertex_buffer
Definition: render.h:105
uint32_t d3d_metadata
Definition: render.h:109