예제 #1
0
void RenderSystem::update() {
	list<Node*>* renderNodes;
	renderNodes = familyManager->getMemberOfFamilies(FamilyManager::Family::RENDER_SYSTEM);

	Position *position;
	Display *display;

	for (list<Node*>::iterator it = renderNodes->begin(); it != renderNodes->end(); ++it) {
		position = ((RenderNode*)(*it))->getPosition();
		display = ((RenderNode*)(*it))->getDisplay();
		display->setPosition(position->getX(), position->getY());
		display->setRotation((float)position->getRotation());
		display->draw(this->window, sf::RenderStates());
	}

}
예제 #2
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //MainWindow w;
    //w.show();

    int linha=800,coluna=800;

    QImage image(linha, coluna, QImage::Format_RGB32);

    Display tela;

    QLabel myLabel;
    myLabel.setPixmap(QPixmap::fromImage(tela.draw(image,linha,coluna)));
    myLabel.show();

    return a.exec();


}