14 #ifndef DISPLAYREGION_H
15 #define DISPLAYREGION_H
70 INLINE
int get_num_regions()
const;
71 INLINE
void set_num_regions(
int i);
72 INLINE
void get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const;
73 INLINE
void get_dimensions(
int i, PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const;
74 INLINE LVecBase4 get_dimensions(
int i = 0)
const;
75 INLINE PN_stdfloat get_left(
int i = 0)
const;
76 INLINE PN_stdfloat get_right(
int i = 0)
const;
77 INLINE PN_stdfloat get_bottom(
int i = 0)
const;
78 INLINE PN_stdfloat get_top(
int i = 0)
const;
79 INLINE
void set_dimensions(PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t);
80 INLINE
void set_dimensions(
int i, PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t);
81 INLINE
void set_dimensions(
const LVecBase4 &dimensions);
82 virtual void set_dimensions(
int i,
const LVecBase4 &dimensions);
83 MAKE_PROPERTY(dimensions, get_dimensions, set_dimensions);
87 virtual bool is_stereo()
const;
88 MAKE_PROPERTY(window, get_window);
89 MAKE_PROPERTY(pipe, get_pipe);
90 MAKE_PROPERTY(stereo, is_stereo);
92 virtual void set_camera(
const NodePath &camera);
94 MAKE_PROPERTY(camera, get_camera, set_camera);
96 virtual void set_active(
bool active);
97 INLINE
bool is_active()
const;
98 MAKE_PROPERTY(active, is_active, set_active);
100 virtual void set_sort(
int sort);
101 INLINE
int get_sort()
const;
102 MAKE_PROPERTY(sort, get_sort, set_sort);
104 virtual void set_stereo_channel(Lens::StereoChannel stereo_channel);
105 INLINE Lens::StereoChannel get_stereo_channel()
const;
106 MAKE_PROPERTY(stereo_channel, get_stereo_channel, set_stereo_channel);
108 virtual void set_tex_view_offset(
int tex_view_offset);
109 INLINE
int get_tex_view_offset()
const;
110 MAKE_PROPERTY(tex_view_offset, get_tex_view_offset, set_tex_view_offset);
112 virtual void set_incomplete_render(
bool incomplete_render);
113 INLINE
bool get_incomplete_render()
const;
114 MAKE_PROPERTY(incomplete_render, get_incomplete_render, set_incomplete_render);
116 virtual void set_texture_reload_priority(
int texture_reload_priority);
117 INLINE
int get_texture_reload_priority()
const;
118 MAKE_PROPERTY(texture_reload_priority, get_texture_reload_priority,
119 set_texture_reload_priority);
121 void set_lens_index(
int index);
122 INLINE
int get_lens_index()
const;
123 MAKE_PROPERTY(lens_index, get_lens_index, set_lens_index);
127 MAKE_PROPERTY(cull_traverser, get_cull_traverser, set_cull_traverser);
129 INLINE
void set_cube_map_index(
int cube_map_index);
130 virtual void set_target_tex_page(
int page);
131 INLINE
int get_target_tex_page()
const;
132 MAKE_PROPERTY(target_tex_page, get_target_tex_page, set_target_tex_page);
134 INLINE
void set_scissor_enabled(
bool scissor_enabled);
135 INLINE
bool get_scissor_enabled()
const;
136 MAKE_PROPERTY(scissor_enabled, get_scissor_enabled, set_scissor_enabled);
139 INLINE
void clear_cull_callback();
141 MAKE_PROPERTY(cull_callback, get_cull_callback, set_cull_callback);
144 INLINE
void clear_draw_callback();
146 MAKE_PROPERTY(draw_callback, get_draw_callback, set_draw_callback);
148 INLINE
int get_pixel_width(
int i = 0)
const;
149 INLINE
int get_pixel_height(
int i = 0)
const;
150 INLINE LVecBase2i get_pixel_size(
int i = 0)
const;
151 MAKE_PROPERTY(pixel_size, get_pixel_size);
153 virtual void output(std::ostream &out)
const;
155 static Filename make_screenshot_filename(
156 const std::string &prefix =
"screenshot");
157 Filename save_screenshot_default(
const std::string &prefix =
"screenshot");
158 bool save_screenshot(
159 const Filename &filename,
const std::string &image_comment =
"");
160 bool get_screenshot(
PNMImage &image);
163 virtual PT(
PandaNode) make_cull_result_graph();
166 void compute_pixels();
167 void compute_pixels_all_stages();
168 void compute_pixels(
int x_size,
int y_size);
169 void compute_pixels_all_stages(
int x_size,
int y_size);
170 INLINE
void get_pixels(
int &pl,
int &pr,
int &pb,
int &pt)
const;
171 INLINE
void get_pixels(
int i,
int &pl,
int &pr,
int &pb,
int &pt)
const;
172 INLINE
void get_region_pixels(
int &xo,
int &yo,
int &w,
int &h)
const;
173 INLINE
void get_region_pixels(
int i,
int &xo,
int &yo,
int &w,
int &h)
const;
174 INLINE
void get_region_pixels_i(
int &xo,
int &yo,
int &w,
int &h)
const;
175 INLINE
void get_region_pixels_i(
int i,
int &xo,
int &yo,
int &w,
int &h)
const;
187 INLINE
const std::string &get_debug_name()
const;
192 LVecBase4 _dimensions;
194 LVecBase4i _pixels_i;
196 typedef epvector<Region> Regions;
201 void win_display_regions_changed();
202 void do_compute_pixels(
int i,
int x_size,
int y_size, CData *cdata);
203 void set_active_index(
int index);
214 bool _incomplete_render;
215 int _texture_reload_priority;
224 class EXPCL_PANDA_DISPLAY CData :
public CycleData {
227 CData(
const CData ©);
231 return DisplayRegion::get_class_type();
243 Lens::StereoChannel _stereo_channel;
244 int _tex_view_offset;
245 int _target_tex_page;
246 bool _scissor_enabled;
263 class EXPCL_PANDA_DISPLAY CDataCull :
public CycleData {
266 CDataCull(
const CDataCull ©);
270 return DisplayRegion::get_class_type();
282 std::string _debug_name;
288 static void init_type() {
289 TypedReferenceCount::init_type();
291 TypedReferenceCount::get_class_type());
294 return get_class_type();
296 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
322 INLINE
Thread *get_current_thread()
const;
326 INLINE
int get_num_regions()
const;
327 INLINE
void get_dimensions(PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const;
328 INLINE
void get_dimensions(
int i, PN_stdfloat &l, PN_stdfloat &r, PN_stdfloat &b, PN_stdfloat &t)
const;
329 INLINE
const LVecBase4 &get_dimensions(
int i = 0)
const;
330 INLINE PN_stdfloat get_left(
int i = 0)
const;
331 INLINE PN_stdfloat get_right(
int i = 0)
const;
332 INLINE PN_stdfloat get_bottom(
int i = 0)
const;
333 INLINE PN_stdfloat get_top(
int i = 0)
const;
339 INLINE
bool is_active()
const;
340 INLINE
int get_sort()
const;
341 INLINE Lens::StereoChannel get_stereo_channel()
const;
342 INLINE
int get_tex_view_offset();
343 INLINE
bool get_clear_depth_between_eyes()
const;
344 INLINE
int get_target_tex_page()
const;
345 INLINE
bool get_scissor_enabled()
const;
348 INLINE
void get_pixels(
int &pl,
int &pr,
int &pb,
int &pt)
const;
349 INLINE
void get_pixels(
int i,
int &pl,
int &pr,
int &pb,
int &pt)
const;
350 INLINE
void get_region_pixels(
int &xo,
int &yo,
int &w,
int &h)
const;
351 INLINE
void get_region_pixels(
int i,
int &xo,
int &yo,
int &w,
int &h)
const;
352 INLINE
void get_region_pixels_i(
int &xo,
int &yo,
int &w,
int &h)
const;
353 INLINE
void get_region_pixels_i(
int i,
int &xo,
int &yo,
int &w,
int &h)
const;
355 INLINE
int get_pixel_width(
int i = 0)
const;
356 INLINE
int get_pixel_height(
int i = 0)
const;
358 INLINE
int get_lens_index()
const;
363 const DisplayRegion::CData *_cdata;
369 static void init_type() {
377 INLINE std::ostream &operator << (std::ostream &out,
const DisplayRegion &dr);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic object that can be assigned to a callback at various points in the rendering proces...
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
This defines the abstract interface for an object that receives Geoms identified by the CullTraverser...
This stores the result of a BinCullHandler traversal: an ordered collection of CullBins,...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read(...
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This class is similar to CycleDataWriter, except it allows writing to a particular stage of the pipel...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
A single page of data maintained by a PipelineCycler.
This specialization on CallbackData is passed when the callback is initiated from the cull traversal,...
Encapsulates the data from a DisplayRegion, pre-fetched for one stage of the pipeline.
A rectangular subregion within a window for rendering into.
This is a base class for GraphicsWindow (actually, GraphicsOutput) and DisplayRegion,...
virtual bool supports_pixel_zoom() const
Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.
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,...
The name of a file, such as a texture file or an Egg file.
This class is the main interface to controlling the render process.
This is a base class for the various different classes that represent the result of a frame of render...
An object to create GraphicsOutputs that share a particular 3-D API.
Encapsulates all the communication with a particular instance of a given rendering backend.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
A lightweight class that represents a single element that may be timed and/or counted via stats.
A basic node of the scene graph or data graph.
This object holds the camera position, etc., and other general setup information for rendering a part...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.