Game Development Reference
In-Depth Information
tion— Texture::getMaximumSize() , which returns integer with the maximum
possible size of a texture on the machine. This can be used as an indication that we need
to use lower resolution textures. If we want maximum compatibility from our program,
we have to take the extra effort to use only textures, which have sizes equal to the power
of 2 (32, 64, 256, 1024, and so on).
We can also make an image out of a Texture object by calling Tex-
ture::copyToImage() . We have to be careful where we call this though, since it is a
slow operation which copies data from the GPU to the RAM.
Everything looks good so far. However, one problem still remains—we haven't seen how
to display textures on the screen yet. Let's fix this immediately.
Search WWH ::

Custom Search