Untitled
Loading...
Searching...
No Matches
render.h
Go to the documentation of this file.
1
5#ifndef RENDER_H
6#define RENDER_H
7
8#include "core/engine_types.h"
9#include "ui/ui.h"
10
15
20
25
33void aabb_to_vertices(DebugVertex * out, AABB * aabb, vec3 offset);
34
40
45
51void copy_light_to_gpu_light(LightGPU * lgpu, Light * l);
52
56void upload_lights();
57
64
71
80void add_text_box(Vector * tvs, Vector * tis, TextBox * tb, int current_box);
81
87
93void create_and_sort_draw_commands(int * dc_cnt, DrawCommand * dcs);
94
103void render_to_cubemap_face(Camera * rprobe_cam, GLuint render_fbo, int render_width, int render_height, bool probe_bake);
104
108void render();
109
110
111
112
113
114
115
116#endif
layout(local_size_x=16, local_size_y=16) in
uniform int probe_bake
Definition dynamic.frag:235
Engine specific types and defines.
The camera structure for players and entities.
The structure used for debug wireframes.
The structure used to sort unique submeshes by materials, and shaders in the main render pass.
The GPU side structure for Lights padded for GPU.
An unused abstraction for VertexLayouts.
The CPU side structure for Lights.
MeshNodes that describe the position of Meshes, GLTF nodes for GLTFAnimations, or hold references to ...
A structure holding a Font ID and text to be rendered and transformed with its properties.
Definition text.vert:5
A Mesh with geometry data that is either initialized as static or dynamic and split into SubMeshes.
void create_and_sort_draw_commands(int *dc_cnt, DrawCommand *dcs)
Creates all DrawCommands based on unique SubMeshes and sorts them via DrawCommand....
Definition render.c:1132
void render_mesh_aabbs_from_root(MeshNode *mn)
Adds Mesh AABBs for each MeshNode child recursively to DEBUG_LINES.
Definition render.c:517
void add_text_box(Vector *tvs, Vector *tis, TextBox *tb, int current_box)
Adds a TextBox to a vertex and index buffer, to be uploaded to TEXT_VBO and TEXT_EBO.
Definition render.c:1154
void upload_lights()
Uploads all current Lights inside of Globals.lights to the GPU in a triple buffered LIGHT_SSBO.
Definition render.c:634
void bind_baking_ssbos()
Binds SSBOs required for baking.
Definition render.c:31
void render()
The main render pass.
Definition render.c:3057
void unbind_baking_ssbos()
Unbinds SSBOs required for baking.
Definition render.c:42
void upload_material_data()
Uploads Material data to the GPU as MaterialGPU.
Definition render.c:854
void copy_light_to_gpu_light(LightGPU *lgpu, Light *l)
Transfers a Light to a LightGPU.
Definition render.c:602
void add_mesh_to_buffer(Mesh *m, VertexLayout *layout)
Adds a single Mesh to the MAIN_VBO.
Definition render.c:343
void bind_render_ssbos()
Binds SSBOs required for rendering.
Definition render.c:56
void aabb_to_vertices(DebugVertex *out, AABB *aabb, vec3 offset)
Transfers an AABB to DebufVertex for a wireframe (GL_LINES).
Definition render.c:475
void add_all_text_boxes_to_draw_buffer()
Adds all TextBoxes to TEXT_VBO and iterates through each character to push indices to TEXT_EBO.
Definition render.c:1220
void render_to_cubemap_face(Camera *rprobe_cam, GLuint render_fbo, int render_width, int render_height, bool probe_bake)
Uploads per-frame data to GPU and renders main render pass to a target FBO (omits Text,...
Definition render.c:2278
void add_all_meshes_to_buffer(VertexLayout *layout)
Adds all Meshes that have valid MeshNodes.
Definition render.c:441
Definition types.h:12
The standalone UI library that controls text rendering, ui rendering, and events.