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/tests/shaders.cpp

37 lines
821 B

#include <fmt/core.h>
#include <string>
#include <fuc2/testing.hpp>
using namespace fuc2;
using namespace fmt;
namespace shader_tests {
void test_shader_loading() {
/*
shaders::init();
int version = shaders::version();
std::shared_ptr<sf::Shader> ui_shader = shaders::get("ui_shader");
auto other_test = shaders::get("ui_shader");
CHECK(ui_shader != nullptr);
CHECK(ui_shader == other_test);
CHECK(shaders::updated(version) == false);
int new_version = shaders::reload();
CHECK(version != shaders::version());
CHECK(version != new_version);
CHECK(shaders::version() == new_version);
CHECK(shaders::updated(version) == true);
version = new_version;
*/
}
fuc2::Set TESTS{
.name="shader",
.tests={
TEST(test_shader_loading),
}
};
}