Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

wdxGraphicsBuffer8 Class Reference

An offscreen render buffer. More...

#include "wdxGraphicsBuffer8.h"

Inheritance diagram for wdxGraphicsBuffer8:
GraphicsBuffer GraphicsOutput GraphicsOutputBase DrawableRegion TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

 wdxGraphicsBuffer8 (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_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 process_events ()
 Do whatever processing is necessary to ensure that the window responds to user events.
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.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

virtual void close_buffer ()
 Closes the buffer right now.
virtual bool open_buffer ()
 Opens the window right now.

Friends

class DXGraphicsStateGuardian8
class DXTextureContext8

Detailed Description

An offscreen render buffer.

In OpenGL under Windows, this simply renders into a window that is never made visible. There's a Windows interface for rendering into a DIB, but this puts restrictions on the kind of pixelformat we can use, and thus makes it difficult to support one GSG rendering into an offscreen buffer and also into a window.

Definition at line 33 of file wdxGraphicsBuffer8.h.


Member Function Documentation

bool wdxGraphicsBuffer8::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 107 of file wdxGraphicsBuffer8.cxx.

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

void wdxGraphicsBuffer8::close_buffer ( ) [protected, virtual]

Closes the buffer right now.

Called from the window thread.

Reimplemented from GraphicsBuffer.

Definition at line 487 of file wdxGraphicsBuffer8.cxx.

void wdxGraphicsBuffer8::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 140 of file wdxGraphicsBuffer8.cxx.

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

bool wdxGraphicsBuffer8::open_buffer ( ) [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 GraphicsBuffer.

Definition at line 514 of file wdxGraphicsBuffer8.cxx.

void wdxGraphicsBuffer8::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 GraphicsBuffer.

Definition at line 467 of file wdxGraphicsBuffer8.cxx.

void wdxGraphicsBuffer8::select_cube_map ( int  cube_map_index) [virtual]

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

Definition at line 406 of file wdxGraphicsBuffer8.cxx.

References GraphicsOutput::count_textures(), DXTextureContext8::create_texture(), Texture::get_format(), GraphicsOutput::get_rtm_mode(), GraphicsOutput::get_texture(), TextureContext::get_texture(), and Texture::prepare_now().


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