Files
fall-fever/apps/flecs-test/main.cpp

26 lines
531 B
C++

#include <flecs.h>
#include <input/input.h>
#include <iostream>
#include <window/window.h>
#include <GLFW/glfw3.h>
int main()
{
flecs::world world;
world.import <Window::WindowModule>();
auto window = Window::spawn_window(world);
auto glfw_window = window.get<std::shared_ptr<GLFWwindow>>();
world.import <Input::InputModule>();
while (glfwWindowShouldClose(glfw_window->get()) == GLFW_FALSE) {
glfwPollEvents();
world.progress();
glfwSwapBuffers(glfw_window->get());
}
}