|
|
|
This is a base class for GraphicsWindow (actually, GraphicsOutput) and DisplayRegion, both of which are conceptually rectangular regions into which drawing commands may be issued.
More...
#include "drawableRegion.h"
List of all members.
Public Types |
| enum | RenderTexturePlane {
RTP_stencil = 0,
RTP_depth_stencil = 1,
RTP_color,
RTP_aux_rgba_0,
RTP_aux_rgba_1,
RTP_aux_rgba_2,
RTP_aux_rgba_3,
RTP_aux_hrgba_0,
RTP_aux_hrgba_1,
RTP_aux_hrgba_2,
RTP_aux_hrgba_3,
RTP_aux_float_0,
RTP_aux_float_1,
RTP_aux_float_2,
RTP_aux_float_3,
RTP_depth,
RTP_COUNT
} |
Public Member Functions |
|
| DrawableRegion (const DrawableRegion ©) |
| void | copy_clear_settings (const DrawableRegion ©) |
| | Copies only the clear settings from the other drawable region.
|
| virtual void | disable_clears () |
| | Disables both the color and depth clear.
|
| virtual bool | get_clear_active (int n) const |
| | Gets the clear-active flag for any bitplane.
|
| const Colorf & | get_clear_color () const |
| | Returns the current clear color value.
|
| bool | get_clear_color_active () const |
| | Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.
|
| float | get_clear_depth () const |
| | Returns the current clear depth value.
|
| bool | get_clear_depth_active () const |
| | Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.
|
| unsigned int | get_clear_stencil () const |
| | Returns the current clear stencil value.
|
| bool | get_clear_stencil_active () const |
| | Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.
|
| virtual const Colorf & | get_clear_value (int n) const |
| | Returns the clear value for any bitplane.
|
| int | get_draw_buffer_type () const |
| | Returns the RenderBuffer into which the GSG should issue draw commands.
|
| float | get_pixel_factor () const |
| | Returns the amount by which the height and width of the region will be scaled internally, based on the zoom factor set by set_pixel_zoom().
|
| float | get_pixel_zoom () const |
| | Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not.
|
| int | get_screenshot_buffer_type () const |
| | Returns the RenderBuffer that should be used for capturing screenshots from this particular DrawableRegion.
|
| virtual bool | is_any_clear_active () const |
| | Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.
|
|
void | operator= (const DrawableRegion ©) |
| virtual void | set_clear_active (int n, bool clear_aux_active) |
| | Sets the clear-active flag for any bitplane.
|
| void | set_clear_color (const Colorf &color) |
| | Sets the clear color to the indicated value.
|
| void | set_clear_color_active (bool clear_color_active) |
| | Toggles the flag that indicates whether the color buffer should be cleared every frame.
|
| void | set_clear_depth (float depth) |
| | Sets the clear depth to the indicated value.
|
| void | set_clear_depth_active (bool clear_depth_active) |
| | Toggles the flag that indicates whether the depth buffer should be cleared every frame.
|
| void | set_clear_stencil (unsigned int stencil) |
| | Sets the clear stencil to the indicated value.
|
| void | set_clear_stencil_active (bool clear_stencil_active) |
| | Toggles the flag that indicates whether the stencil buffer should be cleared every frame.
|
| virtual void | set_clear_value (int n, const Colorf &clear_value) |
| | Sets the clear value for any bitplane.
|
| virtual void | set_pixel_zoom (float pixel_zoom) |
| | Sets the amount by which the pixels of the region are scaled internally when filling the image interally.
|
| virtual bool | supports_pixel_zoom () const |
| | Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.
|
Static Public Member Functions |
| static int | get_renderbuffer_type (int plane) |
| | Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane.
|
Protected Member Functions |
| virtual void | pixel_factor_changed () |
| | Called internally when the pixel factor changes.
|
| void | update_pixel_factor () |
| | Internal function to reset pixel_factor after it may have changed.
|
Protected Attributes |
|
int | _draw_buffer_type |
|
int | _screenshot_buffer_type |
Detailed Description
This is a base class for GraphicsWindow (actually, GraphicsOutput) and DisplayRegion, both of which are conceptually rectangular regions into which drawing commands may be issued.
Sometimes you want to deal with a single display region, and sometimes you want to deal with the whole window at once, particularly for issuing clear commands and capturing screenshots.
Definition at line 33 of file drawableRegion.h.
Member Function Documentation
| void DrawableRegion::copy_clear_settings |
( |
const DrawableRegion & |
copy | ) |
[inline] |
| void DrawableRegion::disable_clears |
( |
| ) |
[virtual] |
| bool DrawableRegion::get_clear_active |
( |
int |
n | ) |
const [virtual] |
| const Colorf & DrawableRegion::get_clear_color |
( |
| ) |
const [inline] |
| bool DrawableRegion::get_clear_color_active |
( |
| ) |
const [inline] |
| float DrawableRegion::get_clear_depth |
( |
| ) |
const [inline] |
| bool DrawableRegion::get_clear_depth_active |
( |
| ) |
const [inline] |
| unsigned int DrawableRegion::get_clear_stencil |
( |
| ) |
const [inline] |
| bool DrawableRegion::get_clear_stencil_active |
( |
| ) |
const [inline] |
| const Colorf & DrawableRegion::get_clear_value |
( |
int |
n | ) |
const [virtual] |
| int DrawableRegion::get_draw_buffer_type |
( |
| ) |
const [inline] |
| float DrawableRegion::get_pixel_factor |
( |
| ) |
const [inline] |
| float DrawableRegion::get_pixel_zoom |
( |
| ) |
const [inline] |
| int DrawableRegion::get_renderbuffer_type |
( |
int |
plane | ) |
[static] |
| int DrawableRegion::get_screenshot_buffer_type |
( |
| ) |
const [inline] |
| bool DrawableRegion::is_any_clear_active |
( |
| ) |
const [virtual] |
| void DrawableRegion::pixel_factor_changed |
( |
| ) |
[protected, virtual] |
| void DrawableRegion::set_clear_active |
( |
int |
n, |
|
|
bool |
clear_aux_active |
|
) |
| [virtual] |
| void DrawableRegion::set_clear_color |
( |
const Colorf & |
color | ) |
[inline] |
| void DrawableRegion::set_clear_color_active |
( |
bool |
clear_color_active | ) |
[inline] |
| void DrawableRegion::set_clear_depth |
( |
float |
depth | ) |
[inline] |
| void DrawableRegion::set_clear_depth_active |
( |
bool |
clear_depth_active | ) |
[inline] |
| void DrawableRegion::set_clear_stencil |
( |
unsigned int |
stencil | ) |
[inline] |
| void DrawableRegion::set_clear_stencil_active |
( |
bool |
clear_stencil_active | ) |
[inline] |
| void DrawableRegion::set_clear_value |
( |
int |
n, |
|
|
const Colorf & |
clear_value |
|
) |
| [virtual] |
| void DrawableRegion::set_pixel_zoom |
( |
float |
pixel_zoom | ) |
[virtual] |
Sets the amount by which the pixels of the region are scaled internally when filling the image interally.
Setting this number larger makes the pixels blockier, but may make the rendering faster, particularly for software renderers. Setting this number to 2.0 reduces the number of pixels that have to be filled by the renderer by a factor of 2.0. It doesn't make sense to set this lower than 1.0.
It is possible to set this on either individual DisplayRegions or on overall GraphicsWindows, but you will get better performance for setting it on the window rather than its individual DisplayRegions. Also, you may not set it on a DisplayRegion that doesn't have both clear_color() and clear_depth() enabled.
This property is only supported on renderers for which it is particularly useful--currently, this is the tinydisplay software renderer. Other kinds of renderers allow you to set this property, but ignore it.
Reimplemented in StereoDisplayRegion.
Definition at line 132 of file drawableRegion.cxx.
References update_pixel_factor().
Referenced by GraphicsWindow::GraphicsWindow().
| bool DrawableRegion::supports_pixel_zoom |
( |
| ) |
const [virtual] |
| void DrawableRegion::update_pixel_factor |
( |
| ) |
[inline, protected] |
The documentation for this class was generated from the following files:
| | |