SFML community forums

Help => Graphics => Topic started by: M74 on January 20, 2015, 09:44:26 pm

Title: Maximum size of a sf::View?
Post by: M74 on January 20, 2015, 09:44:26 pm
Hi,

could someone please explain me if a sf::View can be bigger than the maximum allowed texture size?

For example on an old test-computer with Windows Dx9 i have a hardware maximum texture size of only 2048x2048 pixels, so i tried to initialize a view with a size of 32768x32768 on this computer and got no error.

I initially thought that also the view is limited to the maximum texture size and i have to write my own texture mapping to achive a bigger size of the view, but since i got no error in creating a bigger view i was wondering if SFML handles this internally already somehow?

Please excuse my bad english :-)

Many thanks for all answers in advance,
M74
Title: Re: Maximum size of a sf::View?
Post by: Hapax on January 20, 2015, 09:52:29 pm
An sf::View is just a way of manipulating the objects that are drawn. It works conceptually identically to a camera. Therefore the "size" of the view is theoretically infinite.

You may find the sf::View tutorial (http://www.sfml-dev.org/tutorials/2.2/graphics-view.php) interesting reading.
Title: Re: Maximum size of a sf::View?
Post by: Laurent on January 20, 2015, 10:05:28 pm
A view is just a set of transformations (translation, rotation, scaling) that are applied after the entities' own transformations. So no, there's no limit.
Title: Re: Maximum size of a sf::View?
Post by: M74 on January 20, 2015, 10:11:46 pm
Thank you for your quick answers.

Wow, in that case this is really an amazing concept, because i have some kind of "virtual desktop" where i place synthesizers and other virtual Audio-Devices in my View-Model. At first i tried Direct2D with RenderTarget-Transformations but had several Mouse-Coord problems with Zooming and Pannig and SFML in this case seems to be the better choice for my needs :D