| Introduction | |
| Скачивание библиотеки SFML2 | |
| Создание проекта в Visual Studio | |
| C/C++ General - include | |
| Linker General - lib | |
| Linker Input | |
| SFML2.dll | |
| Видео |
Скачать SFML2 можно на сайте sfml-dev.org
После этого в Visual Studio создайте пустой C++ проект. Консольное приложение для win32, например. И в этом проекте создайте файл main.cpp
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200,200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
| I recommend our hosting beget.ru |
| Write to info@urn.su, info@aredel.com if you: |
| 1. Want to write an article for our site or translate an article into your native language. |
| 2. Want to place thematically relevant ads on the site. |
| 3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail |
| 4. Found a mistake, inaccuracy, bug, etc. on the site. ... ....... |
|
5. Articles can be shared on social media by clicking a network icon:
|