Experiments in using Lua with sol2 and how best to structure the data. Contains a shoot out of SOA, vs AOS vs. MOA. SOA = Struct of Arrays AOS = Array of Structs MOA = Many Array of Structs (kind of a hybrid)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
sol2_test/src/render.cpp

21 lines
413 B

#include "render.hpp"
#include "config.hpp"
Engine::Engine() {
text.load_font();
screen.init();
framebuffer.init();
}
void Engine::render() {
framebuffer.begin();
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
text.render(text_content, 25.0f, SCR_HEIGHT - text.font_size - 20, 1.0f,
glm::vec3(1.0f, 1.0f, 1.0f));
framebuffer.commit();
framebuffer.draw(screen);
}