#include "application.h" #include #include "odfaeg/Window/window.hpp" #include "odfaeg/Window/x11Window.hpp" #include "odfaeg/Window/context.hpp" #include #include "odfaeg/Graphics/sprite.h" using namespace odfaeg::core; using namespace odfaeg::math; using namespace odfaeg::physic; using namespace odfaeg::graphic; using namespace odfaeg::window; using namespace odfaeg::audio; using namespace sorrok; int main(int argc, char* argv[]) { RenderWindow window(sf::VideoMode(800, 600), "Test per pixel linked list", sf::Style::Default, ContextSettings(24, 0, 8, 3, 0)); Tile tile1(nullptr, Vec3f(0, 0, 0), Vec3f(100, 50, 0), sf::IntRect(0, 0, 100, 50), sf::Color(255, 0, 0, 50)); Tile tile2(nullptr, Vec3f(50, 0, 10), Vec3f(100, 50, 0), sf::IntRect(0, 0, 100, 50), sf::Color(0, 255, 0, 75)); Tile tile3(nullptr, Vec3f(25, 25, 20), Vec3f(100, 50, 0), sf::IntRect(0, 0, 100, 50), sf::Color(0, 0, 255, 100)); std::vector entities = {&tile1, &tile2, &tile3}; PerPixelLinkedListRenderComponent ppll(window, 0, "E_TILE", ContextSettings(0, 0, 8, 3, 0)); ppll.loadEntitiesOnComponent(entities); while (window.isOpen()) { IEvent event; while (window.pollEvent(event)) { if (event.type == IEvent::WINDOW_EVENT && event.window.type == IEvent::WINDOW_EVENT_CLOSED) window.close(); } window.clear(); ppll.clear(); window.draw(ppll); window.display(); } return 0; }