Panda3D
Public Member Functions | Static Public Member Functions | Friends
DXTextureContext9 Class Reference
Inheritance diagram for DXTextureContext9:
TextureContext BufferContext AdaptiveLruPage SavedContext LinkedListNode AdaptiveLruPageDynamicList AdaptiveLruPageStaticList TypedObject LinkedListNode LinkedListNode MemoryBase

List of all members.

Public Member Functions

 DXTextureContext9 (PreparedGraphicsObjects *pgo, Texture *tex, int view)
bool create_simple_texture (DXScreenData &scrn)
bool create_texture (DXScreenData &scrn)
 Use panda texture's pixelbuffer to create a texture for the specified device.
void delete_texture ()
 Release the surface used to store the texture.
virtual void evict_lru ()
 Evicts the page from the LRU.
bool extract_texture_data (DXScreenData &scrn)
 This method will be called in the draw thread to download the texture memory's image into its ram_image value.
virtual TypeHandle force_init_type ()
IDirect3DTexture9 * get_d3d_2d_texture () const
 Returns the Direct3D object that represents the texture, in the case of a 1-d or 2-d texture.
IDirect3DCubeTexture9 * get_d3d_cube_texture () const
 Returns the Direct3D object that represents the texture, in the case of a cube map texture.
IDirect3DBaseTexture9 * get_d3d_texture () const
 Returns the Direct3D object that represents the texture, whatever kind of texture it is.
IDirect3DVolumeTexture9 * get_d3d_volume_texture () const
 Returns the Direct3D object that represents the texture, in the case of a 3-d texture.
virtual TypeHandle get_type () const
bool has_mipmaps () const
 Returns true if the texture was created with mipmaps, false otherwise.

Static Public Member Functions

static HRESULT d3d_surface_to_texture (RECT &source_rect, IDirect3DSurface9 *d3d_surface, bool inverted, Texture *result, int z)
 copies source_rect in pD3DSurf to upper left of texture
static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Friends

class wdxGraphicsBuffer9

Detailed Description

Definition at line 28 of file dxTextureContext9.h.


Member Function Documentation

HRESULT DXTextureContext9::d3d_surface_to_texture ( RECT &  source_rect,
IDirect3DSurface9 *  d3d_surface,
bool  inverted,
Texture result,
int  z 
) [static]

Release the surface used to store the texture.

Definition at line 1060 of file dxTextureContext9.cxx.

Referenced by evict_lru(), and DXGraphicsStateGuardian9::upload_texture().

void DXTextureContext9::evict_lru ( ) [virtual]

Evicts the page from the LRU.

Called internally when the LRU determines that it is full. May also be called externally when necessary to explicitly evict the page.

It is legal for this method to either evict the page as requested, do nothing (in which case the eviction will be requested again at the next epoch), or requeue itself on the tail of the queue (in which case the eviction will be requested again much later).

Reimplemented from AdaptiveLruPage.

Definition at line 81 of file dxTextureContext9.cxx.

References delete_texture(), AdaptiveLruPage::dequeue_lru(), TextureContext::get_texture(), TextureContext::mark_unloaded(), AdaptiveLruPage::mark_used_lru(), and TextureContext::update_data_size_bytes().

IDirect3DTexture9 * DXTextureContext9::get_d3d_2d_texture ( ) const [inline]

Returns the Direct3D object that represents the texture, in the case of a 1-d or 2-d texture.

Definition at line 45 of file dxTextureContext9.I.

Referenced by DXGraphicsStateGuardian9::framebuffer_copy_to_texture().

IDirect3DCubeTexture9 * DXTextureContext9::get_d3d_cube_texture ( ) const [inline]

Returns the Direct3D object that represents the texture, in the case of a cube map texture.

Definition at line 67 of file dxTextureContext9.I.

IDirect3DBaseTexture9 * DXTextureContext9::get_d3d_texture ( ) const [inline]

Returns the Direct3D object that represents the texture, whatever kind of texture it is.

Definition at line 34 of file dxTextureContext9.I.

Referenced by DXGraphicsStateGuardian9::apply_texture().

IDirect3DVolumeTexture9 * DXTextureContext9::get_d3d_volume_texture ( ) const [inline]

Returns the Direct3D object that represents the texture, in the case of a 3-d texture.

Definition at line 56 of file dxTextureContext9.I.

bool DXTextureContext9::has_mipmaps ( ) const [inline]

Returns true if the texture was created with mipmaps, false otherwise.

Definition at line 23 of file dxTextureContext9.I.

Referenced by DXGraphicsStateGuardian9::apply_texture().

static void DXTextureContext9::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from TextureContext.

Definition at line 76 of file dxTextureContext9.h.

References TextureContext::init_type().


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