Commit 0d18a68c authored by Geequette's avatar Geequette

Add tutorial part 2

parent 384bc5d4
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe
/*!
* \file main.cpp
* \brief First example of SFML (http://www.lucidarme.me/?p=6127)
* \author Philippe Lucidarme (from official SFML tutorial)
* \version 1.0
* \date 12/18/2016
*/
// SFML libraries
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
// Display the list of all the video modes available for fullscreen
std::vector<sf::VideoMode> modes = sf::VideoMode::getFullscreenModes();
// Display each mode
for (std::size_t i = 0; i < modes.size(); ++i)
{
sf::VideoMode mode = modes[i];
std::cout << "Mode #" << i << "\t"
<< mode.width << "x" << mode.height << " \t "
<< mode.bitsPerPixel << " bpp" << std::endl;
}
// Get and display desktop mode
sf::VideoMode mode = sf::VideoMode::getDesktopMode();
std::cout << "Desktop" << "\t"
<< mode.width << "x" << mode.height << " \t "
<< mode.bitsPerPixel << " bpp" << std::endl;
// End of application
return 0;
}
# Dont' need Qt libs
QT -= core
QT -= gui
# Binary name
TARGET = part_002
# Console app
CONFIG += console
# Puts the executable into a bundle
CONFIG -= app_bundle
# This is an applications
TEMPLATE = app
# Create directories for temporrary files
OBJECTS_DIR = tmp
MOC_DIR = tmp
# Binaries will be placed in the bin directory
DESTDIR = bin
LIBS += -lsfml-audio
LIBS += -lsfml-graphics
LIBS += -lsfml-network
LIBS += -lsfml-window
LIBS += -lsfml-system
# Sources files
SOURCES += main.cpp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment