Panda3D
|
A single graphics window for rendering DirectX under Microsoft Windows. More...
#include "wdxGraphicsWindow8.h"
Classes | |
struct | DXDeviceInfo |
Public Member Functions | |
wdxGraphicsWindow8 (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 | wdxGraphicsPipe8 |
A single graphics window for rendering DirectX under Microsoft Windows.
Definition at line 31 of file wdxGraphicsWindow8.h.
bool wdxGraphicsWindow8::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 76 of file wdxGraphicsWindow8.cxx.
References GraphicsOutput::begin_frame_spam(), GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::get_fb_properties(), and DXGraphicsStateGuardian8::set_render_target().
void wdxGraphicsWindow8::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 245 of file wdxGraphicsWindow8.cxx.
References DXGraphicsStateGuardian8::release_swap_chain().
Referenced by open_window().
bool wdxGraphicsWindow8::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 451 of file wdxGraphicsWindow8.cxx.
References WinGraphicsWindow::do_fullscreen_resize(), wdxGraphicsPipe8::search_for_valid_displaymode(), and wdxGraphicsPipe8::special_check_fullscreen_resolution().
void wdxGraphicsWindow8::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 158 of file wdxGraphicsWindow8.cxx.
References GraphicsWindow::is_active(), and DXGraphicsStateGuardian8::show_frame().
void wdxGraphicsWindow8::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 113 of file wdxGraphicsWindow8.cxx.
References GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::copy_to_textures(), GraphicsOutput::end_frame_spam(), and WinGraphicsWindow::trigger_flip().
void wdxGraphicsWindow8::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 393 of file wdxGraphicsWindow8.cxx.
void wdxGraphicsWindow8::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 412 of file wdxGraphicsWindow8.cxx.
References GraphicsWindow::get_properties(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), and WindowProperties::get_y_size().
bool wdxGraphicsWindow8::open_window | ( | ) | [protected, virtual] |
Opens the window right now.
Called from the window thread. Returns true if the window is successfully opened, or false if there was a problem.
Reimplemented from WinGraphicsWindow.
Definition at line 267 of file wdxGraphicsWindow8.cxx.
References WindowProperties::add_properties(), close_window(), DXGraphicsStateGuardian8::copy_pres_reset(), DXGraphicsStateGuardian8::dx_cleanup(), GraphicsPipe::get_device(), GraphicsStateGuardian::get_pipe(), GraphicsWindow::get_properties(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), GraphicsWindow::is_fullscreen(), WinGraphicsWindow::open_window(), and WindowProperties::set_size().
void wdxGraphicsWindow8::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 368 of file wdxGraphicsWindow8.cxx.
References DXGraphicsStateGuardian8::release_swap_chain().
int wdxGraphicsWindow8::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 179 of file wdxGraphicsWindow8.cxx.
References wdxGraphicsPipe8::search_for_valid_displaymode(), and wdxGraphicsPipe8::special_check_fullscreen_resolution().