4#ifndef TRAM_SDK_RENDER_OPENGL_RENDERER_H
5#define TRAM_SDK_RENDER_OPENGL_RENDERER_H
57 for (
int i = 0; i < 15; i++) {
59 colors[i] = {1.0f, 1.0f, 1.0f, 1.0f};
72 sortkey = sortkey << 60;
73 sortkey = sortkey | (((uint64_t)
layer) << 61);
74 sortkey = sortkey | (((uint64_t)
shader) << 48);
75 sortkey = sortkey | (((uint64_t)
vao) << 32);
78 sortkey = sortkey | (((uint64_t)(glm::distance(cameraPosition, location) * 3000000.0f)) & 0x00000000FFFFFFFF);
void CompileShaders()
Definition: shader.cpp:266
void BindUniformBlock(const char *name, uint32_t binding)
Definition: shader.cpp:199
void RegisterShader(vertexformat_t format, materialtype_t type, const char *vertex_shader, const char *fragment_shader)
Definition: shader.cpp:217
uint32_t FindShader(vertexformat_t format, materialtype_t type)
Definition: shader.cpp:252
uint32_t vertexformat_t
Definition: render.h:20
uint32_t materialtype_t
Definition: render.h:21
@ FLAG_TRANSPARENT
Definition: renderer.h:18
glm::vec4 vec4
Definition: math.h:16
glm::vec3 vec3
Definition: math.h:12
glm::mat4 mat4
Definition: math.h:15
Definition: renderer.h:31
uint32_t texCount
Definition: renderer.h:46
uint32_t eboLen
Definition: renderer.h:43
uint64_t CalcSortKey(const vec3 &cameraPosition)
Assembles a key for sorting.
Definition: renderer.h:68
uint32_t lights[4]
Definition: renderer.h:38
uint32_t flags
Definition: renderer.h:32
mat4 matrix
Definition: renderer.h:36
uint32_t lightmap
Definition: renderer.h:41
vec4 texture_transforms[15]
Definition: renderer.h:52
float specular_exponents[15]
Definition: renderer.h:50
uint32_t eboOff
Definition: renderer.h:44
char padding[4]
Definition: renderer.h:54
uint32_t layer
Definition: renderer.h:40
uint32_t textures[15]
Definition: renderer.h:47
vec4 colors[15]
Definition: renderer.h:48
uint32_t vao
Definition: renderer.h:42
Pose * pose
Definition: renderer.h:34
float specular_transparencies[15]
Definition: renderer.h:51
uint32_t shader
Definition: renderer.h:45
float specular_weights[15]
Definition: renderer.h:49
GLDrawListEntry()
Definition: renderer.h:56
Definition: renderer.h:21
float exponent
Definition: renderer.h:27
vec3 direction
Definition: renderer.h:26
float padding
Definition: renderer.h:23
vec3 color
Definition: renderer.h:24
float distance
Definition: renderer.h:25
vec3 location
Definition: renderer.h:22
float padding2[4]
Definition: renderer.h:28
Definition: animation.h:36