Commit 03191296 authored by Geequette's avatar Geequette

add part_008

parent e480de3c
......@@ -15,6 +15,7 @@
// Example 1 : distorsion
// Example 2 : breath
// Example 3 : shaked
// Example 4 : fade
#define SHADER_FILENAME "../example_001.frag"
//#define SHADER_FILENAME "../example_002.frag"
//#define SHADER_FILENAME "../example_003.frag"
......@@ -27,6 +28,8 @@
int main()
{
// _____________________
// ::: Create window :::
// Create a non resizable window
sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), "SFML Shader Example", sf::Style::Titlebar | sf::Style::Close);
......@@ -36,18 +39,7 @@ int main()
sf::Texture tex;
tex.create(WINDOW_WIDTH, WINDOW_HEIGHT);
sf::Sprite spr(tex);
// _____________________
// ::: Create window :::
/*
// Create a window with the same pixel depth as the desktop
sf::VideoMode desktopMode = sf::VideoMode::getDesktopMode();
sf::RenderWindow window(sf::VideoMode( desktopMode.width,
desktopMode.height,
desktopMode.bitsPerPixel),
"SFML part 6",
sf::Style::Fullscreen);
*/
// Enable vertical sync. (vsync)
window.setVerticalSyncEnabled (true);
......
......@@ -29,15 +29,10 @@ LIBS += -lsfml-system
# Sources files
SOURCES += main.cpp
DISTFILES += \
../shaders/example_002.vert \
../shaders/example_012.frag \
../shaders/example_011.frag \
../shaders/example_010.frag \
example_001.frag \
example_002.frag \
example_003.frag \
example_004.frag
DISTFILES += example_001.frag
DISTFILES += example_002.frag
DISTFILES += example_003.frag
DISTFILES += example_004.frag
......
......@@ -29,15 +29,11 @@ LIBS += -lsfml-system
# Sources files
SOURCES += main.cpp
DISTFILES += \
../shaders/example_002.vert \
../shaders/example_012.frag \
../shaders/example_011.frag \
../shaders/example_010.frag \
example_001.frag \
example_002.frag \
example_003.frag \
example_004.frag
# Fragment files
DISTFILES += example_001.frag
DISTFILES += example_002.frag
DISTFILES += example_003.frag
DISTFILES += example_004.frag
......
# 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>
int main()
{
// Create a new 200x200 pixels window with a title
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML tutorial : part 8");
// Create a green circle with a radius of 100. pixels
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
// Main loop, while the window is open
while (window.isOpen())
{
// Event loop
sf::Event event;
while (window.pollEvent(event))
{
// If close is requested by user, close the window
if (event.type == sf::Event::Closed) window.close();
}
// Display sequence : clear screen, draw circle and update display
window.clear();
window.draw(shape);
window.display();
}
// End of application
return 0;
}
# Dont' need Qt libs
QT -= core
QT -= gui
# Binary name
TARGET = part_008
# 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
# Fragment files
DISTFILES += example_001.frag
DISTFILES += example_002.frag
DISTFILES += example_003.frag
DISTFILES += example_004.frag
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