Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
General
»
SFML website
»
Think This Is A Typo
Print
Pages: [
1
]
Author
Topic: Think This Is A Typo (Read 4618 times)
0 Members and 1 Guest are viewing this topic.
azoundria
Newbie
Posts: 11
Think This Is A Typo
«
on:
January 03, 2014, 11:28:06 pm »
On this page:
http://www.sfml-dev.org/tutorials/2.0/graphics-draw.php
You have this text in the Off-screen drawing section:
sf
::
Texture
&
texture
=
renderTexture.
getTexture
(
)
;
// draw it to the window
sf
::
Sprite
sprite
(
texture
)
;
I think the ampersand is a typo.
Logged
FRex
Hero Member
Posts: 1848
Back to C++ gamedev with SFML in May 2023
Re: Think This Is A Typo
«
Reply #1 on:
January 03, 2014, 11:35:39 pm »
It's not.
Logged
Back to C++ gamedev with SFML in May 2023
Daddi
Jr. Member
Posts: 66
Re: Think This Is A Typo
«
Reply #2 on:
January 04, 2014, 01:03:44 am »
To be a bit more specific: the & says, that "texture" is a reference, not an actual object
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: Think This Is A Typo
«
Reply #3 on:
January 04, 2014, 09:41:38 am »
However,
sf::RenderTexture::getTexture()
returns a
const sf::Texture&
, therefore it should be a
const
reference.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
Print
Pages: [
1
]
SFML community forums
»
General
»
SFML website
»
Think This Is A Typo
anything