Panda3D
Public Member Functions | Static Public Member Functions | Friends

DXTextureContext8 Class Reference

Inheritance diagram for DXTextureContext8:
TextureContext BufferContext AdaptiveLruPage SavedContext LinkedListNode AdaptiveLruPageDynamicList AdaptiveLruPageStaticList TypedObject LinkedListNode LinkedListNode MemoryBase

List of all members.

Public Member Functions

 DXTextureContext8 (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 ()
 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 ()
IDirect3DTexture8 * get_d3d_2d_texture () const
 Returns the Direct3D object that represents the texture, in the case of a 1-d or 2-d texture.
IDirect3DCubeTexture8 * get_d3d_cube_texture () const
 Returns the Direct3D object that represents the texture, in the case of a cube map texture.
IDirect3DBaseTexture8 * get_d3d_texture () const
 Returns the Direct3D object that represents the texture, whatever kind of texture it is.
IDirect3DVolumeTexture8 * 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, IDirect3DSurface8 *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 wdxGraphicsBuffer8

Detailed Description

Definition at line 26 of file dxTextureContext8.h.


Member Function Documentation

bool DXTextureContext8::create_texture ( DXScreenData scrn)
HRESULT DXTextureContext8::d3d_surface_to_texture ( RECT &  source_rect,
IDirect3DSurface8 *  d3d_surface,
bool  inverted,
Texture result,
int  z 
) [static]
void DXTextureContext8::delete_texture ( )

Release the surface used to store the texture.

Definition at line 906 of file dxTextureContext8.cxx.

Referenced by create_texture(), evict_lru(), and DXGraphicsStateGuardian8::upload_texture().

void DXTextureContext8::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 77 of file dxTextureContext8.cxx.

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

bool DXTextureContext8::extract_texture_data ( )
IDirect3DTexture8 * DXTextureContext8::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 dxTextureContext8.I.

Referenced by DXGraphicsStateGuardian8::framebuffer_copy_to_texture().

IDirect3DCubeTexture8 * DXTextureContext8::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 dxTextureContext8.I.

IDirect3DBaseTexture8 * DXTextureContext8::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 dxTextureContext8.I.

Referenced by DXGraphicsStateGuardian8::apply_texture().

IDirect3DVolumeTexture8 * DXTextureContext8::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 dxTextureContext8.I.

bool DXTextureContext8::has_mipmaps ( ) const [inline]

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

Definition at line 23 of file dxTextureContext8.I.

Referenced by DXGraphicsStateGuardian8::apply_texture().

static void DXTextureContext8::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 70 of file dxTextureContext8.h.

References TextureContext::init_type().


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