The Battle for Wesnoth  1.17.10+dev
Public Member Functions | Private Attributes | List of all members
draw::render_target_setter Class Reference

A class to manage automatic restoration of the render target. More...

#include <draw.hpp>

Public Member Functions

 render_target_setter (const texture &t)
 
 ~render_target_setter ()
 

Private Attributes

texture target_
 
::rect viewport_
 

Detailed Description

A class to manage automatic restoration of the render target.

It will also cache and restore the current viewport.

This can be constructed on its own, or the draw::set_render_target() utility function can be used.

Definition at line 424 of file draw.hpp.

Constructor & Destructor Documentation

◆ render_target_setter()

draw::render_target_setter::render_target_setter ( const texture t)
explicit

◆ ~render_target_setter()

draw::render_target_setter::~render_target_setter ( )

Definition at line 593 of file draw.cpp.

References video::force_render_target(), renderer(), target_, viewport_, and WRN_D.

Member Data Documentation

◆ target_

texture draw::render_target_setter::target_
private

Definition at line 431 of file draw.hpp.

Referenced by render_target_setter(), and ~render_target_setter().

◆ viewport_

::rect draw::render_target_setter::viewport_
private

Definition at line 432 of file draw.hpp.

Referenced by render_target_setter(), and ~render_target_setter().


The documentation for this class was generated from the following files: