Panda3D
|
A single graphics window for rendering OpenGL under Microsoft Windows. More...
#include "wglGraphicsWindow.h"
Public Member Functions | |
wglGraphicsWindow (GraphicsEngine *engine, GraphicsPipe *pipe, const string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg, GraphicsOutput *host) | |
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. | |
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 void | ready_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. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Protected Member Functions | |
virtual void | close_window () |
Closes the window right now. | |
virtual bool | open_window () |
Opens the window right now. |
A single graphics window for rendering OpenGL under Microsoft Windows.
Definition at line 26 of file wglGraphicsWindow.h.
void wglGraphicsWindow::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 WinGraphicsWindow.
Definition at line 140 of file wglGraphicsWindow.cxx.
bool wglGraphicsWindow::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 63 of file wglGraphicsWindow.cxx.
References GraphicsOutput::begin_frame_spam(), GraphicsOutput::clear_cube_map_selection(), wglGraphicsStateGuardian::get_context(), GraphicsOutput::get_fb_properties(), and GraphicsWindow::get_unexposed_draw().
void wglGraphicsWindow::close_window | ( | ) | [protected, virtual] |
Closes the window right now.
Called from the window thread.
Reimplemented from WinGraphicsWindow.
Definition at line 209 of file wglGraphicsWindow.cxx.
Referenced by open_window().
void wglGraphicsWindow::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 185 of file wglGraphicsWindow.cxx.
References wglGraphicsStateGuardian::get_context().
void wglGraphicsWindow::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 108 of file wglGraphicsWindow.cxx.
References GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::copy_to_textures(), GraphicsOutput::end_frame_spam(), and WinGraphicsWindow::trigger_flip().
bool wglGraphicsWindow::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 227 of file wglGraphicsWindow.cxx.
References wglGraphicsStateGuardian::choose_pixel_format(), close_window(), wglGraphicsStateGuardian::fail_pfnum(), wglGraphicsStateGuardian::get_context(), wglGraphicsStateGuardian::get_fb_properties(), wglGraphicsStateGuardian::get_pfnum(), WinGraphicsWindow::open_window(), FrameBufferProperties::subsumes(), and FrameBufferProperties::verify_hardware_software().
void wglGraphicsWindow::ready_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 when command, but will not actually flip
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 158 of file wglGraphicsWindow.cxx.
References wglGraphicsStateGuardian::get_context().