RenderWindow.capture

Copy the current contents of the window to an image

More...
class RenderWindow
deprecated("Use a Texture, its update function, and copy its contents into an Image instead.")
capture
(
)

Return Value

Type: Image

An Image containing the captured contents.

Detailed Description

Deprecated: Use a $(TEXTURE_LINK Texture) and its Texture.update() function and copy its contents into an $(IMAGE_LINK Image) instead.

This is a slow operation, whose main purpose is to make screenshots of the application. If you want to update an image with the contents of the window and then use it for drawing, you should rather use a $(TEXTURE_LINK Texture) and its update() function. You can also draw things directly to a texture with the $(RENDERTEXTURE_LINK RenderTexture) class.

Meta