30 CDReader cdata(_cycler);
31 return cdata->_lens_index;
39 CDReader cdata(_cycler);
40 return cdata->_regions.size();
52 CDWriter cdata(_cycler);
53 cdata->_regions.resize(i);
61get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const {
70get_dimensions(
int i, PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const {
71 CDReader cdata(_cycler);
72 const Region ®ion = cdata->_regions[i];
73 l = region._dimensions[0];
74 r = region._dimensions[1];
75 b = region._dimensions[2];
76 t = region._dimensions[3];
85 CDReader cdata(_cycler);
86 return cdata->_regions[i]._dimensions;
95 CDReader cdata(_cycler);
96 return cdata->_regions[i]._dimensions[0];
105 CDReader cdata(_cycler);
106 return cdata->_regions[i]._dimensions[1];
115 CDReader cdata(_cycler);
116 return cdata->_regions[i]._dimensions[2];
125 CDReader cdata(_cycler);
126 return cdata->_regions[i]._dimensions[3];
135set_dimensions(PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t) {
145set_dimensions(
int i, PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t) {
174 CDReader cdata(_cycler, current_thread);
175 return cdata->_camera;
183 CDReader cdata(_cycler);
184 return cdata->_active;
192 CDReader cdata(_cycler);
203 CDReader cdata(_cycler);
204 return cdata->_stereo_channel;
217 CDReader cdata(_cycler);
218 return cdata->_tex_view_offset;
226 return _incomplete_render;
235 return _texture_reload_priority;
253 CDReader cdata(_cycler);
254 return cdata->_target_tex_page;
263 CDWriter cdata(_cycler);
264 cdata->_scissor_enabled = scissor_enabled;
273 CDReader cdata(_cycler);
274 return cdata->_scissor_enabled;
300 CDWriter cdata(_cycler);
301 cdata->_cull_callback = object;
317 CDReader cdata(_cycler);
318 return cdata->_cull_callback;
348 CDWriter cdata(_cycler);
349 cdata->_draw_callback = object;
365 CDReader cdata(_cycler);
366 return cdata->_draw_callback;
374 CDReader cdata(_cycler);
375 return cdata->_regions[i]._pixels[1] - cdata->_regions[i]._pixels[0];
383 CDReader cdata(_cycler);
384 return cdata->_regions[i]._pixels[3] - cdata->_regions[i]._pixels[2];
392 CDReader cdata(_cycler);
393 return LVecBase2i(cdata->_regions[i]._pixels[1] - cdata->_regions[i]._pixels[0],
394 cdata->_regions[i]._pixels[3] - cdata->_regions[i]._pixels[2]);
402get_pixels(
int &pl,
int &pr,
int &pb,
int &pt)
const {
411get_pixels(
int i,
int &pl,
int &pr,
int &pb,
int &pt)
const {
412 CDReader cdata(_cycler);
413 const Region ®ion = cdata->_regions[i];
414 pl = region._pixels[0];
415 pr = region._pixels[1];
416 pb = region._pixels[2];
417 pt = region._pixels[3];
437 CDReader cdata(_cycler);
438 const Region ®ion = cdata->_regions[i];
439 xo = region._pixels[0];
440 yo = region._pixels[2];
441 w = region._pixels[1] - xo;
442 h = region._pixels[3] - yo;
462 CDReader cdata(_cycler);
463 const Region ®ion = cdata->_regions[i];
464 xo = region._pixels_i[0];
465 yo = region._pixels_i[3];
466 w = region._pixels_i[1] - xo;
467 h = region._pixels_i[2] - yo;
481 CDCullWriter cdata(_cycler_cull,
true, current_thread);
482 cdata->_cull_result = std::move(cull_result);
483 cdata->_scene_setup = std::move(scene_setup);
493 CDCullReader cdata(_cycler_cull, current_thread);
494 return cdata->_cull_result;
504 CDCullReader cdata(_cycler_cull, current_thread);
505 return cdata->_scene_setup;
514 return _cull_region_pcollector;
523 return _draw_region_pcollector;
537INLINE DisplayRegion::Region::
539 _dimensions(0, 1, 0, 1),
547INLINE DisplayRegion::CDataCull::
554INLINE DisplayRegion::CDataCull::
555CDataCull(
const DisplayRegion::CDataCull ©) :
556 _cull_result(copy._cull_result),
557 _scene_setup(copy._scene_setup)
564INLINE DisplayRegionPipelineReader::
567 _current_thread(current_thread),
568 _cdata(object->_cycler.read(current_thread))
571 nassertv(_object->test_ref_count_nonzero());
573 nassertv(_cdata->test_ref_count_nonzero());
581INLINE DisplayRegionPipelineReader::
582~DisplayRegionPipelineReader() {
584 nassertv(_object->test_ref_count_nonzero());
586 nassertv(_cdata->test_ref_count_nonzero());
589 _object->_cycler.release_read(_cdata);
608INLINE
Thread *DisplayRegionPipelineReader::
609get_current_thread()
const {
610 return _current_thread;
616INLINE
bool DisplayRegionPipelineReader::
617is_any_clear_active()
const {
618 return _object->is_any_clear_active();
626 return _cdata->_regions.size();
634get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const {
643get_dimensions(
int i, PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const {
645 l = region._dimensions[0];
646 r = region._dimensions[1];
647 b = region._dimensions[2];
648 t = region._dimensions[3];
657 return _cdata->_regions[i]._dimensions;
666 return _cdata->_regions[i]._dimensions[0];
675 return _cdata->_regions[i]._dimensions[1];
684 return _cdata->_regions[i]._dimensions[2];
693 return _cdata->_regions[i]._dimensions[3];
702 return _object->_window;
711 return _cdata->_camera;
719 return _cdata->_active;
727 return _cdata->_sort;
737 return _cdata->_stereo_channel;
750 return _cdata->_tex_view_offset;
760 return _cdata->_target_tex_page;
769 return _cdata->_scissor_enabled;
777 return _cdata->_draw_callback;
785get_pixels(
int &pl,
int &pr,
int &pb,
int &pt)
const {
794get_pixels(
int i,
int &pl,
int &pr,
int &pb,
int &pt)
const {
796 pl = region._pixels[0];
797 pr = region._pixels[1];
798 pb = region._pixels[2];
799 pt = region._pixels[3];
820 xo = region._pixels[0];
821 yo = region._pixels[2];
822 w = region._pixels[1] - xo;
823 h = region._pixels[3] - yo;
844 xo = region._pixels_i[0];
845 yo = region._pixels_i[3];
846 w = region._pixels_i[1] - xo;
847 h = region._pixels_i[2] - yo;
855 return _cdata->_regions[i]._pixels[1] - _cdata->_regions[i]._pixels[0];
863 return _cdata->_lens_index;
871 return _cdata->_regions[i]._pixels[3] - _cdata->_regions[i]._pixels[2];
This is a generic object that can be assigned to a callback at various points in the rendering proces...
This stores the result of a BinCullHandler traversal: an ordered collection of CullBins,...
int get_target_tex_page() const
Returns the target page number associated with this particular DisplayRegion, or -1 if it is not asso...
PN_stdfloat get_left(int i=0) const
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.
GraphicsOutput * get_window() const
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no windo...
int get_sort() const
Returns the sort value associated with the DisplayRegion.
void get_region_pixels(int &xo, int &yo, int &w, int &h) const
Retrieves the coordinates of the DisplayRegion within its window, as the pixel location of its bottom...
PN_stdfloat get_bottom(int i=0) const
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.
int get_lens_index() const
Gets the index into a lens_node lens array.
PN_stdfloat get_top(int i=0) const
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.
CallbackObject * get_draw_callback() const
Returns the CallbackObject set by set_draw_callback().
void get_pixels(int &pl, int &pr, int &pb, int &pt) const
Retrieves the coordinates of the DisplayRegion within its window, in pixels.
NodePath get_camera() const
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associate...
bool is_active() const
Returns the active flag associated with the DisplayRegion.
bool get_scissor_enabled() const
Returns whether or not scissor testing is enabled for this region.
void get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t) const
Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput.
int get_pixel_width(int i=0) const
Returns the width of the DisplayRegion in pixels.
int get_pixel_height(int i=0) const
Returns the height of the DisplayRegion in pixels.
int get_tex_view_offset()
Returns the current texture view offset for this DisplayRegion.
Lens::StereoChannel get_stereo_channel() const
Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair,...
void get_region_pixels_i(int &xo, int &yo, int &w, int &h) const
Similar to get_region_pixels(), but returns the upper left corner, and the pixel numbers are numbered...
PN_stdfloat get_right(int i=0) const
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.
int get_num_regions() const
Returns the number of regions, see set_num_regions.
A rectangular subregion within a window for rendering into.
get_incomplete_render
Returns the incomplete_render flag.
void clear_draw_callback()
Removes the callback set by an earlier call to set_draw_callback().
CullResult * get_cull_result(Thread *current_thread) const
Returns the CullResult value that was stored on this DisplayRegion, presumably by the last successful...
PN_stdfloat get_left(int i=0) const
Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.
PN_stdfloat get_bottom(int i=0) const
Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.
void set_cull_result(PointerTo< CullResult > cull_result, PointerTo< SceneSetup > scene_setup, Thread *current_thread)
Stores the result of performing a cull operation on this DisplayRegion.
set_target_tex_page
This is a special parameter that is only used when rendering the faces of a cube map or multipage and...
PStatCollector & get_draw_region_pcollector()
Returns a PStatCollector for timing the draw operation for just this DisplayRegion.
PStatCollector & get_cull_region_pcollector()
Returns a PStatCollector for timing the cull operation for just this DisplayRegion.
get_texture_reload_priority
Returns the priority which is assigned to asynchronous texture reload requests.
get_dimensions
Retrieves the coordinates of the DisplayRegion's rectangle within its GraphicsOutput.
bool operator<(const DisplayRegion &other) const
Returns true if this DisplayRegion should be sorted before the other one, false otherwise.
is_active
Returns the active flag associated with the DisplayRegion.
void get_pixels(int &pl, int &pr, int &pb, int &pt) const
Retrieves the coordinates of the DisplayRegion within its window, in pixels.
get_lens_index
Returns the specific lens of the associated Camera that will be used for rendering this scene.
int get_pixel_height(int i=0) const
Returns the height of the DisplayRegion in pixels.
get_camera
Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associate...
const std::string & get_debug_name() const
Returns a unique name used for debugging.
get_window
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no windo...
set_cull_callback
Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull trave...
get_scissor_enabled
Returns whether or not scissor testing is enabled for this region.
get_stereo_channel
Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair,...
get_target_tex_page
Returns the target page number associated with this particular DisplayRegion, or -1 if it is not asso...
get_sort
Returns the sort value associated with the DisplayRegion.
int get_num_regions() const
Returns the number of regions, see set_num_regions.
void set_cube_map_index(int cube_map_index)
Deprecated; replaced by set_target_tex_page().
SceneSetup * get_scene_setup(Thread *current_thread) const
Returns the SceneSetup value that was stored on this DisplayRegion, presumably by the last successful...
void get_region_pixels(int &xo, int &yo, int &w, int &h) const
Retrieves the coordinates of the DisplayRegion within its window, as the pixel location of its bottom...
PN_stdfloat get_right(int i=0) const
Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.
get_cull_callback
Returns the CallbackObject set by set_cull_callback().
get_tex_view_offset
Returns the current texture view offset for this DisplayRegion.
set_dimensions
Changes the portion of the framebuffer this DisplayRegion corresponds to.
void set_num_regions(int i)
Sets the number of regions that this DisplayRegion indicates.
set_scissor_enabled
Sets whether or not scissor testing is enabled for this region.
int get_pixel_width(int i=0) const
Returns the width of the DisplayRegion in pixels.
PN_stdfloat get_top(int i=0) const
Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.
set_draw_callback
Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the ...
void clear_cull_callback()
Removes the callback set by an earlier call to set_cull_callback().
get_draw_callback
Returns the CallbackObject set by set_draw_callback().
get_pixel_size
Returns the size of the DisplayRegion in pixels.
void get_region_pixels_i(int &xo, int &yo, int &w, int &h) const
Similar to get_region_pixels(), but returns the upper left corner, and the pixel numbers are numbered...
This is a base class for the various different classes that represent the result of a frame of render...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A lightweight class that represents a single element that may be timed and/or counted via stats.
This object holds the camera position, etc., and other general setup information for rendering a part...
A thread; that is, a lightweight process.