Panda3D
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
wdxGraphicsWindow9 Class Reference

A single graphics window for rendering DirectX under Microsoft Windows. More...

#include "wdxGraphicsWindow9.h"

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

List of all members.

Classes

struct  DXDeviceInfo

Public Member Functions

 wdxGraphicsWindow9 (GraphicsEngine *engine, GraphicsPipe *pipe, const string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg, GraphicsOutput *host)
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.
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 TypeHandle force_init_type ()
virtual TypeHandle get_type () const
virtual int verify_window_sizes (int numsizes, int *dimen)
 Determines which of the indicated window sizes are supported by available hardware (e.g.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

virtual void close_window ()
 Some cleanup is necessary for directx closeup of window.
virtual bool do_fullscreen_resize (int x_size, int y_size)
 Called in the window thread to resize a fullscreen window.
virtual void fullscreen_restored (WindowProperties &properties)
 This is a hook for derived classes to do something special, if necessary, when a fullscreen window has been restored after being minimized.
virtual void handle_reshape ()
 Called in the window thread when the window size or location is changed, this updates the properties structure accordingly.
virtual bool open_window ()
 Opens the window right now.
virtual void reset_window (bool swapchain)
 Resets the window framebuffer right now.

Friends

class wdxGraphicsPipe9

Detailed Description

A single graphics window for rendering DirectX under Microsoft Windows.

Definition at line 31 of file wdxGraphicsWindow9.h.


Member Function Documentation

bool wdxGraphicsWindow9::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 94 of file wdxGraphicsWindow9.cxx.

References GraphicsOutput::begin_frame_spam(), GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::get_fb_properties(), GraphicsWindow::get_unexposed_draw(), and DXGraphicsStateGuardian9::set_render_target().

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

Some cleanup is necessary for directx closeup of window.

Handle close window events for this particular window.

Reimplemented from WinGraphicsWindow.

Definition at line 253 of file wdxGraphicsWindow9.cxx.

References DXGraphicsStateGuardian9::release_swap_chain(), and DXGraphicsStateGuardian9::set_cg_device().

Referenced by open_window().

bool wdxGraphicsWindow9::do_fullscreen_resize ( int  x_size,
int  y_size 
) [protected, virtual]

Called in the window thread to resize a fullscreen window.

Reimplemented from WinGraphicsWindow.

Definition at line 459 of file wdxGraphicsWindow9.cxx.

References WinGraphicsWindow::do_fullscreen_resize(), wdxGraphicsPipe9::search_for_valid_displaymode(), and wdxGraphicsPipe9::special_check_fullscreen_resolution().

void wdxGraphicsWindow9::end_flip ( ) [virtual]

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 from GraphicsOutput.

Definition at line 166 of file wdxGraphicsWindow9.cxx.

References GraphicsWindow::is_active(), and DXGraphicsStateGuardian9::show_frame().

void wdxGraphicsWindow9::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 139 of file wdxGraphicsWindow9.cxx.

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

void wdxGraphicsWindow9::fullscreen_restored ( WindowProperties properties) [protected, virtual]

This is a hook for derived classes to do something special, if necessary, when a fullscreen window has been restored after being minimized.

The given WindowProperties struct will be applied to this window's properties after this function returns.

Reimplemented from WinGraphicsWindow.

Definition at line 401 of file wdxGraphicsWindow9.cxx.

void wdxGraphicsWindow9::handle_reshape ( ) [protected, virtual]

Called in the window thread when the window size or location is changed, this updates the properties structure accordingly.

Reimplemented from WinGraphicsWindow.

Definition at line 420 of file wdxGraphicsWindow9.cxx.

References GraphicsWindow::get_properties(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), and WindowProperties::get_y_size().

bool wdxGraphicsWindow9::open_window ( ) [protected, virtual]
void wdxGraphicsWindow9::reset_window ( bool  swapchain) [protected, virtual]

Resets the window framebuffer right now.

Called from graphicsEngine. It releases the current swap chain / creates a new one. If this is the initial window and swapchain is false, then it calls reset_ main_device to Reset the device.

Reimplemented from GraphicsWindow.

Definition at line 376 of file wdxGraphicsWindow9.cxx.

References DXGraphicsStateGuardian9::release_swap_chain().

int wdxGraphicsWindow9::verify_window_sizes ( int  numsizes,
int *  dimen 
) [virtual]

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.

Reimplemented from GraphicsWindow.

Definition at line 187 of file wdxGraphicsWindow9.cxx.

References wdxGraphicsPipe9::search_for_valid_displaymode(), and wdxGraphicsPipe9::special_check_fullscreen_resolution().


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