SFML2.6 graphics module–sprites and textures

Glossary Most, if not all, of you are already familiar with these two very common objects, so let’s briefly define them. Textures are pictures. But we call it a “texture” because it has a very specific purpose: to be mapped onto a 2D entity. Sprites are nothing but textured rectangles. Okay, that’s short, but if […]

SFML2.6 graphics module–add special effects using shaders

Introduction Shaders are small programs that execute on the graphics card. It provides more flexible and simpler control of the drawing process than using the fixed states and operations provided by OpenGL. With this additional flexibility, shaders are used to create effects that are too complex or impossible to describe using regular OpenGL functions: pixel-level […]

SFML2.6 starts–compile SFML with CMake

Introduction Admittedly, the title of this tutorial is a bit misleading. You won’t use CMake to compile SFML because CMake is not a compiler. So…what is CMake? CMake is an open source meta-build system. It doesn’t build SFML, it builds the things that build SFML: Visual Studio solutions, Code::Blocks projects, Linux makefiles, XCode projects, etc. […]

SFML2.6 graphics module–position, rotation, scaling: entity transformation

Transform SFML entities All SFML classes (sprites, text, shapes) use the same interface for transformation: sf::Transformable. This base class provides a simple API to move, rotate and scale your entities. It does not provide maximum flexibility, but defines an interface that is easy to understand and use, covering 99% of all use cases – for […]

[Solved] About the error of SFML Rect.inl file

First, there is a conflict between the parameter templates of max and min because of the max and min macros of VC++ So add #undef max and #undef min in front to cancel the macro definition Then the Rect template is under the sf namespace, but the file does not prefix Rect with sf:: The […]