#include #include #include #include #include //#include #include #include #include // include only works on files rn static const char* argv0 = ""; TEST(builtins, all) { MM::Engine engine; engine.addService(argv0); ASSERT_TRUE(engine.enableService()); engine.addService(); ASSERT_TRUE(engine.enableService()); engine.addService(); ASSERT_TRUE(engine.enableService()); // adds builtins engine.update(); FS_CONST_MOUNT_FILE("/shaders/test_frag.glsl", GLSL_VERSION_STRING R"( #ifdef GL_ES precision mediump float; #endif #include "/shaders/builtin/sampling.glsl" #include "/shaders/builtin/tonemapping.glsl" void main() { } )"); auto sb = MM::OpenGL::ShaderBuilder::start(); sb.addStageVertex("void main() { gl_Position = vec4(0.0); }"); sb.addStageFragmentF(engine, "/shaders/test_frag.glsl"); auto shader = sb.finish(); ASSERT_TRUE(shader); } int main(int argc, char** argv) { argv0 = argv[0]; ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }