SFML community forums

Help => Window => Topic started by: tntexplosivesltd on June 08, 2011, 07:03:24 am

Title: SFML 2 Screenshot
Post by: tntexplosivesltd on June 08, 2011, 07:03:24 am
Hi there
How do I take a screenshot with SFML 2? I was using 1.6 until an update was forced upon me (thanks, btw). I have to change my code to use SFML 2, but can find nothing about taking a screenshot. Grr. Capture() doesn't exist any more =(
Title: SFML 2 Screenshot
Post by: Nexus on June 08, 2011, 07:28:13 am
sf::Image::CopyScreen() (http://www.sfml-dev.org/documentation/2.0/classsf_1_1Image.php#a35d840e67a4303e92e1449c94833faf6)
Title: SFML 2 Screenshot
Post by: tntexplosivesltd on June 08, 2011, 07:45:15 am
You the man.
So, GetEvent() is just replaced with PollEvent()? I know there's WaitEvent(), but I don't want to wait for an event.
Title: SFML 2 Screenshot
Post by: Nexus on June 08, 2011, 09:21:27 am
Quote from: "tntexplosivesltd"
So, GetEvent() is just replaced with PollEvent()?
Yes, the difference to "wait" is clearer with the term "poll".
Title: SFML 2 Screenshot
Post by: tntexplosivesltd on June 08, 2011, 12:50:24 pm
Sweet, thanks.
So since there was an arch package for SFML 1.99, I'm assuming it's stable?
Title: SFML 2 Screenshot
Post by: Groogy on June 08, 2011, 01:03:55 pm
Quote from: "tntexplosivesltd"
Sweet, thanks.
So since there was an arch package for SFML 1.99, I'm assuming it's stable?


Erhm.. SFML 1.99 doesn't exist?

Also yes SFML 2 is very stable it's just that the public API might change from time to time.
Title: SFML 2 Screenshot
Post by: tntexplosivesltd on June 08, 2011, 01:05:39 pm
Erm... yea it does.
Code: [Select]

Name           : sfml
Version        : 1.99.git20110526-1
URL            : http://www.sfml-dev.org/
Licenses       : zlib
Groups         : None
Provides       : None
Depends On     : libsndfile  libxrandr  libjpeg  openal  glew  freetype2
Optional Deps  : None
Required By    : None
Conflicts With : None
Replaces       : None
Installed Size : 7628.00 K
Packager       : Sven-Hendrik Haase <sh@lutzhaase.com>
Architecture   : x86_64
Build Date     : Thu 26 May 2011 02:23:35 PM NZST
Install Date   : Wed 08 Jun 2011 04:40:09 PM NZST
Install Reason : Explicitly installed
Install Script : No
Description    : A simple, fast, cross-platform, and object-oriented multimedia API
Title: SFML 2 Screenshot
Post by: Laurent on June 08, 2011, 01:13:38 pm
It's "1.99.git20110526-1" , which means "SFML 2 alpha". "1.99" alone would mean an official release of SFML 1.99, which is not going to happen ;)
Title: SFML 2 Screenshot
Post by: tntexplosivesltd on June 08, 2011, 01:23:34 pm
I see. Thanks!
Title: SFML 2 Screenshot
Post by: Svenstaro on June 08, 2011, 06:10:57 pm
First of all, it is Arch convention to version packages from git as 1.99.gitDATE. See the mesa package in testing, for instance.

For an explanation of why I packaged sfml from git, see here (https://bbs.archlinux.org/viewtopic.php?id=120088).
Title: SFML 2 Screenshot
Post by: tntexplosivesltd on June 08, 2011, 07:16:22 pm
Ah, I see. It wasn't hard for me to upgrade anyway. Thanks!