SFML C++

Introduction

↓ Contents ↓
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

Рисуем круг

sfml-dev.org

#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; }

Статьи о C++
Вектор. Часть 0.
Вектор. Часть 1.
Вектор. Часть 2.
Указатели
Классы
Тетрис на C++ с библиотекой SFML2
SDL
Массив Структур
Как узнать тип переменной C++
Решение задач на C++
Как создать пустую строку в C++
Errors C++
Contacts and cooperation:
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: