RenderWindow.capture

Copy the current contents of the window to an image

//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.

class RenderWindow
capture
()

Return Value

Type: Image

An Image containing the captured contents.

Meta