O'Reilly logo

SFML Essentials by Milcho G. Milchev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shape rendering and transformations

Obviously, we wouldn't need windows if there weren't any objects to be rendered, and we wouldn't need events if we didn't want to use the input to animate those objects. SFML provides quite a few ways for us to render objects on the screen, and we will explore the main ones in this book. Before we proceed to rendering though, we need to make sure that our render cycle is in place and in correct order.

The render frame

Do you, remember the Window class? That isn't of much use now, since it doesn't provide an interface to draw SFML shapes. We have to use a class called RenderWindow to do that. This class is derived from the Window class and adds the drawing functionality. Don't worry though, it doesn't strip any ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required