Panda3D
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

eglGraphicsWindow Class Reference

An interface to the egl system for managing GLES windows under X. More...

#include "eglGraphicsWindow.h"

Inheritance diagram for eglGraphicsWindow:
GraphicsWindow GraphicsOutput GraphicsOutputBase DrawableRegion TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase

List of all members.

Classes

struct  MouseDeviceInfo

Public Types

enum  FrameMode { FM_render, FM_parasite, FM_refresh }
enum  RenderTextureMode {
  RTM_none, RTM_bind_or_copy, RTM_copy_texture, RTM_copy_ram,
  RTM_triggered_copy_texture, RTM_triggered_copy_ram
}
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

 eglGraphicsWindow (GraphicsEngine *engine, GraphicsPipe *pipe, const string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg, GraphicsOutput *host)
void add_render_texture (Texture *tex, RenderTextureMode mode, RenderTexturePlane bitplane=RTP_COUNT)
 Creates a new Texture object, suitable for rendering the contents of this buffer into, and appends it to the list of render textures.
virtual ReferenceCountas_reference_count ()
 Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
virtual void begin_flip ()
 This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers.
virtual bool begin_frame (FrameMode mode, Thread *current_thread)
 This function will be called within the draw thread before beginning rendering for a given frame.
void change_scenes (DisplayRegionPipelineReader *new_dr)
 Called by the GraphicsEngine when the window is about to change to another DisplayRegion.
void clear (Thread *current_thread)
 Clears the entire framebuffer before rendering, according to the settings of get_color_clear_active() and get_depth_clear_active() (inherited from DrawableRegion).
void clear_child_sort ()
 Resets the sort value of future offscreen buffers created by make_texture_sort() to the default value.
void clear_delete_flag ()
 Resets the delete flag, so the GraphicsOutput will not be automatically deleted before the beginning of the next frame.
virtual void clear_pipe ()
 Sets the window's _pipe pointer to NULL; this is generally called only as a precursor to deleting the window.
void clear_rejected_properties ()
 Empties the set of failed properties that will be returned by get_rejected_properties().
void clear_render_textures ()
 If the GraphicsOutput is currently rendering to a texture, then all textures are dissociated from the GraphicsOuput.
virtual void close_ime ()
 Forces the ime window to close if any.
virtual int complete_pointers (TypedWritable **p_list, BamReader *manager)
 Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
void copy_clear_settings (const DrawableRegion &copy)
 Copies only the clear settings from the other drawable region.
int count_textures () const
 If the GraphicsOutput is set to render into a texture, returns the number of textures that are being rendered into.
virtual void disable_clears ()
 Disables both the color and depth clear.
void disable_pointer_events (int device)
 Turn off the generation of pointer events.
void disable_pointer_mode (int device)
 See GraphicsWindowInputDevice::disable_pointer_mode.
void enable_pointer_events (int device)
 Turn on the generation of pointer events.
void enable_pointer_mode (int device, double speed)
 See GraphicsWindowInputDevice::enable_pointer_mode.
string encode_to_bam_stream () const
 Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string.
bool encode_to_bam_stream (string &data, BamWriter *writer=NULL) const
 Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
virtual void end_flip ()
 This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers.
virtual void end_frame (FrameMode mode, Thread *current_thread)
 This function will be called within the draw thread after rendering is completed for a given frame.
virtual void fillin (DatagramIterator &scan, BamReader *manager)
 This internal function is intended to be called by each class's make_from_bam() method to read in all of the relevant data from the BamFile for the new object.
virtual void finalize (BamReader *manager)
 Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
bool flip_ready () const
 Returns true if a frame has been rendered and needs to be flipped, false otherwise.
virtual TypeHandle force_init_type ()
UpdateSeq get_bam_modified () const
 Returns the current bam_modified counter.
int get_best_parent_from_Set (const std::set< int > &) const
ButtonEvent get_button_event (int device)
 Assuming a previous call to has_button_event() returned true, this returns the pending button event.
int get_child_sort () const
 Returns the sort value of future offscreen buffers created by make_texture_sort().
virtual bool get_clear_active (int n) const
 Gets the clear-active flag for any bitplane.
const Colorfget_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 Colorfget_clear_value (int n) const
 Returns the clear value for any bitplane.
string get_close_request_event () const
 Returns the name of the event set via set_close_request_event().
PStatCollectorget_cull_window_pcollector ()
 Returns a PStatCollector for timing the cull operation for just this GraphicsOutput.
bool get_delete_flag () const
 Returns the current setting of the delete flag.
int get_draw_buffer_type () const
 Returns the RenderBuffer into which the GSG should issue draw commands.
PStatCollectorget_draw_window_pcollector ()
 Returns a PStatCollector for timing the draw operation for just this GraphicsOutput.
GraphicsEngineget_engine () const
 Returns the graphics engine that created this output.
const FrameBufferPropertiesget_fb_properties () const
 Returns the framebuffer properties of the window.
int get_fb_x_size () const
 Returns the internal width of the window or buffer.
int get_fb_y_size () const
 Returns the internal height of the window or buffer.
GraphicsStateGuardianget_gsg () const
 Returns the GSG that is associated with this window.
virtual GraphicsOutputget_host ()
 This is normally called only from within make_texture_buffer().
string get_input_device_name (int device) const
 Returns the name of the nth input device.
bool get_inverted () const
 Returns the current setting of the inverted flag.
unsigned int get_left_eye_color_mask () const
 Returns the color mask in effect when rendering a left-eye view in red_blue stereo mode.
const string & get_name () const
 Returns the name that was passed to the GraphicsOutput constructor.
int get_num_active_display_regions () const
 Returns the number of active DisplayRegions that have been created within the window.
int get_num_display_regions () const
 Returns the number of DisplayRegions that have been created within the window, active or otherwise.
int get_num_input_devices () const
 Returns the number of separate input devices associated with the window.
bool get_one_shot () const
 Returns the current setting of the one-shot flag.
GraphicsPipeget_pipe () const
 Returns the GraphicsPipe that this window is associated with.
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.
MouseData get_pointer (int device) const
 Returns the MouseData associated with the nth input device's pointer.
const WindowProperties get_properties () const
 Returns the current properties of the window.
bool get_red_blue_stereo () const
 Returns whether red-blue stereo mode is in effect for this particular window.
int get_ref_count () const
 Returns the current reference count.
WindowProperties get_rejected_properties () const
 Returns the set of properties that have recently been requested, but could not be applied to the window for some reason.
const WindowProperties get_requested_properties () const
 Returns the properties of the window that are currently requested.
unsigned int get_right_eye_color_mask () const
 Returns the color mask in effect when rendering a right-eye view in red_blue stereo mode.
RenderTextureMode get_rtm_mode (int i=0) const
 Returns the RenderTextureMode associated with the nth render-texture.
bool get_screenshot (PNMImage &image)
 Captures the most-recently rendered image from the framebuffer into the indicated PNMImage.
int get_screenshot_buffer_type () const
 Returns the RenderBuffer that should be used for capturing screenshots from this particular DrawableRegion.
int get_sort () const
 Returns the sorting order of this particular GraphicsOutput.
virtual Textureget_texture (int i=0) const
 Returns the nth texture into which the GraphicsOutput renders.
NodePath get_texture_card ()
 Returns a PandaNode containing a square polygon.
RenderTexturePlane get_texture_plane (int i=0) const
 Returns the RenderTexturePlane associated with the nth render-texture.
virtual TypeHandle get_type () const
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object.
string get_window_event () const
 Returns the name of the event that is generated when this window is modified externally, e.g.
WindowHandleget_window_handle () const
 Returns the WindowHandle corresponding to this window on the desktop.
int get_x_size () const
 Returns the visible width of the window or buffer, if it is known.
Window get_xwindow () const
 Returns the X11 Window handle.
int get_y_size () const
 Returns the visible height of the window or buffer, if it is known.
bool has_button_event (int device) const
 Returns true if the indicated device has a pending button event (a mouse button or keyboard button down/up), false otherwise.
bool has_keyboard (int device) const
 Returns true if the nth input device has a keyboard, false otherwise.
bool has_pointer (int device) const
 Returns true if the nth input device has a screen-space pointer (for instance, a mouse), false otherwise.
bool has_pointer_event (int device) const
 Returns true if the indicated device has a pending pointer event (a mouse movement).
bool has_size () const
 Returns true if the size of the window/frame buffer is known, false otherwise.
bool has_texture () const
 Returns true if the GraphicsOutput is rendering into any textures at all.
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
virtual bool is_active () const
 Returns true if the window is ready to be rendered into, false otherwise.
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.
bool is_closed () const
 Returns true if the window has not yet been opened, or has been fully closed, false if it is open.
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
bool is_fullscreen () const
 Returns true if the window has been opened as a fullscreen window, false otherwise.
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
bool is_stereo () const
 Returns Returns true if this window can render stereo DisplayRegions, either through red-blue stereo (see set_red_blue_stereo()) or through true hardware stereo rendering.
bool is_valid () const
 Returns true if the output is fully created and ready for rendering, false otherwise.
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
GraphicsOutputmake_cube_map (const string &name, int size, NodePath &camera_rig, DrawMask camera_mask=PandaNode::get_all_camera_mask(), bool to_ram=false, FrameBufferProperties *fbp=NULL)
 This is similar to make_texture_buffer() in that it allocates a separate buffer suitable for rendering to a texture that can be assigned to geometry in this window, but in this case, the buffer is set up to render the six faces of a cube map.
DisplayRegionmake_display_region (float l, float r, float b, float t)
 Creates a new DisplayRegion that covers the indicated sub-rectangle within the window.
DisplayRegionmake_display_region ()
 Creates a new DisplayRegion that covers the entire window.
DisplayRegionmake_mono_display_region (float l, float r, float b, float t)
 Creates a new DisplayRegion that covers the indicated sub-rectangle within the window.
DisplayRegionmake_mono_display_region ()
 Creates a new DisplayRegion that covers the entire window.
 MAKE_SEQ (get_input_device_names, get_num_input_devices, get_input_device_name)
 MAKE_SEQ (get_display_regions, get_num_display_regions, get_display_region)
 MAKE_SEQ (get_active_display_regions, get_num_active_display_regions, get_active_display_region)
StereoDisplayRegionmake_stereo_display_region (float l, float r, float b, float t)
 Creates a new DisplayRegion that covers the indicated sub-rectangle within the window.
StereoDisplayRegionmake_stereo_display_region ()
 Creates a new DisplayRegion that covers the entire window.
GraphicsOutputmake_texture_buffer (const string &name, int x_size, int y_size, Texture *tex=NULL, bool to_ram=false, FrameBufferProperties *fbp=NULL)
 Creates and returns an offscreen buffer for rendering into, the result of which will be a texture suitable for applying to geometry within the scene rendered into this window.
void mark_bam_modified ()
 Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.
virtual bool move_pointer (int device, int x, int y)
 Forces the pointer to the indicated position within the window, if possible.
void operator delete (void *ptr)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete (void *ptr, void *)
void operator delete[] (void *ptr)
void operator delete[] (void *ptr)
void operator delete[] (void *, void *)
void operator delete[] (void *, void *)
void * operator new (size_t size)
void * operator new (size_t size)
void * operator new (size_t size, void *ptr)
void * operator new (size_t size, void *ptr)
void * operator new[] (size_t size)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size)
bool operator< (const GraphicsOutput &other) const
 The sorting operator is used to order the GraphicsOutput object in order by their sort number, so that they will render in the correct order in the GraphicsEngine.
virtual void process_events ()
 Do whatever processing is necessary to ensure that the window responds to user events.
 PT (PointerEventList) get_pointer_events(int device)
 PT (DisplayRegion) get_display_region(int n) const
void ref () const
 Explicitly increments the reference count.
void remove_all_display_regions ()
 Removes all display regions from the window, except the default one that is created with the window.
bool remove_display_region (DisplayRegion *display_region)
 Removes the indicated DisplayRegion from the window, and destructs it if there are no other references.
virtual void request_close ()
 This is called by the GraphicsEngine to request that the window (or whatever) close itself or, in general, make itself invalid, at the next call to process_events().
virtual void request_open ()
 This is called by the GraphicsEngine to request that the window (or whatever) open itself or, in general, make itself valid, at the next call to process_events().
void request_properties (const WindowProperties &requested_properties)
 Requests a property change on the window.
virtual bool require_fully_complete () const
 Some objects require all of their nested pointers to have been completed before the objects themselves can be completed.
bool save_screenshot (const Filename &filename, const string &image_comment="")
 Saves a screenshot of the region to the indicated filename.
Filename save_screenshot_default (const string &prefix="screenshot")
 Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.
virtual void select_cube_map (int cube_map_index)
 Called internally when the window is in render-to-a-texture mode and we are in the process of rendering the six faces of a cube map.
void set_active (bool active)
 Sets the active flag associated with the GraphicsOutput.
void set_child_sort (int child_sort)
 Specifies the sort value of future offscreen buffers created by make_texture_sort().
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_close_now ()
 This is called by the GraphicsEngine to insist that the window be closed immediately.
void set_close_request_event (const string &close_request_event)
 Sets the event that is triggered when the user requests to close the window, e.g.
void set_inverted (bool inverted)
 Changes the current setting of the inverted flag.
void set_one_shot (bool one_shot)
 Changes the current setting of the one-shot flag.
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 void set_properties_now (WindowProperties &properties)
 Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status.
void set_red_blue_stereo (bool red_blue_stereo, unsigned int left_eye_color_mask, unsigned int right_eye_color_mask)
 Enables red-blue stereo mode on this particular window.
void set_size_and_recalc (int x, int y)
 Changes the x_size and y_size, then recalculates structures that depend on size.
virtual void set_sort (int sort)
 Adjusts the sorting order of this particular GraphicsOutput, relative to other GraphicsOutputs.
void set_window_event (const string &window_event)
 Changes the name of the event that is generated when this window is modified externally, e.g.
void setup_render_texture (Texture *tex, bool allow_bind, bool to_ram)
 This is a deprecated interface that made sense back when GraphicsOutputs could only render into one texture at a time.
virtual bool share_depth_buffer (GraphicsOutput *graphics_output)
 Will attempt to use the depth buffer of the input graphics_output.
virtual bool supports_pixel_zoom () const
 Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
void trigger_copy ()
 When the GraphicsOutput is in triggered copy mode, this function triggers the copy (at the end of the next frame).
virtual bool unref () const
 Explicitly decrements the reference count.
virtual void unshare_depth_buffer ()
 Discontinue sharing the depth buffer.
virtual void update_bam_nested (BamWriter *manager)
 Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates.
virtual int verify_window_sizes (int numsizes, int *dimen)
 Determines which of the indicated window sizes are supported by available hardware (e.g.
void weak_ref (WeakPointerToVoid *ptv)
 Adds the indicated PointerToVoid as a weak reference to this object.
void weak_unref (WeakPointerToVoid *ptv)
 Removes the indicated PointerToVoid as a weak reference to this object.
virtual void write_datagram (BamWriter *manager, Datagram &dg)
 Writes the contents of this object to the datagram for shipping out to a Bam file.

Static Public Member Functions

static bool decode_raw_from_bam_stream (TypedWritable *&ptr, ReferenceCount *&ref_ptr, const string &data, BamReader *reader=NULL)
 Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string.
static TypeHandle get_class_type ()
static int get_renderbuffer_type (int plane)
 Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane.
static void init_type ()
static Filename make_screenshot_filename (const string &prefix="screenshot")
 Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.
static PT (TypedWritableReferenceCount) decode_from_bam_stream(const string &data

Public Attributes

static BamReaderreader = NULL)

Static Public Attributes

static TypedWritable *const Null = (TypedWritable*)0L

Protected Types

typedef pvector< DisplayRegion * > ActiveDisplayRegions
typedef
vector_GraphicsWindowInputDevice 
InputDevices
typedef pvector< PT(DisplayRegion) > TotalDisplayRegions

Protected Member Functions

void add_input_device (const GraphicsWindowInputDevice &device)
 Adds a GraphicsWindowInputDevice to the vector.
void begin_frame_spam (FrameMode mode)
 Display the spam message associated with begin_frame.
void clear_cube_map_selection ()
 Clear the variables that select a cube-map face.
virtual void close_window ()
 Closes the window right now.
bool copy_to_textures ()
 For all textures marked RTM_copy_texture, RTM_copy_ram, RTM_triggered_copy_texture, or RTM_triggered_copy_ram, do the necessary copies.
virtual bool do_reshape_request (int x_origin, int y_origin, bool has_origin, int x_size, int y_size)
 Called from the window thread in response to a request from within the code (via request_properties()) to change the size and/or position of the window.
bool do_test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool do_test_ref_count_nonzero () const
 Returns true if the reference count is nonzero, false otherwise.
void end_frame_spam (FrameMode mode)
 Display the spam message associated with end_frame.
virtual void mouse_mode_absolute ()
 reattaches mouse to location
virtual void mouse_mode_relative ()
 detaches mouse.
virtual bool open_window ()
 Opens the window right now.
virtual void pixel_factor_changed ()
 Called internally when the pixel factor changes.
void prepare_for_deletion ()
 Set the delete flag, and do the usual cleanup activities associated with that.
 PT (Geom) _texture_card
 PT (WindowHandle) _parent_window_handle
 PT (GraphicsPipe) _pipe
 PT (GraphicsStateGuardian) _gsg
 PT (DisplayRegion) _default_display_region
 PT (WindowHandle) _window_handle
 PT (GraphicsOutput) _host
virtual void reset_window (bool swapchain)
 resets the window framebuffer from its derived children.
void system_changed_properties (const WindowProperties &properties)
 Should be called (from within the window thread) when process_events() detects an external change in some important window property; for instance, when the user resizes the window.
void system_changed_size (int x_size, int y_size)
 An internal function to update all the DisplayRegions with the new size of the window.
void trigger_flip ()
 Set the flip_ready flag, only if legal to do so.
void update_pixel_factor ()
 Internal function to reset pixel_factor after it may have changed.

Protected Attributes

bool _active
ActiveDisplayRegions _active_display_regions
int _creation_flags
DisplayRegion_cube_map_dr
int _cube_map_index
PStatCollector _cull_window_pcollector
bool _delete_flag
bool _display_regions_stale
int _draw_buffer_type
PStatCollector _draw_window_pcollector
GraphicsEngine_engine
FrameBufferProperties _fb_properties
bool _flip_ready
bool _has_size
pvector< WPT(Texture)> _hold_textures
InputDevices _input_devices
LightMutex _input_lock
bool _inverted
bool _is_valid
unsigned int _left_eye_color_mask
LightMutex _lock
string _name
bool _one_shot
WindowProperties _properties
bool _red_blue_stereo
unsigned int _right_eye_color_mask
int _screenshot_buffer_type
bool _stereo
pvector< RenderTexture_textures
TotalDisplayRegions _total_display_regions
bool _trigger_copy
int _x_size
int _y_size

Static Protected Attributes

static PStatCollector _copy_texture_pcollector
static PStatCollector _cull_pcollector
static PStatCollector _draw_pcollector
static PStatCollector _make_current_pcollector

Detailed Description

An interface to the egl system for managing GLES windows under X.

Definition at line 31 of file eglGraphicsWindow.h.


Member Function Documentation

void GraphicsWindow::add_input_device ( const GraphicsWindowInputDevice device) [inline, protected, inherited]

Adds a GraphicsWindowInputDevice to the vector.

Definition at line 65 of file graphicsWindow.I.

Referenced by x11GraphicsWindow::open_raw_mice().

void GraphicsOutput::add_render_texture ( Texture tex,
RenderTextureMode  mode,
RenderTexturePlane  plane = RTP_COUNT 
) [inherited]

Creates a new Texture object, suitable for rendering the contents of this buffer into, and appends it to the list of render textures.

If tex is not NULL, it is the texture that will be set up for rendering into; otherwise, a new Texture object will be created, in which case you may call get_texture() to retrieve the new texture pointer.

You can specify a bitplane to attach the texture to. the legal choices are:

RTP_depth RTP_depth_stencil RTP_color RTP_aux_rgba_0 RTP_aux_rgba_1 RTP_aux_rgba_2 RTP_aux_rgba_3

If you do not specify a bitplane to attach the texture to, this routine will use a default based on the texture's format:

F_depth_component attaches to RTP_depth F_depth_stencil attaches to RTP_depth_stencil all other formats attach to RTP_color.

The texture's format will be changed to match the format of the bitplane to which it is attached. For example, if you pass in an F_rgba texture and order that it be attached to RTP_depth_stencil, it will turn into an F_depth_stencil texture.

Also see make_texture_buffer(), which is a higher-level interface for preparing render-to-a-texture mode.

Definition at line 268 of file graphicsOutput.cxx.

References Texture::clear_ram_image(), Texture::get_format(), GraphicsOutput::get_name(), GraphicsOutput::get_x_size(), GraphicsOutput::get_y_size(), Texture::set_compression(), Texture::set_format(), Texture::set_match_framebuffer_format(), Texture::set_render_to_texture(), and Texture::set_size_padded().

Referenced by GraphicsOutput::make_texture_buffer(), and GraphicsOutput::setup_render_texture().

ReferenceCount * TypedWritableReferenceCount::as_reference_count ( ) [virtual, inherited]

Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.

Reimplemented from TypedWritable.

Definition at line 26 of file typedWritableReferenceCount.cxx.

TypedObject * TypedObject::as_typed_object ( ) [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 99 of file typedObject.I.

const TypedObject * TypedObject::as_typed_object ( ) const [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 110 of file typedObject.I.

void eglGraphicsWindow::begin_flip ( ) [virtual]

This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers.

This should instruct the window to prepare for the flip at the next video sync, but it should not wait.

We have the two separate functions, begin_flip() and end_flip(), to make it easier to flip all of the windows at the same time.

Reimplemented from GraphicsOutput.

Definition at line 234 of file eglGraphicsWindow.cxx.

bool eglGraphicsWindow::begin_frame ( FrameMode  mode,
Thread current_thread 
) [virtual]

This function will be called within the draw thread before beginning rendering for a given frame.

It should do whatever setup is required, and return true if the frame should be rendered, or false if it should be skipped.

Reimplemented from GraphicsOutput.

Definition at line 143 of file eglGraphicsWindow.cxx.

References GraphicsOutput::begin_frame_spam(), GraphicsOutput::clear_cube_map_selection(), and GraphicsOutput::get_fb_properties().

void GraphicsOutput::begin_frame_spam ( FrameMode  mode) [inline, protected, inherited]
void GraphicsOutput::change_scenes ( DisplayRegionPipelineReader new_dr) [inherited]

Called by the GraphicsEngine when the window is about to change to another DisplayRegion.

This exists mainly to provide a callback for switching the cube map face, if we are rendering to the different faces of a cube map.

Definition at line 1183 of file graphicsOutput.cxx.

References GraphicsOutput::count_textures(), DisplayRegionPipelineReader::get_cube_map_index(), DrawableRegion::get_draw_buffer_type(), GraphicsOutput::get_fb_properties(), GraphicsOutput::get_name(), GraphicsOutput::get_rtm_mode(), GraphicsOutput::get_texture(), and GraphicsOutput::select_cube_map().

void GraphicsOutput::clear ( Thread current_thread) [inherited]

Clears the entire framebuffer before rendering, according to the settings of get_color_clear_active() and get_depth_clear_active() (inherited from DrawableRegion).

This function is called only within the draw thread.

Definition at line 1085 of file graphicsOutput.cxx.

References GraphicsOutput::get_name(), and DrawableRegion::is_any_clear_active().

void GraphicsOutput::clear_child_sort ( ) [inline, inherited]

Resets the sort value of future offscreen buffers created by make_texture_sort() to the default value.

See set_child_sort().

Definition at line 459 of file graphicsOutput.I.

void GraphicsOutput::clear_cube_map_selection ( ) [inline, protected, inherited]
void GraphicsOutput::clear_delete_flag ( ) [inline, inherited]

Resets the delete flag, so the GraphicsOutput will not be automatically deleted before the beginning of the next frame.

Definition at line 389 of file graphicsOutput.I.

void GraphicsOutput::clear_pipe ( ) [virtual, inherited]

Sets the window's _pipe pointer to NULL; this is generally called only as a precursor to deleting the window.

Reimplemented in IPhoneGraphicsWindow.

Definition at line 1002 of file graphicsOutput.cxx.

void GraphicsWindow::clear_rejected_properties ( ) [inherited]

Empties the set of failed properties that will be returned by get_rejected_properties().

Definition at line 122 of file graphicsWindow.cxx.

References WindowProperties::clear().

void GraphicsOutput::clear_render_textures ( ) [inherited]

If the GraphicsOutput is currently rendering to a texture, then all textures are dissociated from the GraphicsOuput.

Definition at line 220 of file graphicsOutput.cxx.

Referenced by GraphicsOutput::prepare_for_deletion(), and GraphicsOutput::setup_render_texture().

void GraphicsWindow::close_ime ( ) [virtual, inherited]

Forces the ime window to close if any.

Reimplemented in WinGraphicsWindow.

Definition at line 424 of file graphicsWindow.cxx.

void eglGraphicsWindow::close_window ( ) [protected, virtual]

Closes the window right now.

Called from the window thread.

Reimplemented from GraphicsWindow.

Definition at line 589 of file eglGraphicsWindow.cxx.

Referenced by open_window(), and process_events().

int TypedWritable::complete_pointers ( TypedWritable **  p_list,
BamReader manager 
) [virtual, inherited]

Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().

Returns the number of pointers processed.

This is the callback function that is made by the BamReader at some later point, after all of the required pointers have been filled in. It is necessary because there might be forward references in a bam file; when we call read_pointer() in fillin(), the object may not have been read from the file yet, so we do not have a pointer available at that time. Thus, instead of returning a pointer, read_pointer() simply reserves a later callback. This function provides that callback. The calling object is responsible for keeping track of the number of times it called read_pointer() and extracting the same number of pointers out of the supplied vector, and storing them appropriately within the object.

Reimplemented in CFDoCullCommand, AnimBundleNode, AnimChannelMatrixDynamic, AnimChannelScalarDynamic, AnimGroup, MovingPartBase, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointEffect, CharacterVertexSlider, JointVertexTransform, CollisionNode, DataNodeTransmit, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, GeomVertexFormat, SliderTable, TextureStage, TransformBlendTable, TransformTable, PiecewiseCurve, ClipPlaneAttrib, FogAttrib, LensNode, LightAttrib, MaterialAttrib, PortalNode, RenderEffects, RenderState, TexGenAttrib, TexMatrixAttrib, TexProjectorEffect, TextureAttrib, BamCacheIndex, RecorderFrame, EggFile, ImageFile, PaletteGroup, PaletteGroups, PaletteImage, PalettePage, Palettizer, SourceTextureImage, TextureImage, TexturePlacement, TextureProperties, and TextureReference.

Definition at line 103 of file typedWritable.cxx.

void DrawableRegion::copy_clear_settings ( const DrawableRegion copy) [inline, inherited]

Copies only the clear settings from the other drawable region.

Definition at line 77 of file drawableRegion.I.

References DrawableRegion::update_pixel_factor().

Referenced by GraphicsOutput::make_cube_map().

bool GraphicsOutput::copy_to_textures ( ) [protected, inherited]
int GraphicsOutput::count_textures ( ) const [inline, inherited]
bool TypedWritable::decode_raw_from_bam_stream ( TypedWritable *&  ptr,
ReferenceCount *&  ref_ptr,
const string &  data,
BamReader reader = NULL 
) [static, inherited]

Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string.

Returns true on success, false on on error.

This variant sets the TypedWritable and ReferenceCount pointers separately; both are pointers to the same object. The reference count is not incremented; it is the caller's responsibility to manage the reference count.

Note that this method cannot be used to retrieve objects that do not inherit from ReferenceCount, because these objects cannot persist beyond the lifetime of the BamReader that reads them. To retrieve these objects from a bam stream, you must construct a BamReader directly.

If you happen to know that the particular object in question inherits from TypedWritableReferenceCount or PandaNode, consider calling the variant of decode_from_bam_stream() defined for those methods, which presents a simpler interface.

Definition at line 353 of file typedWritable.cxx.

References BamReader::init(), DatagramInputFile::open(), DatagramInputFile::read_header(), BamReader::read_object(), ReferenceCount::ref(), BamReader::resolve(), BamReader::set_source(), and ReferenceCount::unref().

void DrawableRegion::disable_clears ( ) [virtual, inherited]

Disables both the color and depth clear.

See set_clear_color_active and set_clear_depth_active.

Reimplemented in StereoDisplayRegion.

Definition at line 80 of file drawableRegion.cxx.

References DrawableRegion::update_pixel_factor().

void GraphicsWindow::disable_pointer_events ( int  device) [inherited]

Turn off the generation of pointer events.

Definition at line 355 of file graphicsWindow.cxx.

void GraphicsWindow::disable_pointer_mode ( int  device) [inherited]
bool GraphicsWindow::do_reshape_request ( int  x_origin,
int  y_origin,
bool  has_origin,
int  x_size,
int  y_size 
) [protected, virtual, inherited]

Called from the window thread in response to a request from within the code (via request_properties()) to change the size and/or position of the window.

Returns true if the window is successfully changed, or false if there was a problem.

Reimplemented in osxGraphicsWindow, and WinGraphicsWindow.

Definition at line 798 of file graphicsWindow.cxx.

Referenced by GraphicsWindow::set_properties_now().

bool ReferenceCount::do_test_ref_count_integrity ( ) const [protected, inherited]

Does some easy checks to make sure that the reference count isn't completely bogus.

Returns true if ok, false otherwise.

Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.

Definition at line 29 of file referenceCount.cxx.

Referenced by ReferenceCount::do_test_ref_count_nonzero(), and ReferenceCount::test_ref_count_integrity().

bool ReferenceCount::do_test_ref_count_nonzero ( ) const [protected, inherited]

Returns true if the reference count is nonzero, false otherwise.

Definition at line 56 of file referenceCount.cxx.

References ReferenceCount::do_test_ref_count_integrity().

Referenced by ReferenceCount::test_ref_count_nonzero().

void GraphicsWindow::enable_pointer_events ( int  device) [inherited]

Turn on the generation of pointer events.

Definition at line 343 of file graphicsWindow.cxx.

void GraphicsWindow::enable_pointer_mode ( int  device,
double  speed 
) [inherited]
string TypedWritable::encode_to_bam_stream ( ) const [inline, inherited]

Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string.

Returns empty string on failure.

This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.

Definition at line 86 of file typedWritable.I.

bool TypedWritable::encode_to_bam_stream ( string &  data,
BamWriter writer = NULL 
) const [inherited]

Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.

Returns true on success, false on failure.

This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.

Definition at line 283 of file typedWritable.cxx.

References BamWriter::init(), DatagramOutputFile::open(), BamWriter::set_target(), DatagramOutputFile::write_header(), and BamWriter::write_object().

void GraphicsOutput::end_flip ( ) [virtual, inherited]

This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers.

This should cause the window to wait for the flip, if necessary.

Reimplemented in wdxGraphicsWindow8, wdxGraphicsWindow9, IPhoneGraphicsWindow, and osxGraphicsWindow.

Definition at line 1270 of file graphicsOutput.cxx.

void eglGraphicsWindow::end_frame ( FrameMode  mode,
Thread current_thread 
) [virtual]

This function will be called within the draw thread after rendering is completed for a given frame.

It should do whatever finalization is required.

Reimplemented from GraphicsOutput.

Definition at line 199 of file eglGraphicsWindow.cxx.

References GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::copy_to_textures(), GraphicsOutput::end_frame_spam(), GraphicsOutput::prepare_for_deletion(), and GraphicsOutput::trigger_flip().

void GraphicsOutput::end_frame_spam ( FrameMode  mode) [inline, protected, inherited]
void TypedWritable::fillin ( DatagramIterator scan,
BamReader manager 
) [virtual, inherited]

This internal function is intended to be called by each class's make_from_bam() method to read in all of the relevant data from the BamFile for the new object.

It is also called directly by the BamReader to re-read the data for an object that has been placed on the stream for an update.

Reimplemented in CFDoCullCommand, AnimBundle, AnimBundleNode, AnimChannelBase, AnimChannelMatrixDynamic, AnimChannelMatrixFixed, AnimChannelMatrixXfmTable, AnimChannelScalarDynamic, AnimChannelScalarTable, AnimGroup, AnimPreloadTable, MovingPart< SwitchType >, MovingPartBase, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointEffect, CharacterVertexSlider, JointVertexTransform, CollisionBox, CollisionDSSolid, CollisionFloorMesh, CollisionInvSphere, CollisionLine, CollisionNode, CollisionParabola, CollisionPlane, CollisionPolygon, CollisionRay, CollisionSegment, CollisionSolid, CollisionSphere, CollisionTube, DataNode, DataNodeTransmit, ButtonEventList, EventStoreValue< Type >, Geom, GeomPrimitive, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, GeomVertexFormat, Lens, Material, SliderTable, TextureStage, TransformBlendTable, TransformTable, UserVertexSlider, UserVertexTransform, VertexSlider, VertexTransform, CubicCurveseg, HermiteCurve, NurbsCurve, ParametricCurve, PiecewiseCurve, RopeNode, SheetNode, AlphaTestAttrib, AntialiasAttrib, AudioVolumeAttrib, AuxBitplaneAttrib, BillboardEffect, Camera, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBinAttrib, CullFaceAttrib, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, Fog, FogAttrib, GeomNode, LensNode, LightAttrib, LightRampAttrib, MaterialAttrib, ModelNode, ModelRoot, PandaNode, PlaneNode, PolylightNode, PortalNode, RenderAttrib, RenderEffect, RenderEffects, RenderModeAttrib, RenderState, RescaleNormalAttrib, ScissorAttrib, ScissorEffect, ShadeModelAttrib, ShowBoundsEffect, StencilAttrib, TexGenAttrib, TexMatrixAttrib, TexProjectorEffect, TextureAttrib, TransformState, TransparencyAttrib, UvScrollNode, AmbientLight, CallbackNode, DirectionalLight, FadeLODNode, LightLensNode, LightNode, LODNode, PointLight, SequenceNode, Spotlight, SwitchNode, BamCacheIndex, BamCacheRecord, MouseRecorder, RecorderFrame, RecorderHeader, RecorderTable, DestTextureImage, EggFile, ImageFile, PaletteGroup, PaletteGroups, PaletteImage, PalettePage, Palettizer, SourceTextureImage, TextureImage, TexturePlacement, TexturePosition, TextureProperties, TextureReference, MovingPart< ACScalarSwitchType >, and MovingPart< ACMatrixSwitchType >.

Definition at line 133 of file typedWritable.cxx.

Referenced by EventStoreValue< Type >::fillin().

void TypedWritable::finalize ( BamReader manager) [virtual, inherited]

Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.

Reimplemented in PartBundle, Geom, GeomPrimitive, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, InternalName, GeomNode, LightAttrib, RenderAttrib, RenderEffect, RenderEffects, RenderState, PaletteGroup, and Palettizer.

Definition at line 145 of file typedWritable.cxx.

Referenced by BamReader::finalize_now().

bool GraphicsOutput::flip_ready ( ) const [inline, inherited]

Returns true if a frame has been rendered and needs to be flipped, false otherwise.

Definition at line 603 of file graphicsOutput.I.

UpdateSeq TypedWritable::get_bam_modified ( ) const [inline, inherited]

Returns the current bam_modified counter.

This counter is normally incremented automatically whenever the object is modified.

Definition at line 66 of file typedWritable.I.

Referenced by BamWriter::consider_update(), and BamWriter::write_pointer().

ButtonEvent GraphicsWindow::get_button_event ( int  device) [inherited]

Assuming a previous call to has_button_event() returned true, this returns the pending button event.

Definition at line 455 of file graphicsWindow.cxx.

References GraphicsWindow::has_button_event().

int GraphicsOutput::get_child_sort ( ) const [inline, inherited]

Returns the sort value of future offscreen buffers created by make_texture_sort().

See set_child_sort().

Definition at line 470 of file graphicsOutput.I.

References GraphicsOutput::get_sort().

Referenced by GraphicsOutput::make_texture_buffer().

bool DrawableRegion::get_clear_active ( int  n) const [virtual, inherited]
const Colorf & DrawableRegion::get_clear_color ( ) const [inline, inherited]

Returns the current clear color value.

This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

Definition at line 187 of file drawableRegion.I.

References DrawableRegion::get_clear_value().

bool DrawableRegion::get_clear_color_active ( ) const [inline, inherited]

Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.

See set_clear_color_active().

Definition at line 107 of file drawableRegion.I.

References DrawableRegion::get_clear_active().

Referenced by DisplayRegion::supports_pixel_zoom().

float DrawableRegion::get_clear_depth ( ) const [inline, inherited]

Returns the current clear depth value.

This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

Definition at line 215 of file drawableRegion.I.

References DrawableRegion::get_clear_value().

bool DrawableRegion::get_clear_depth_active ( ) const [inline, inherited]

Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.

See set_clear_depth_active().

Definition at line 133 of file drawableRegion.I.

References DrawableRegion::get_clear_active().

Referenced by DisplayRegion::supports_pixel_zoom().

unsigned int DrawableRegion::get_clear_stencil ( ) const [inline, inherited]

Returns the current clear stencil value.

This is the value that will be used to clear the stencil buffer every frame, but only if get_clear_stencil_active() returns true. If get_clear_stencil_active() returns false, this is meaningless.

Definition at line 242 of file drawableRegion.I.

References DrawableRegion::get_clear_value().

bool DrawableRegion::get_clear_stencil_active ( ) const [inline, inherited]

Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.

See set_clear_stencil_active().

Definition at line 159 of file drawableRegion.I.

References DrawableRegion::get_clear_active().

const Colorf & DrawableRegion::get_clear_value ( int  n) const [virtual, inherited]

Returns the clear value for any bitplane.

Definition at line 67 of file drawableRegion.cxx.

Referenced by DrawableRegion::get_clear_color(), DrawableRegion::get_clear_depth(), and DrawableRegion::get_clear_stencil().

string GraphicsWindow::get_close_request_event ( ) const [inherited]

Returns the name of the event set via set_close_request_event().

If this string is nonempty, then when the user requests to close window, this event will be generated instead. See set_close_request_event().

Definition at line 259 of file graphicsWindow.cxx.

Referenced by x11GraphicsWindow::process_events(), process_events(), and WinGraphicsWindow::window_proc().

PStatCollector & GraphicsOutput::get_cull_window_pcollector ( ) [inline, inherited]

Returns a PStatCollector for timing the cull operation for just this GraphicsOutput.

Definition at line 658 of file graphicsOutput.I.

bool GraphicsOutput::get_delete_flag ( ) const [inline, inherited]

Returns the current setting of the delete flag.

When this is true, the GraphicsOutput will automatically be removed before the beginning of the next frame by the GraphicsEngine.

Definition at line 402 of file graphicsOutput.I.

Referenced by GraphicsEngine::render_frame().

int DrawableRegion::get_draw_buffer_type ( ) const [inline, inherited]

Returns the RenderBuffer into which the GSG should issue draw commands.

Normally, this is the back buffer for double-buffered windows, and the front buffer for single-buffered windows.

Definition at line 295 of file drawableRegion.I.

Referenced by GraphicsOutput::change_scenes(), and GraphicsOutput::copy_to_textures().

PStatCollector & GraphicsOutput::get_draw_window_pcollector ( ) [inline, inherited]

Returns a PStatCollector for timing the draw operation for just this GraphicsOutput.

Definition at line 669 of file graphicsOutput.I.

GraphicsEngine * GraphicsOutput::get_engine ( ) const [inline, inherited]

Returns the graphics engine that created this output.

Since there is normally only one GraphicsEngine object in an application, this is usually the same as the global GraphicsEngine.

Definition at line 57 of file graphicsOutput.I.

const FrameBufferProperties & GraphicsOutput::get_fb_properties ( ) const [inline, inherited]
int GraphicsOutput::get_fb_x_size ( ) const [inline, inherited]

Returns the internal width of the window or buffer.

This is almost always the same as get_x_size(), except when a pixel_zoom is in effect--see set_pixel_zoom().

Definition at line 195 of file graphicsOutput.I.

References DrawableRegion::get_pixel_factor().

Referenced by DisplayRegion::compute_pixels(), DisplayRegion::compute_pixels_all_stages(), and DisplayRegion::set_dimensions().

int GraphicsOutput::get_fb_y_size ( ) const [inline, inherited]

Returns the internal height of the window or buffer.

This is almost always the same as get_y_size(), except when a pixel_zoom is in effect--see set_pixel_zoom().

Definition at line 208 of file graphicsOutput.I.

References DrawableRegion::get_pixel_factor().

Referenced by DisplayRegion::compute_pixels(), DisplayRegion::compute_pixels_all_stages(), and DisplayRegion::set_dimensions().

GraphicsStateGuardian * GraphicsOutput::get_gsg ( ) const [inline, inherited]

Returns the GSG that is associated with this window.

There is a one-to-one association between windows and GSG's.

This may return NULL if the graphics context has not yet been created for the window, e.g. before the first frame has rendered; or after the window has been closed.

Definition at line 29 of file graphicsOutput.I.

Referenced by NonlinearImager::add_viewer(), DisplayRegion::get_screenshot(), GraphicsEngine::make_buffer(), GraphicsOutput::make_cube_map(), GraphicsEngine::make_output(), GraphicsEngine::make_parasite(), GraphicsOutput::make_texture_buffer(), ParasiteBuffer::ParasiteBuffer(), GraphicsEngine::remove_all_windows(), GraphicsEngine::remove_window(), DisplayRegionDrawCallbackData::upcall(), and DisplayRegionCullCallbackData::upcall().

GraphicsOutput * GraphicsOutput::get_host ( ) [virtual, inherited]

This is normally called only from within make_texture_buffer().

When called on a ParasiteBuffer, it returns the host of that buffer; but when called on some other buffer, it returns the buffer itself.

Reimplemented in ParasiteBuffer.

Definition at line 942 of file graphicsOutput.cxx.

Referenced by GraphicsEngine::make_output(), and GraphicsOutput::make_texture_buffer().

string GraphicsWindow::get_input_device_name ( int  device) const [inherited]

Returns the name of the nth input device.

Definition at line 292 of file graphicsWindow.cxx.

bool GraphicsOutput::get_inverted ( ) const [inline, inherited]

Returns the current setting of the inverted flag.

When this is true, the scene is rendered into the window upside-down, flipped like a mirror along the X axis. See set_inverted().

Definition at line 286 of file graphicsOutput.I.

unsigned int GraphicsOutput::get_left_eye_color_mask ( ) const [inline, inherited]

Returns the color mask in effect when rendering a left-eye view in red_blue stereo mode.

This is one or more bits defined in ColorWriteAttrib::Channels. See set_red_blue_stereo().

Definition at line 341 of file graphicsOutput.I.

Referenced by GraphicsStateGuardian::prepare_display_region().

const string & GraphicsOutput::get_name ( ) const [inline, inherited]
int GraphicsOutput::get_num_active_display_regions ( ) const [inherited]

Returns the number of active DisplayRegions that have been created within the window.

Definition at line 622 of file graphicsOutput.cxx.

Referenced by GraphicsEngine::render_frame().

int GraphicsOutput::get_num_display_regions ( ) const [inherited]

Returns the number of DisplayRegions that have been created within the window, active or otherwise.

Definition at line 581 of file graphicsOutput.cxx.

int GraphicsWindow::get_num_input_devices ( ) const [inherited]

Returns the number of separate input devices associated with the window.

Typically, a window will have exactly one input device: the keyboard/mouse pair. However, some windows may have no input devices, and others may add additional devices, for instance for a joystick.

Definition at line 277 of file graphicsWindow.cxx.

bool GraphicsOutput::get_one_shot ( ) const [inline, inherited]

Returns the current setting of the one-shot flag.

When this is true, the GraphicsOutput will automatically detach its texture (if it has one) and remove itself from the GraphicsEngine after it renders the next frame.

Definition at line 273 of file graphicsOutput.I.

GraphicsPipe * GraphicsOutput::get_pipe ( ) const [inline, inherited]

Returns the GraphicsPipe that this window is associated with.

It is possible that the GraphicsPipe might have been deleted while an outstanding PT(GraphicsOutput) prevented all of its children windows from also being deleted; in this unlikely case, get_pipe() may return NULL.

Definition at line 44 of file graphicsOutput.I.

Referenced by DisplayRegionPipelineReader::get_pipe(), DisplayRegion::get_pipe(), GraphicsEngine::make_buffer(), GraphicsEngine::make_parasite(), and GraphicsOutput::make_texture_buffer().

float DrawableRegion::get_pixel_factor ( ) const [inline, inherited]

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().

This will return 1.0 if the pixel_zoom was not set or if it is not being respected (for instance, because the underlying renderer doesn't support it--see supports_pixel_zoom).

Definition at line 270 of file drawableRegion.I.

Referenced by GraphicsOutput::get_fb_x_size(), and GraphicsOutput::get_fb_y_size().

float DrawableRegion::get_pixel_zoom ( ) const [inline, inherited]

Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not.

Also see get_pixel_factor().

Definition at line 254 of file drawableRegion.I.

MouseData GraphicsWindow::get_pointer ( int  device) const [inherited]

Returns the MouseData associated with the nth input device's pointer.

Definition at line 392 of file graphicsWindow.cxx.

const WindowProperties GraphicsWindow::get_properties ( ) const [inherited]
bool GraphicsOutput::get_red_blue_stereo ( ) const [inline, inherited]

Returns whether red-blue stereo mode is in effect for this particular window.

See set_red_blue_stereo().

Definition at line 328 of file graphicsOutput.I.

int ReferenceCount::get_ref_count ( ) const [inline, inherited]
WindowProperties GraphicsWindow::get_rejected_properties ( ) const [inherited]

Returns the set of properties that have recently been requested, but could not be applied to the window for some reason.

This set of properties will remain unchanged until they are changed by a new failed request, or clear_rejected_properties() is called.

Definition at line 137 of file graphicsWindow.cxx.

int DrawableRegion::get_renderbuffer_type ( int  plane) [static, inherited]

Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane.

Definition at line 163 of file drawableRegion.cxx.

Referenced by GraphicsOutput::copy_to_textures().

const WindowProperties GraphicsWindow::get_requested_properties ( ) const [inherited]

Returns the properties of the window that are currently requested.

These properties will be applied to the window (if valid) at the next execution of process_events().

Definition at line 106 of file graphicsWindow.cxx.

unsigned int GraphicsOutput::get_right_eye_color_mask ( ) const [inline, inherited]

Returns the color mask in effect when rendering a right-eye view in red_blue stereo mode.

This is one or more bits defined in ColorWriteAttrib::Channels. See set_red_blue_stereo().

Definition at line 354 of file graphicsOutput.I.

Referenced by GraphicsStateGuardian::prepare_display_region().

GraphicsOutput::RenderTextureMode GraphicsOutput::get_rtm_mode ( int  i = 0) const [inline, inherited]
bool GraphicsOutput::get_screenshot ( PNMImage image) [inline, inherited]

Captures the most-recently rendered image from the framebuffer into the indicated PNMImage.

Returns true on success, false on failure.

Definition at line 592 of file graphicsOutput.I.

int DrawableRegion::get_screenshot_buffer_type ( ) const [inline, inherited]

Returns the RenderBuffer that should be used for capturing screenshots from this particular DrawableRegion.

Definition at line 282 of file drawableRegion.I.

Referenced by DisplayRegion::get_screenshot().

int GraphicsOutput::get_sort ( ) const [inline, inherited]

Returns the sorting order of this particular GraphicsOutput.

The various GraphicsOutputs within a particular thread will be rendered in the indicated order.

Definition at line 422 of file graphicsOutput.I.

Referenced by GraphicsOutput::get_child_sort().

Texture * GraphicsOutput::get_texture ( int  i = 0) const [inline, virtual, inherited]

Returns the nth texture into which the GraphicsOutput renders.

Returns NULL if there is no such texture.

If the texture is non-NULL, it may be applied to geometry to be rendered for any other windows or outputs that share the same GSG as this GraphicsOutput. The effect is undefined for windows that share a different GSG; usually in these cases the texture will be invalid.

Implements GraphicsOutputBase.

Definition at line 111 of file graphicsOutput.I.

Referenced by GraphicsOutput::change_scenes(), GraphicsOutput::copy_to_textures(), MultitexReducer::flatten(), GraphicsOutput::get_texture_card(), GraphicsOutput::prepare_for_deletion(), wdxGraphicsBuffer9::select_cube_map(), and wdxGraphicsBuffer8::select_cube_map().

NodePath GraphicsOutput::get_texture_card ( ) [inherited]

Returns a PandaNode containing a square polygon.

The dimensions are (-1,0,-1) to (1,0,1). The texture coordinates are such that the texture of this GraphicsOutput is aligned properly to the polygon. The GraphicsOutput promises to surgically update the Geom inside the PandaNode if necessary to maintain this invariant.

Each invocation of this function returns a freshly- allocated PandaNode. You can therefore safely modify the RenderAttribs of the PandaNode. The PandaNode is initially textured with the texture of this GraphicOutput.

Definition at line 748 of file graphicsOutput.cxx.

References GraphicsOutput::count_textures(), Texture::get_format(), GraphicsOutput::get_texture(), and NodePath::set_texture().

GraphicsOutput::RenderTexturePlane GraphicsOutput::get_texture_plane ( int  i = 0) const [inline, inherited]

Returns the RenderTexturePlane associated with the nth render-texture.

Returns 0 if there is no such texture.

Definition at line 126 of file graphicsOutput.I.

Referenced by wglGraphicsBuffer::begin_frame(), GraphicsOutput::copy_to_textures(), and wdxGraphicsBuffer9::select_cube_map().

int TypedObject::get_type_index ( ) const [inline, inherited]

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 52 of file typedObject.I.

References TypeHandle::get_index().

WeakReferenceList * ReferenceCount::get_weak_list ( ) const [inline, inherited]

Returns the WeakReferenceList associated with this ReferenceCount object.

If there has never been a WeakReferenceList associated with this object, creates one now.

Definition at line 307 of file referenceCount.I.

Referenced by ReferenceCount::weak_ref().

string GraphicsWindow::get_window_event ( ) const [inherited]

Returns the name of the event that is generated when this window is modified externally, e.g.

to be resized or closed by the user. See set_window_event().

Definition at line 212 of file graphicsWindow.cxx.

WindowHandle * GraphicsWindow::get_window_handle ( ) const [inline, inherited]

Returns the WindowHandle corresponding to this window on the desktop.

This is mainly useful for communicating with external libraries. Use window_handle->get_os_handle()->get_handle(), or window_handle->get_string_handle(), to get the actual OS-specific window handle object, whatever type that might be.

Definition at line 55 of file graphicsWindow.I.

int GraphicsOutput::get_x_size ( ) const [inline, inherited]

Returns the visible width of the window or buffer, if it is known.

In certain cases (e.g. fullscreen windows), the size may not be known until after the object has been fully created. Check has_size() first.

Certain objects (like windows) may change size spontaneously; this method is not thread-safe. To get the size of a window in a thread-safe manner, query get_properties().

Definition at line 163 of file graphicsOutput.I.

Referenced by GraphicsOutput::add_render_texture(), ParasiteBuffer::ParasiteBuffer(), GraphicsWindowInputDevice::set_pointer(), and wdxGraphicsBuffer9::share_depth_buffer().

Window eglGraphicsWindow::get_xwindow ( ) const [inline]

Returns the X11 Window handle.

Definition at line 22 of file eglGraphicsWindow.I.

Referenced by eglGraphicsPixmap::open_buffer().

int GraphicsOutput::get_y_size ( ) const [inline, inherited]

Returns the visible height of the window or buffer, if it is known.

In certain cases (e.g. fullscreen windows), the size may not be known until after the object has been fully created. Check has_size() first.

Certain objects (like windows) may change size spontaneously; this method is not thread-safe. To get the size of a window in a thread-safe manner, query get_properties().

Definition at line 182 of file graphicsOutput.I.

Referenced by GraphicsOutput::add_render_texture(), ParasiteBuffer::ParasiteBuffer(), GraphicsWindowInputDevice::set_pointer(), and wdxGraphicsBuffer9::share_depth_buffer().

bool GraphicsWindow::has_button_event ( int  device) const [inherited]

Returns true if the indicated device has a pending button event (a mouse button or keyboard button down/up), false otherwise.

If this returns true, the particular event may be extracted via get_button_event().

Definition at line 438 of file graphicsWindow.cxx.

Referenced by GraphicsWindow::get_button_event().

bool GraphicsWindow::has_keyboard ( int  device) const [inherited]

Returns true if the nth input device has a keyboard, false otherwise.

Definition at line 327 of file graphicsWindow.cxx.

bool GraphicsWindow::has_pointer ( int  device) const [inherited]

Returns true if the nth input device has a screen-space pointer (for instance, a mouse), false otherwise.

Definition at line 310 of file graphicsWindow.cxx.

bool GraphicsWindow::has_pointer_event ( int  device) const [inherited]

Returns true if the indicated device has a pending pointer event (a mouse movement).

If this returns true, the particular event may be extracted via get_pointer_events().

Definition at line 475 of file graphicsWindow.cxx.

bool GraphicsOutput::has_size ( ) const [inline, inherited]

Returns true if the size of the window/frame buffer is known, false otherwise.

In certain cases the size may not be known until after the object has been fully created. Also, certain objects (like windows) may change size spontaneously.

Definition at line 222 of file graphicsOutput.I.

Referenced by DisplayRegion::set_dimensions().

bool GraphicsOutput::has_texture ( ) const [inline, inherited]

Returns true if the GraphicsOutput is rendering into any textures at all.

Definition at line 93 of file graphicsOutput.I.

Referenced by GraphicsOutput::copy_to_textures().

bool ReferenceCount::has_weak_list ( ) const [inline, inherited]

Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.

In general, this will be true if there was ever a WeakPointerTo created for this object (even if there is not any for it now).

Definition at line 294 of file referenceCount.I.

Referenced by ReferenceCount::weak_unref().

bool GraphicsWindow::is_active ( ) const [virtual, inherited]

Returns true if the window is ready to be rendered into, false otherwise.

Reimplemented from GraphicsOutput.

Definition at line 181 of file graphicsWindow.cxx.

References WindowProperties::get_minimized(), and WindowProperties::get_open().

Referenced by wdxGraphicsWindow9::end_flip(), and wdxGraphicsWindow8::end_flip().

bool DrawableRegion::is_any_clear_active ( ) const [virtual, inherited]

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.

Definition at line 96 of file drawableRegion.cxx.

References DrawableRegion::get_clear_active().

Referenced by GraphicsOutput::clear().

bool GraphicsWindow::is_closed ( ) const [inline, inherited]

Returns true if the window has not yet been opened, or has been fully closed, false if it is open.

The window is not opened immediately after GraphicsEngine::make_window() is called; nor is it closed immediately after GraphicsEngine::remove_window() is called. Either operation may take a frame or two.

Definition at line 28 of file graphicsWindow.I.

References WindowProperties::get_open().

bool TypedObject::is_exact_type ( TypeHandle  handle) const [inline, inherited]
bool GraphicsWindow::is_fullscreen ( ) const [inline, inherited]
bool TypedObject::is_of_type ( TypeHandle  handle) const [inline, inherited]

Returns true if the current object is or derives from the indicated type.

Definition at line 63 of file typedObject.I.

References TypeHandle::is_derived_from().

Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().

bool GraphicsOutput::is_stereo ( ) const [inline, inherited]

Returns Returns true if this window can render stereo DisplayRegions, either through red-blue stereo (see set_red_blue_stereo()) or through true hardware stereo rendering.

Definition at line 377 of file graphicsOutput.I.

Referenced by GraphicsOutput::make_display_region().

bool GraphicsOutput::is_valid ( ) const [inline, inherited]

Returns true if the output is fully created and ready for rendering, false otherwise.

Definition at line 233 of file graphicsOutput.I.

Referenced by PandaFramework::all_windows_closed(), PandaFramework::event_window_event(), GraphicsOutput::is_active(), GraphicsEngine::make_output(), and PandaFramework::open_window().

void ReferenceCount::local_object ( ) [inline, inherited]

This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.

This allows the object to be passed to functions that will increment and decrement the object's reference count temporarily, and it will prevent the object from being deleted (inappropriately), when the reference count returns to zero. It actually achieves this by setting a large positive value in the reference count field.

Definition at line 276 of file referenceCount.I.

Referenced by PGTop::cull_callback(), BoundingSphere::extend_by_hexahedron(), AsyncTaskManager::find_task(), AsyncTaskManager::find_tasks(), and AsyncTaskManager::find_tasks_matching().

GraphicsOutput * GraphicsOutput::make_cube_map ( const string &  name,
int  size,
NodePath camera_rig,
DrawMask  camera_mask = PandaNode::get_all_camera_mask(),
bool  to_ram = false,
FrameBufferProperties fbp = NULL 
) [inherited]

This is similar to make_texture_buffer() in that it allocates a separate buffer suitable for rendering to a texture that can be assigned to geometry in this window, but in this case, the buffer is set up to render the six faces of a cube map.

The buffer is automatically set up with six display regions and six cameras, each of which are assigned the indicated draw_mask and parented to the given camera_rig node (which you should then put in your scene to render the cube map from the appropriate point of view).

You may take the texture associated with the buffer and apply it to geometry, particularly with TexGenAttrib::M_world_cube_map also in effect, to apply a reflection of everything seen by the camera rig.

Definition at line 871 of file graphicsOutput.cxx.

References NodePath::attach_new_node(), DrawableRegion::copy_clear_settings(), GraphicsOutput::get_gsg(), GraphicsStateGuardian::get_max_cube_map_dimension(), GraphicsStateGuardian::get_supports_cube_map(), NodePath::look_at(), GraphicsOutput::make_display_region(), GraphicsOutput::make_texture_buffer(), NodePath::node(), DisplayRegion::set_camera(), DrawableRegion::set_clear_color_active(), DrawableRegion::set_clear_depth_active(), DrawableRegion::set_clear_stencil_active(), DisplayRegion::set_cube_map_index(), PandaNode::set_effect(), and Lens::set_fov().

DisplayRegion * GraphicsOutput::make_display_region ( float  l,
float  r,
float  b,
float  t 
) [inherited]

Creates a new DisplayRegion that covers the indicated sub-rectangle within the window.

The range on all parameters is 0..1.

If is_stereo() is true for this window, and default-stereo-camera is configured true, this actually makes a StereoDisplayRegion. Call make_mono_display_region() or make_stereo_display_region() if you want to insist on one or the other.

Definition at line 476 of file graphicsOutput.cxx.

References GraphicsOutput::is_stereo(), GraphicsOutput::make_mono_display_region(), and GraphicsOutput::make_stereo_display_region().

DisplayRegion * GraphicsOutput::make_display_region ( ) [inline, inherited]

Creates a new DisplayRegion that covers the entire window.

If is_stereo() is true for this window, and default-stereo-camera is configured true, this actually makes a StereoDisplayRegion. Call make_mono_display_region() or make_stereo_display_region() if you want to insist on one or the other.

Definition at line 504 of file graphicsOutput.I.

Referenced by MultitexReducer::flatten(), GraphicsOutput::make_cube_map(), WindowFramework::open_window(), and WindowFramework::split_window().

DisplayRegion * GraphicsOutput::make_mono_display_region ( ) [inline, inherited]

Creates a new DisplayRegion that covers the entire window.

This always returns a mono DisplayRegion, even if is_stereo() is true.

Definition at line 518 of file graphicsOutput.I.

Referenced by GraphicsOutput::GraphicsOutput(), and GraphicsOutput::make_display_region().

DisplayRegion * GraphicsOutput::make_mono_display_region ( float  l,
float  r,
float  b,
float  t 
) [inherited]

Creates a new DisplayRegion that covers the indicated sub-rectangle within the window.

The range on all parameters is 0..1.

This always returns a mono DisplayRegion, even if is_stereo() is true.

Definition at line 495 of file graphicsOutput.cxx.

Filename GraphicsOutput::make_screenshot_filename ( const string &  prefix = "screenshot") [inline, static, inherited]

Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.

The default filename is generated from the supplied prefix and from the Config variable screenshot-filename, which contains the following strings:

~p - the supplied prefix ~f - the frame count ~e - the value of screenshot-extension All other % strings in strftime().

Definition at line 552 of file graphicsOutput.I.

StereoDisplayRegion * GraphicsOutput::make_stereo_display_region ( ) [inline, inherited]

Creates a new DisplayRegion that covers the entire window.

This always returns a stereo DisplayRegion, even if is_stereo() is false.

Definition at line 532 of file graphicsOutput.I.

Referenced by GraphicsOutput::make_display_region().

StereoDisplayRegion * GraphicsOutput::make_stereo_display_region ( float  l,
float  r,
float  b,
float  t 
) [inherited]

Creates a new DisplayRegion that covers the indicated sub-rectangle within the window.

The range on all parameters is 0..1.

This always returns a stereo DisplayRegion, even if is_stereo() is false.

Definition at line 510 of file graphicsOutput.cxx.

GraphicsOutput * GraphicsOutput::make_texture_buffer ( const string &  name,
int  x_size,
int  y_size,
Texture tex = NULL,
bool  to_ram = false,
FrameBufferProperties fbp = NULL 
) [inherited]

Creates and returns an offscreen buffer for rendering into, the result of which will be a texture suitable for applying to geometry within the scene rendered into this window.

If tex is not NULL, it is the texture that will be set up for rendering into; otherwise, a new Texture object will be created. In either case, the target texture can be retrieved from the return value with buffer->get_texture() (assuming the return value is not NULL).

If to_ram is true, the buffer will be set up to download its contents to the system RAM memory associated with the Texture object, instead of keeping it strictly within texture memory; this is much slower, but it allows using the texture with any GSG.

This will attempt to be smart about maximizing render performance while minimizing framebuffer waste. It might return a GraphicsBuffer set to render directly into a texture, if possible; or it might return a ParasiteBuffer that renders into this window. The return value is NULL if the buffer could not be created for some reason.

When you are done using the buffer, you should remove it with a call to GraphicsEngine::remove_window() (or set the one_shot flag so it removes itself after one frame).

Definition at line 814 of file graphicsOutput.cxx.

References GraphicsOutput::add_render_texture(), GraphicsOutput::get_child_sort(), GraphicsStateGuardian::get_engine(), GraphicsOutput::get_gsg(), GraphicsOutput::get_host(), GraphicsOutput::get_pipe(), Texture::get_texture_type(), and WindowProperties::size().

Referenced by MultitexReducer::flatten(), and GraphicsOutput::make_cube_map().

void TypedWritable::mark_bam_modified ( ) [inline, inherited]
void GraphicsWindow::mouse_mode_absolute ( ) [protected, virtual, inherited]

reattaches mouse to location

Reimplemented in osxGraphicsWindow, and x11GraphicsWindow.

Definition at line 921 of file graphicsWindow.cxx.

Referenced by GraphicsWindow::set_properties_now().

void GraphicsWindow::mouse_mode_relative ( ) [protected, virtual, inherited]

detaches mouse.

Only mouse delta from now on.

Reimplemented in osxGraphicsWindow, and x11GraphicsWindow.

Definition at line 909 of file graphicsWindow.cxx.

Referenced by GraphicsWindow::set_properties_now().

bool eglGraphicsWindow::move_pointer ( int  device,
int  x,
int  y 
) [virtual]

Forces the pointer to the indicated position within the window, if possible.

Returns true if successful, false on failure. This may fail if the mouse is not currently within the window, or if the API doesn't support this operation.

Reimplemented from GraphicsWindow.

Definition at line 104 of file eglGraphicsWindow.cxx.

References WindowProperties::get_foreground().

bool eglGraphicsWindow::open_window ( ) [protected, virtual]
bool GraphicsOutput::operator< ( const GraphicsOutput other) const [inline, inherited]

The sorting operator is used to order the GraphicsOutput object in order by their sort number, so that they will render in the correct order in the GraphicsEngine.

Definition at line 616 of file graphicsOutput.I.

void GraphicsOutput::pixel_factor_changed ( ) [protected, virtual, inherited]

Called internally when the pixel factor changes.

Reimplemented from DrawableRegion.

Definition at line 1037 of file graphicsOutput.cxx.

References GraphicsOutput::set_size_and_recalc().

void GraphicsOutput::prepare_for_deletion ( ) [protected, inherited]
void eglGraphicsWindow::process_events ( ) [virtual]

Do whatever processing is necessary to ensure that the window responds to user events.

Also, honor any requests recently made via request_properties()

This function is called only within the window thread.

Reimplemented from GraphicsWindow.

Definition at line 259 of file eglGraphicsWindow.cxx.

References close_window(), GraphicsWindow::get_close_request_event(), WindowProperties::get_fixed_size(), GraphicsWindow::get_properties(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), WindowProperties::set_foreground(), WindowProperties::set_minimized(), WindowProperties::set_open(), WindowProperties::set_size(), and GraphicsWindow::system_changed_properties().

void ReferenceCount::ref ( ) const [inline, inherited]

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

Definition at line 179 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_ref(), TypedWritable::decode_raw_from_bam_stream(), NodeCachedReferenceCount::node_ref(), NodeReferenceCount::node_ref(), BamCacheRecord::set_data(), CullableObject::set_draw_callback(), and ModelRoot::set_reference().

void GraphicsOutput::remove_all_display_regions ( ) [inherited]

Removes all display regions from the window, except the default one that is created with the window.

Definition at line 555 of file graphicsOutput.cxx.

References DisplayRegion::cleanup().

Referenced by GraphicsOutput::prepare_for_deletion().

bool GraphicsOutput::remove_display_region ( DisplayRegion display_region) [inherited]

Removes the indicated DisplayRegion from the window, and destructs it if there are no other references.

Returns true if the DisplayRegion is found and removed, false if it was not a part of the window.

Definition at line 533 of file graphicsOutput.cxx.

References StereoDisplayRegion::get_left_eye(), StereoDisplayRegion::get_right_eye(), and DisplayRegion::is_stereo().

void GraphicsWindow::request_close ( ) [virtual, inherited]

This is called by the GraphicsEngine to request that the window (or whatever) close itself or, in general, make itself invalid, at the next call to process_events().

By that time we promise the gsg pointer will be cleared.

Reimplemented from GraphicsOutput.

Definition at line 555 of file graphicsWindow.cxx.

References GraphicsWindow::request_properties(), and WindowProperties::set_open().

void GraphicsWindow::request_open ( ) [virtual, inherited]

This is called by the GraphicsEngine to request that the window (or whatever) open itself or, in general, make itself valid, at the next call to process_events().

Reimplemented from GraphicsOutput.

Definition at line 539 of file graphicsWindow.cxx.

References GraphicsWindow::request_properties(), and WindowProperties::set_open().

void GraphicsWindow::request_properties ( const WindowProperties requested_properties) [inherited]

Requests a property change on the window.

For example, use this method to request a window change size or minimize or something.

The change is not made immediately; rather, the request is saved and will be applied the next time the window task is run (probably at the next frame).

Definition at line 158 of file graphicsWindow.cxx.

References WindowProperties::add_properties(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), and WindowProperties::has_size().

Referenced by GraphicsWindow::GraphicsWindow(), GraphicsWindow::request_close(), and GraphicsWindow::request_open().

bool TypedWritable::require_fully_complete ( ) const [virtual, inherited]

Some objects require all of their nested pointers to have been completed before the objects themselves can be completed.

If this is the case, override this method to return true, and be careful with circular references (which would make the object unreadable from a bam file).

Reimplemented in GeomVertexData, ClipPlaneAttrib, and RenderEffects.

Definition at line 118 of file typedWritable.cxx.

void GraphicsWindow::reset_window ( bool  swapchain) [protected, virtual, inherited]

resets the window framebuffer from its derived children.

Does nothing here.

Reimplemented from GraphicsOutput.

Reimplemented in wdxGraphicsWindow8, and wdxGraphicsWindow9.

Definition at line 783 of file graphicsWindow.cxx.

bool GraphicsOutput::save_screenshot ( const Filename filename,
const string &  image_comment = "" 
) [inline, inherited]

Saves a screenshot of the region to the indicated filename.

The image comment is an optional user readable string that will be saved with the header of the image (if the file format supports embedded data; for example jpg allows comments). Returns true on success, false on failure.

Definition at line 580 of file graphicsOutput.I.

Filename GraphicsOutput::save_screenshot_default ( const string &  prefix = "screenshot") [inline, inherited]

Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.

The filename is generated by make_screenshot_filename().

Definition at line 565 of file graphicsOutput.I.

Referenced by PandaFramework::event_f9().

void GraphicsOutput::select_cube_map ( int  cube_map_index) [virtual, inherited]

Called internally when the window is in render-to-a-texture mode and we are in the process of rendering the six faces of a cube map.

This should do whatever needs to be done to switch the buffer to the indicated face.

Reimplemented in wdxGraphicsBuffer8, wdxGraphicsBuffer9, and wglGraphicsBuffer.

Definition at line 1238 of file graphicsOutput.cxx.

Referenced by GraphicsOutput::change_scenes().

void GraphicsOutput::set_active ( bool  active) [inherited]

Sets the active flag associated with the GraphicsOutput.

If the GraphicsOutput is marked inactive, nothing is rendered.

Definition at line 396 of file graphicsOutput.cxx.

void GraphicsOutput::set_child_sort ( int  child_sort) [inline, inherited]

Specifies the sort value of future offscreen buffers created by make_texture_sort().

The purpose of this method is to allow the user to limit the sort value chosen for a buffer created via make_texture_buffer(). Normally, this buffer will be assigned a value of get_sort() - 1, so that it will be rendered before this window is rendered; but sometimes this isn't sufficiently early, especially if other buffers also have a view into the same scene.

If you specify a value here, then new buffers created via make_texture_buffer() will be given that sort value instead of get_sort() - 1.

Definition at line 446 of file graphicsOutput.I.

void DrawableRegion::set_clear_active ( int  n,
bool  clear_aux_active 
) [virtual, inherited]

Sets the clear-active flag for any bitplane.

Reimplemented in StereoDisplayRegion.

Definition at line 33 of file drawableRegion.cxx.

References DrawableRegion::update_pixel_factor().

Referenced by DrawableRegion::set_clear_color_active(), DrawableRegion::set_clear_depth_active(), and DrawableRegion::set_clear_stencil_active().

void DrawableRegion::set_clear_color ( const Colorf color) [inline, inherited]

Sets the clear color to the indicated value.

This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

Definition at line 173 of file drawableRegion.I.

References DrawableRegion::set_clear_value().

Referenced by GraphicsOutput::GraphicsOutput().

void DrawableRegion::set_clear_color_active ( bool  clear_color_active) [inline, inherited]

Toggles the flag that indicates whether the color buffer should be cleared every frame.

If this is true, the color buffer will be cleared to the color indicated by set_clear_color(); otherwise, it will be left alone.

Definition at line 95 of file drawableRegion.I.

References DrawableRegion::set_clear_active().

Referenced by GraphicsOutput::GraphicsOutput(), GraphicsOutput::make_cube_map(), and WindowFramework::open_window().

void DrawableRegion::set_clear_depth ( float  depth) [inline, inherited]

Sets the clear depth to the indicated value.

This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

Definition at line 201 of file drawableRegion.I.

References DrawableRegion::set_clear_value().

void DrawableRegion::set_clear_depth_active ( bool  clear_depth_active) [inline, inherited]

Toggles the flag that indicates whether the depth buffer should be cleared every frame.

If this is true, the depth buffer will be cleared to the depth value indicated by set_clear_depth(); otherwise, it will be left alone.

Definition at line 121 of file drawableRegion.I.

References DrawableRegion::set_clear_active().

Referenced by GraphicsOutput::GraphicsOutput(), and GraphicsOutput::make_cube_map().

void DrawableRegion::set_clear_stencil ( unsigned int  stencil) [inline, inherited]

Sets the clear stencil to the indicated value.

This is the value that will be used to clear the stencil buffer every frame, but only if get_clear_color_active() returns true. If get_clear_stencil_active() returns false, this is meaningless.

Definition at line 228 of file drawableRegion.I.

References DrawableRegion::set_clear_value().

void DrawableRegion::set_clear_stencil_active ( bool  clear_stencil_active) [inline, inherited]

Toggles the flag that indicates whether the stencil buffer should be cleared every frame.

If this is true, the stencil buffer will be cleared to the value indicated by set_clear_stencil(); otherwise, it will be left alone.

Definition at line 147 of file drawableRegion.I.

References DrawableRegion::set_clear_active().

Referenced by GraphicsOutput::GraphicsOutput(), and GraphicsOutput::make_cube_map().

void DrawableRegion::set_clear_value ( int  n,
const Colorf clear_value 
) [virtual, inherited]

Sets the clear value for any bitplane.

Reimplemented in StereoDisplayRegion.

Definition at line 56 of file drawableRegion.cxx.

Referenced by DrawableRegion::set_clear_color(), DrawableRegion::set_clear_depth(), and DrawableRegion::set_clear_stencil().

void GraphicsWindow::set_close_now ( ) [virtual, inherited]

This is called by the GraphicsEngine to insist that the window be closed immediately.

This is only called from the window thread.

Reimplemented from GraphicsOutput.

Definition at line 569 of file graphicsWindow.cxx.

References WindowProperties::set_open(), and GraphicsWindow::set_properties_now().

void GraphicsWindow::set_close_request_event ( const string &  close_request_event) [inherited]

Sets the event that is triggered when the user requests to close the window, e.g.

via alt-F4, or clicking on the close box.

The default for each window is for this event to be the empty string, which means the window-close request is handled immediately by Panda (and the window will be closed without the app getting a chance to intervene). If you set this to a nonempty string, then the window is not closed, but instead the event is thrown. It is then up to the app to respond appropriately, for instance by presenting an "are you sure?" dialog box, and eventually calling close_window() when the user is sure.

It is considered poor form to set this string and then not handle the event. This can frustrate the user by making it difficult for him to cleanly shut down the application (and may force the user to hard-kill the app, or reboot the machine).

Definition at line 244 of file graphicsWindow.cxx.

void GraphicsOutput::set_inverted ( bool  inverted) [inherited]

Changes the current setting of the inverted flag.

When this is true, the scene is rendered into the window upside-down and backwards, that is, inverted as if viewed through a mirror placed on the floor.

This is primarily intended to support DirectX (and a few buggy OpenGL graphics drivers) that perform a framebuffer-to-texture copy upside-down from the usual OpenGL (and Panda) convention. Panda will automatically set this flag for offscreen buffers on hardware that is known to do this, to compensate when rendering offscreen into a texture.

Definition at line 428 of file graphicsOutput.cxx.

Referenced by ParasiteBuffer::ParasiteBuffer(), and GraphicsBuffer::process_events().

void GraphicsOutput::set_one_shot ( bool  one_shot) [inline, inherited]

Changes the current setting of the one-shot flag.

When this is true, the GraphicsOutput will render one frame and then automatically set itself inactive. This is particularly useful for buffers that are created for the purposes of render-to-texture, for static textures that don't need to be continually re-rendered once they have been rendered the first time.

Setting the buffer inactive is not the same thing as destroying it. You are still responsible for passing this buffer to GraphicsEngine::remove_window() when you no longer need the texture, in order to clean up fully. (However, you should not call remove_window() on this buffer while the texture is still needed, because depending on the render-to-texture mechanism in use, this may invalidate the texture contents.)

Definition at line 259 of file graphicsOutput.I.

Referenced by MultitexReducer::flatten().

void DrawableRegion::set_pixel_zoom ( float  pixel_zoom) [virtual, inherited]

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 DrawableRegion::update_pixel_factor().

Referenced by GraphicsWindow::GraphicsWindow().

void eglGraphicsWindow::set_properties_now ( WindowProperties properties) [virtual]

Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status.

The window properties are applied immediately, rather than waiting until the next frame. This implies that this method may *only* be called from within the window thread.

The return value is true if the properties are set, false if they are ignored. This is mainly useful for derived classes to implement extensions to this function.

Reimplemented from GraphicsWindow.

Definition at line 461 of file eglGraphicsWindow.cxx.

References WindowProperties::add_properties(), WindowProperties::clear_cursor_hidden(), WindowProperties::clear_foreground(), WindowProperties::clear_fullscreen(), WindowProperties::clear_origin(), WindowProperties::clear_size(), WindowProperties::clear_title(), WindowProperties::clear_z_order(), WindowProperties::get_cursor_hidden(), GraphicsPipe::get_display_height(), GraphicsPipe::get_display_width(), WindowProperties::get_foreground(), WindowProperties::get_fullscreen(), eglGraphicsPipe::get_hidden_cursor(), WindowProperties::get_title(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), WindowProperties::get_y_size(), WindowProperties::get_z_order(), WindowProperties::has_cursor_hidden(), WindowProperties::has_foreground(), WindowProperties::has_fullscreen(), WindowProperties::has_origin(), WindowProperties::has_size(), WindowProperties::has_title(), WindowProperties::has_z_order(), WindowProperties::is_any_specified(), WindowProperties::set_cursor_hidden(), WindowProperties::set_fullscreen(), WindowProperties::set_origin(), WindowProperties::set_size(), WindowProperties::set_title(), WindowProperties::set_undecorated(), and WindowProperties::set_z_order().

void GraphicsOutput::set_red_blue_stereo ( bool  red_blue_stereo,
unsigned int  left_eye_color_mask,
unsigned int  right_eye_color_mask 
) [inline, inherited]

Enables red-blue stereo mode on this particular window.

When red-blue stereo mode is in effect, DisplayRegions that have the "left" channel set will render in the red (or specified) channel only, while DisplayRegions that have the "right" channel set will render in the blue (or specified) channel only.

The remaining two parameters specify the particular color channel(s) to associate with each eye. Use the bits defined in ColorWriteAttrib::Channels.

This can be used to achieve a cheesy stereo mode in the absence of hardware-supported stereo.

Definition at line 308 of file graphicsOutput.I.

void GraphicsOutput::set_size_and_recalc ( int  x,
int  y 
) [inherited]

Changes the x_size and y_size, then recalculates structures that depend on size.

The recalculation currently includes:

  • compute_pixels on all the graphics regions.
  • updating the texture card, if one is present.

Reimplemented in ParasiteBuffer.

Definition at line 710 of file graphicsOutput.cxx.

Referenced by WinGraphicsWindow::do_fullscreen_resize(), GraphicsOutput::pixel_factor_changed(), GraphicsWindow::set_properties_now(), GraphicsBuffer::set_size(), and GraphicsWindow::system_changed_size().

void GraphicsOutput::set_sort ( int  sort) [virtual, inherited]

Adjusts the sorting order of this particular GraphicsOutput, relative to other GraphicsOutputs.

Implements GraphicsOutputBase.

Definition at line 452 of file graphicsOutput.cxx.

void GraphicsWindow::set_window_event ( const string &  window_event) [inherited]

Changes the name of the event that is generated when this window is modified externally, e.g.

to be resized or closed by the user.

By default, all windows have the same window event unless they are explicitly changed. When the event is generated, it includes one parameter: the window itself.

Definition at line 199 of file graphicsWindow.cxx.

void GraphicsOutput::setup_render_texture ( Texture tex,
bool  allow_bind,
bool  to_ram 
) [inherited]

This is a deprecated interface that made sense back when GraphicsOutputs could only render into one texture at a time.

From now on, use clear_render_textures and add_render_texture instead.

Definition at line 375 of file graphicsOutput.cxx.

References GraphicsOutput::add_render_texture(), and GraphicsOutput::clear_render_textures().

bool GraphicsOutput::share_depth_buffer ( GraphicsOutput graphics_output) [virtual, inherited]

Will attempt to use the depth buffer of the input graphics_output.

The buffer sizes must be exactly the same.

Reimplemented in wdxGraphicsBuffer9.

Definition at line 1388 of file graphicsOutput.cxx.

bool DrawableRegion::supports_pixel_zoom ( ) const [virtual, inherited]

Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.

If this returns false, then get_pixel_factor() will always return 1.0, regardless of what value you specify for set_pixel_zoom().

This may return false if the underlying renderer doesn't support pixel zooming, or if you have called this on a DisplayRegion that doesn't have both set_clear_color() and set_clear_depth() enabled.

Reimplemented in DisplayRegion.

Definition at line 152 of file drawableRegion.cxx.

Referenced by DisplayRegion::supports_pixel_zoom(), and DrawableRegion::update_pixel_factor().

void GraphicsWindow::system_changed_properties ( const WindowProperties properties) [protected, inherited]

Should be called (from within the window thread) when process_events() detects an external change in some important window property; for instance, when the user resizes the window.

Definition at line 812 of file graphicsWindow.cxx.

References WindowProperties::add_properties(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), WindowProperties::has_size(), and GraphicsWindow::system_changed_size().

Referenced by WinGraphicsWindow::handle_reshape(), x11GraphicsWindow::process_events(), process_events(), and WinGraphicsWindow::window_proc().

void GraphicsWindow::system_changed_size ( int  x_size,
int  y_size 
) [protected, inherited]

An internal function to update all the DisplayRegions with the new size of the window.

This should always be called before changing the _size members of the _properties structure.

Definition at line 840 of file graphicsWindow.cxx.

References WindowProperties::get_x_size(), WindowProperties::get_y_size(), WindowProperties::has_size(), and GraphicsOutput::set_size_and_recalc().

Referenced by GraphicsWindow::system_changed_properties().

bool ReferenceCount::test_ref_count_integrity ( ) const [inline, inherited]
bool ReferenceCount::test_ref_count_nonzero ( ) const [inline, inherited]

Does some easy checks to make sure that the reference count isn't zero, or completely bogus.

Returns true if ok, false otherwise.

Definition at line 252 of file referenceCount.I.

References ReferenceCount::do_test_ref_count_nonzero().

Referenced by CopyOnWritePointer::test_ref_count_nonzero().

void GraphicsOutput::trigger_copy ( ) [inline, inherited]

When the GraphicsOutput is in triggered copy mode, this function triggers the copy (at the end of the next frame).

Definition at line 486 of file graphicsOutput.I.

void GraphicsOutput::trigger_flip ( ) [inline, protected, inherited]
bool ReferenceCount::unref ( ) const [inline, virtual, inherited]

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is true if the new reference count is nonzero, false if it is zero.

Reimplemented in GeomVertexArrayFormat, GeomVertexFormat, InternalName, RenderAttrib, RenderEffects, RenderState, and TransformState.

Definition at line 214 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_unref(), TypedWritable::decode_raw_from_bam_stream(), RenderEffect::finalize(), NodeCachedReferenceCount::node_unref(), NodeReferenceCount::node_unref(), TransformState::unref(), RenderState::unref(), RenderEffects::unref(), RenderAttrib::unref(), InternalName::unref(), GeomVertexFormat::unref(), and GeomVertexArrayFormat::unref().

void GraphicsOutput::unshare_depth_buffer ( ) [virtual, inherited]

Discontinue sharing the depth buffer.

Reimplemented in wdxGraphicsBuffer9.

Definition at line 1398 of file graphicsOutput.cxx.

void TypedWritable::update_bam_nested ( BamWriter manager) [virtual, inherited]

Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates.

Reimplemented in CFDoCullCommand, and PandaNode.

Definition at line 77 of file typedWritable.cxx.

void DrawableRegion::update_pixel_factor ( ) [inline, protected, inherited]
int GraphicsWindow::verify_window_sizes ( int  numsizes,
int *  dimen 
) [virtual, inherited]

Determines which of the indicated window sizes are supported by available hardware (e.g.

in fullscreen mode).

On entry, dimen is an array containing contiguous x,y pairs specifying possible display sizes; it is numsizes*2 words long. The function will zero out any invalid x,y size pairs. The return value is the number of valid sizes that were found.

Note this doesn't guarantee a resize attempt will work; you still need to check the return value.

(It might be better to implement some sort of query interface that returns an array of supported sizes, but this way is somewhat simpler and will do the job on most cards, assuming they handle the std sizes the app knows about.)

Reimplemented in wdxGraphicsWindow8, and wdxGraphicsWindow9.

Definition at line 526 of file graphicsWindow.cxx.

void ReferenceCount::weak_ref ( WeakPointerToVoid ptv) [inline, inherited]

Adds the indicated PointerToVoid as a weak reference to this object.

Definition at line 321 of file referenceCount.I.

References WeakReferenceList::add_reference(), and ReferenceCount::get_weak_list().

void ReferenceCount::weak_unref ( WeakPointerToVoid ptv) [inline, inherited]

Removes the indicated PointerToVoid as a weak reference to this object.

It must have previously been added via a call to weak_ref().

Definition at line 334 of file referenceCount.I.

References WeakReferenceList::clear_reference(), and ReferenceCount::has_weak_list().

void TypedWritable::write_datagram ( BamWriter manager,
Datagram dg 
) [virtual, inherited]

Writes the contents of this object to the datagram for shipping out to a Bam file.

Reimplemented in CFDoCullCommand, AnimBundle, AnimBundleNode, AnimChannelBase, AnimChannelMatrixDynamic, AnimChannelMatrixFixed, AnimChannelMatrixXfmTable, AnimChannelScalarDynamic, AnimChannelScalarTable, AnimGroup, AnimPreloadTable, MovingPart< SwitchType >, MovingPartBase, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointEffect, CharacterVertexSlider, JointVertexTransform, CollisionBox, CollisionDSSolid, CollisionFloorMesh, CollisionInvSphere, CollisionLine, CollisionNode, CollisionParabola, CollisionPlane, CollisionPolygon, CollisionRay, CollisionSegment, CollisionSolid, CollisionSphere, CollisionTube, DataNode, DataNodeTransmit, ButtonEventList, EventStoreValue< Type >, Geom, GeomPrimitive, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, GeomVertexFormat, InternalName, Lens, Material, SliderTable, Texture, TextureStage, TransformBlendTable, TransformTable, UserVertexSlider, UserVertexTransform, VertexSlider, VertexTransform, CubicCurveseg, HermiteCurve, NurbsCurve, ParametricCurve, PiecewiseCurve, RopeNode, SheetNode, AlphaTestAttrib, AntialiasAttrib, AudioVolumeAttrib, AuxBitplaneAttrib, BillboardEffect, Camera, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBinAttrib, CullFaceAttrib, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, Fog, FogAttrib, GeomNode, LensNode, LightAttrib, LightRampAttrib, MaterialAttrib, ModelNode, ModelRoot, PandaNode, PlaneNode, PolylightNode, PortalNode, RenderAttrib, RenderEffect, RenderEffects, RenderModeAttrib, RenderState, RescaleNormalAttrib, ScissorAttrib, ScissorEffect, ShadeModelAttrib, ShowBoundsEffect, StencilAttrib, TexGenAttrib, TexMatrixAttrib, TexProjectorEffect, TextureAttrib, TransformState, TransparencyAttrib, UvScrollNode, AmbientLight, CallbackNode, DirectionalLight, FadeLODNode, LightLensNode, LightNode, LODNode, PointLight, SequenceNode, Spotlight, SwitchNode, PNMFileType, BamCacheIndex, BamCacheRecord, WritableConfigurable, MouseRecorder, RecorderFrame, RecorderHeader, RecorderTable, DestTextureImage, EggFile, ImageFile, PaletteGroup, PaletteGroups, PaletteImage, PalettePage, Palettizer, SourceTextureImage, TextureImage, TexturePlacement, TexturePosition, TextureProperties, TextureReference, MovingPart< ACScalarSwitchType >, and MovingPart< ACMatrixSwitchType >.

Definition at line 66 of file typedWritable.cxx.

Referenced by GeomPrimitive::write_datagram(), and EventStoreValue< Type >::write_datagram().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations