3#ifndef TRAM_SDK_RENDER_API_H
4#define TRAM_SDK_RENDER_API_H
37uint32_t
GetFlags(drawlistentry_t entry);
38void SetFlags(drawlistentry_t entry, uint32_t flags);
40void SetPose(drawlistentry_t entry, Pose* pose);
41void SetLightmap(drawlistentry_t entry, texturehandle_t lightmap);
44void SetLights(drawlistentry_t entry, light_t* lights);
63void 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);
64void CreateVertexArray(VertexDefinition vertex_format, vertexarray_t& vertex_array);
65void UpdateVertexArray(vertexarray_t& vertex_buffer,
size_t data_size,
void* data);
uint32_t GetFlags(drawlistentry_t entry)
Definition: renderer.cpp:242
void SetDrawListMaterials(drawlistentry_t entry, size_t material_count, material_t *materials)
Definition: drawlist.cpp:112
void SetMaterialSpecularTransparency(material_t material, float transparency)
Definition: material.cpp:37
void RenderFrame()
Definition: renderer.cpp:62
void SetFlags(drawlistentry_t entry, uint32_t flags)
Definition: renderer.cpp:246
void SetSphericalHarmonic(drawlistentry_t entry, sphericalharmonic_t harmonic)
Definition: drawlist.cpp:48
ContextType GetContext()
Definition: renderer.cpp:803
uint32_t GetMaxIndexRangeLength()
Definition: renderer.cpp:807
drawlistentry_t InsertDrawListEntry()
Definition: renderer.cpp:234
void UpdateVertexArray(vertexarray_t &vertex_buffer, size_t data_size, void *data)
Definition: renderer.cpp:690
void SetViewMatrix(const mat4 &matrix, layer_t layer)
Definition: renderer.cpp:732
void DeleteMaterial(material_t material)
Definition: material.cpp:17
void SetMaterialSpecularWeight(material_t material, float weight)
Definition: material.cpp:29
void UpdateSpriteArray(spritearray_t array, size_t data_size, void *data)
Definition: sprite.cpp:15
void Init()
Definition: renderer.cpp:768
bool SetDrawListShader(drawlistentry_t entry, vertexformat_t vertex_format, materialtype_t material_type)
Definition: renderer.cpp:302
void SetLightmap(drawlistentry_t entry, texturehandle_t lightmap)
Definition: renderer.cpp:258
void SetDrawListIndexArray(drawlistentry_t entry, indexarray_t index_array_handle)
Definition: renderer.cpp:293
void SetScreenSize(float width, float height)
Definition: renderer.cpp:50
void SetScreenClear(vec3 clear_color, bool clear)
Definition: renderer.cpp:54
void SetDrawListVertexArray(drawlistentry_t entry, vertexarray_t vertex_array_handle)
Definition: renderer.cpp:286
void RemoveDrawListEntry(drawlistentry_t entry)
Definition: renderer.cpp:238
ContextType
Definition: api.h:94
@ CONTEXT_WEBGL
Definition: api.h:96
@ CONTEXT_NONE
Definition: api.h:99
@ CONTEXT_DIRECT3D
Definition: api.h:97
@ CONTEXT_OPENGL
Definition: api.h:95
@ CONTEXT_SOFTWARE
Definition: api.h:98
void SetEnvironmentMap(drawlistentry_t entry, texturehandle_t environmentmap)
Definition: drawlist.cpp:44
void SetMaterialColor(material_t material, vec4 color)
Definition: material.cpp:25
void SetPose(drawlistentry_t entry, Pose *pose)
Definition: renderer.cpp:254
void RegisterShader(vertexformat_t format, materialtype_t type, const char *vertex_shader, const char *fragment_shader)
Definition: shader.cpp:343
void SetFadeDistance(drawlistentry_t entry, float near, float far)
Definition: drawlist.cpp:80
void SetDrawListAABB(drawlistentry_t entry, vec3 min, vec3 max)
Definition: drawlist.cpp:52
void SetMaterialSpecularExponent(material_t material, float exponent)
Definition: material.cpp:33
texturehandle_t CreateTexture(ColorMode color_mode, TextureFilter texture_filter, uint32_t width, uint32_t height, void *data)
Definition: renderer.cpp:346
void GetScreen(char *buffer, int w, int h)
Definition: renderer.cpp:744
void CreateVertexArray(VertexDefinition vertex_format, vertexarray_t &vertex_array)
Definition: renderer.cpp:655
void SetMaterialReflectivity(material_t material, float reflectivity)
Definition: material.cpp:41
void SetDebugMode(bool)
Definition: renderer.cpp:521
void SetLightParameters(light_t light, vec3 location, vec3 color, float distance, vec3 direction, float exponent)
Definition: renderer.cpp:329
light_t MakeLight()
Definition: renderer.cpp:310
void SetProjectionMatrix(const mat4 &matrix, layer_t layer)
Definition: renderer.cpp:737
void SetMaterialTexture(material_t material, texturehandle_t texture)
Definition: material.cpp:21
void SetDrawListSpriteArray(drawlistentry_t entry, spritearray_t sprite_array_handle)
Definition: drawlist.cpp:93
bool IsDebugMode()
Definition: renderer.cpp:517
void SetLightingParameters(vec3 sun_direction, vec3 sun_color, vec3 ambient_color, layer_t layer)
Definition: renderer.cpp:44
void SetDrawListTextureOffsets(drawlistentry_t entry, size_t count, vec4 *offset)
Definition: drawlist.cpp:63
void SetDrawListColors(drawlistentry_t entry, size_t count, vec4 *color)
Definition: renderer.cpp:262
void SetDrawListIndexRange(drawlistentry_t entry, uint32_t index_offset, uint32_t index_length)
Definition: renderer.cpp:297
void SetLights(drawlistentry_t entry, light_t *lights)
Definition: renderer.cpp:272
void DeleteLight(light_t light)
Definition: renderer.cpp:320
void SetMatrix(drawlistentry_t entry, const mat4 &matrix)
Definition: renderer.cpp:278
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)
Definition: renderer.cpp:608
void SetDevice(void *)
Definition: renderer.cpp:811
spritearray_t CreateSpriteArray()
Definition: sprite.cpp:8
void SetLayer(drawlistentry_t entry, layer_t layer)
Definition: renderer.cpp:250
material_t MakeMaterial()
Definition: material.cpp:13
vec3 ambient_color
Definition: render.cpp:40
uint32_t vertexformat_t
Definition: render.h:19
vec3 sun_color
Definition: render.cpp:39
uint32_t layer_t
Definition: render.h:17
uint32_t materialtype_t
Definition: render.h:20
ColorMode
Texture color mode.
Definition: renderer.h:27
TextureFilter
Texture filters.
Definition: renderer.h:35
vec3 sun_direction
Definition: render.cpp:38
SphericalHarmonic sphericalharmonic_t
Definition: render.h:96
char buffer[500]
Definition: logging.cpp:60
glm::vec4 vec4
Definition: math.h:15
glm::vec3 vec3
Definition: math.h:11
glm::mat4 mat4
Definition: math.h:14