Tramway SDK
software.h
Go to the documentation of this file.
1// Tramway Drifting and Dungeon Exploration Simulator SDK Runtime
2
3#ifndef TRAM_SDK_RENDER_SOFTWARE_SOFTWARE_H
4#define TRAM_SDK_RENDER_SOFTWARE_SOFTWARE_H
5
6#include <render/render.h>
7#include <render/renderer.h>
8
9namespace tram::Render::API {
10
11struct SWLight {
12 vec3 location = {0.0f, 0.0f, 0.0f};
13 vec3 color = {0.0f, 0.0f, 0.0f};
14 float distance = 0.0f;
15 vec3 direction = {0.0f, 0.0f, -1.0f};
16 float exponent = 0.0f;
17};
18
22};
23
24struct SWTexture {
25 int width;
26 int height;
29 uint8_t* pixels = nullptr;
30};
31
37};
38
39struct FFPHelper {
40 int position = -1;
41 int normal = -1;
42 int color = -1;
43 int texture = -1;
44 int lightmap = -1;
45 int bone_index = -1;
46 int bone_weight = -1;
47};
48
51 void* vertices = nullptr;
52 size_t vertex_count = 0;
55};
56
58 size_t index_count = 0;
59 uint32_t* indices = nullptr;
60#ifndef __x86_64__
61 void* padding;
62#endif
63};
64
66 uint32_t flags = 0;
67
68 Pose* pose = nullptr;
69
70 mat4 matrix = mat4(1.0f);
71
72 SWLight* lights[4] = {nullptr, nullptr, nullptr, nullptr};
73
74 uint32_t layer = 0;
75 SWTexture* lightmap = nullptr;
78 uint32_t index_length = 0;
79 uint32_t index_offset = 0;
80 SWTexture* texture = nullptr;
81 vec4 color = {1.0f, 1.0f, 1.0f, 1.0f};
82 float specular_weight = 1.0f;
83 float specular_exponent = 1.0f;
85};
86
87}
88
89#endif // TRAM_SDK_RENDER_SOFTWARE_SOFTWARE_H
Rendering backend API.
SWTextureMode
Definition: software.h:19
@ SW_NEAREST
Definition: software.h:20
@ SW_BLENDED
Definition: software.h:21
SWVertexType
Definition: software.h:32
@ SW_DYNAMIC_BLENDED
Definition: software.h:34
@ SW_STATIC_LIGHTMAPPED
Definition: software.h:33
@ SW_SPRITE
Definition: software.h:36
@ SW_STATIC_COLORED
Definition: software.h:35
glm::vec4 vec4
Definition: math.h:15
glm::vec3 vec3
Definition: math.h:11
glm::mat4 mat4
Definition: math.h:14
Definition: software.h:39
int normal
Definition: software.h:41
int lightmap
Definition: software.h:44
int position
Definition: software.h:40
int bone_index
Definition: software.h:45
int color
Definition: software.h:42
int bone_weight
Definition: software.h:46
int texture
Definition: software.h:43
Definition: software.h:65
float specular_weight
Definition: software.h:82
uint32_t index_length
Definition: software.h:78
SWIndexArray * index_array
Definition: software.h:77
SWLight * lights[4]
Definition: software.h:72
float specular_transparency
Definition: software.h:84
SWVertexArray * vertex_array
Definition: software.h:76
vec4 color
Definition: software.h:81
Pose * pose
Definition: software.h:68
uint32_t layer
Definition: software.h:74
SWTexture * texture
Definition: software.h:80
mat4 matrix
Definition: software.h:70
float specular_exponent
Definition: software.h:83
uint32_t index_offset
Definition: software.h:79
uint32_t flags
Definition: software.h:66
SWTexture * lightmap
Definition: software.h:75
Definition: software.h:57
uint32_t * indices
Definition: software.h:59
void * padding
Definition: software.h:61
size_t index_count
Definition: software.h:58
Definition: software.h:11
float exponent
Definition: software.h:16
vec3 location
Definition: software.h:12
float distance
Definition: software.h:14
vec3 color
Definition: software.h:13
vec3 direction
Definition: software.h:15
Definition: software.h:24
SWTextureMode mode
Definition: software.h:28
int height
Definition: software.h:26
uint8_t * pixels
Definition: software.h:29
int channels
Definition: software.h:27
int width
Definition: software.h:25
Definition: software.h:49
SWVertexType type
Definition: software.h:50
FFPHelper helper
Definition: software.h:54
void * vertices
Definition: software.h:51
size_t vertex_count
Definition: software.h:52
VertexDefinition format
Definition: software.h:53
Definition: animation.h:35
Definition: renderer.h:63