Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DXTextureContext7 Class Reference

#include <dxTextureContext7.h>

Inheritance diagram for DXTextureContext7:

TextureContext SavedContext TypedObject List of all members.

Public Member Functions

 DXTextureContext7 (Texture *tex)
 ~DXTextureContext7 ()
LPDIRECTDRAWSURFACE7 CreateTexture (LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, DDPIXELFORMAT *pTexFmts, LPD3DDEVICEDESC7 pD3DDevDesc)
void DeleteTexture (void)
HRESULT FillDDSurfTexturePixels (void)
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
virtual size_t estimate_texture_memory ()
 Estimates the amount of texture memory that will be consumed by loading this texture.

void mark_dirty (int flags_to_set)
 Marks the context "dirty", i.e.

void clear_dirty_flags (int flags_to_clear=~0)
 Removes the indicated flags from the "dirty" bits.

int get_dirty_flags () const
 Returns the current state of the dirty flags.

int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.

bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.


Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.


Public Attributes

LPDIRECTDRAWSURFACE7 _surface
Texture_tex
bool _bHasMipMaps
DWORD _PixBufConversionType
Texture_texture

Protected Member Functions

unsigned int get_bits_per_pixel (PixelBuffer::Format format, int *alphbits)
 Maps from the PixelBuffer's Format symbols to bpp.


Static Private Attributes

TypeHandle _type_handle

Friends

class DXGraphicsStateGuardian7
class wdxGraphicsWindow7

Constructor & Destructor Documentation

DXTextureContext7::DXTextureContext7 Texture tex  ) 
 

Definition at line 1951 of file dxTextureContext7.cxx.

References _tex, DeleteTexture(), and NULL.

DXTextureContext7::~DXTextureContext7  ) 
 

Definition at line 1964 of file dxTextureContext7.cxx.


Member Function Documentation

void TextureContext::clear_dirty_flags int  flags_to_clear = ~0  )  [inline, inherited]
 

Removes the indicated flags from the "dirty" bits.

See mark_dirty().

The value is the union of all the bits that are to be cleared; if a bit is set in the parameter, it will be removed from the dirty set. Bits that are not set in this parameter are left unchanged.

This function is intended to be called by the GSG after it has updated the texture parameters.

Definition at line 103 of file textureContext.I.

Referenced by DXGraphicsStateGuardian8::draw_sphere().

LPDIRECTDRAWSURFACE7 DXTextureContext7::CreateTexture LPDIRECT3DDEVICE7  pd3dDevice,
int  cNumTexPixFmts,
DDPIXELFORMAT *  pTexFmts,
LPD3DDEVICEDESC7  pD3DDevDesc
 

Definition at line 1015 of file dxTextureContext7.cxx.

References ConversionType, DWORD, NULL, PixelBuffer::T_unsigned_byte, and PixelBuffer::Type.

void DXTextureContext7::DeleteTexture void   ) 
 

Definition at line 1920 of file dxTextureContext7.cxx.

Referenced by DXTextureContext7().

size_t TextureContext::estimate_texture_memory  )  [virtual, inherited]
 

Estimates the amount of texture memory that will be consumed by loading this texture.

This is mainly useful for debugging and reporting purposes.

Returns a value in bytes.

Definition at line 46 of file textureContext.cxx.

References TextureContext::_texture, Texture::FT_linear_mipmap_linear, Texture::FT_linear_mipmap_nearest, Texture::FT_nearest_mipmap_linear, Texture::FT_nearest_mipmap_nearest, and size_t.

HRESULT DXTextureContext7::FillDDSurfTexturePixels void   ) 
 

Definition at line 1665 of file dxTextureContext7.cxx.

References _surface.

virtual TypeHandle DXTextureContext7::force_init_type void   )  [inline, virtual]
 

Reimplemented from TextureContext.

Definition at line 77 of file dxTextureContext7.h.

unsigned int DXTextureContext7::get_bits_per_pixel PixelBuffer::Format  format,
int *  alphbits
[protected]
 

Maps from the PixelBuffer's Format symbols to bpp.

returns # of alpha bits Note: PixelBuffer's format indicates REQUESTED final format, not the stored format, which is indicated by pixelbuffer type

Definition at line 169 of file dxTextureContext7.cxx.

References PixelBuffer::F_blue, PixelBuffer::F_depth_component, PixelBuffer::F_luminance, PixelBuffer::F_luminance_alpha, PixelBuffer::F_luminance_alphamask, PixelBuffer::F_rgb, PixelBuffer::F_rgb12, PixelBuffer::F_rgb332, PixelBuffer::F_rgb5, PixelBuffer::F_rgb8, PixelBuffer::F_rgba, PixelBuffer::F_rgba12, PixelBuffer::F_rgba4, PixelBuffer::F_rgba5, PixelBuffer::F_rgba8, and PixelBuffer::F_rgbm.

TypeHandle DXTextureContext7::get_class_type void   )  [inline, static]
 

Reimplemented from TextureContext.

Definition at line 66 of file dxTextureContext7.h.

int TextureContext::get_dirty_flags  )  const [inline, inherited]
 

Returns the current state of the dirty flags.

If this is non-zero, it represents the union of all properties that have been changed since the last call to clear_dirty_flags().

This function is intended to be called by the GSG to determine what properties need to be updated. See Texture::DirtyFlags for a list of possible bits.

Definition at line 131 of file textureContext.I.

Referenced by DXGraphicsStateGuardian8::draw_sphere().

virtual TypeHandle DXTextureContext7::get_type void   )  const [inline, virtual]
 

Reimplemented from TextureContext.

Definition at line 74 of file dxTextureContext7.h.

int TypedObject::get_type_index  )  const [inline, inherited]
 

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 71 of file typedObject.I.

References TypeHandle::get_name(), TypedObject::get_type(), and INLINE.

void DXTextureContext7::init_type void   )  [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 69 of file dxTextureContext7.h.

References TextureContext::get_class_type().

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is the indicated type exactly.

Definition at line 101 of file typedObject.I.

Referenced by PT(), and CollisionNode::xform().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

void TextureContext::mark_dirty int  flags_to_set  )  [inline, inherited]
 

Marks the context "dirty", i.e.

its properties are different from the last time the GSG has seen them. Presumably, the GSG will respond by updating the properties and clearing the dirty bits the next time it renders the texture.

The value is the union of all the bits that are to be set dirty; bits that are not set in this parameter are left unchanged. See Texture::DirtyFlags for a list of available bits.

Usually this function is not called directly, but rather is called by Texture::mark_dirty() as a result of changing properties directly on the texture.

Definition at line 72 of file textureContext.I.

References TextureContext::_texture.


Friends And Related Function Documentation

friend class DXGraphicsStateGuardian7 [friend]
 

Definition at line 37 of file dxTextureContext7.h.

friend class wdxGraphicsWindow7 [friend]
 

Definition at line 38 of file dxTextureContext7.h.


Member Data Documentation

bool DXTextureContext7::_bHasMipMaps
 

Definition at line 55 of file dxTextureContext7.h.

DWORD DXTextureContext7::_PixBufConversionType
 

Definition at line 56 of file dxTextureContext7.h.

LPDIRECTDRAWSURFACE7 DXTextureContext7::_surface
 

Definition at line 44 of file dxTextureContext7.h.

Referenced by FillDDSurfTexturePixels().

Texture* DXTextureContext7::_tex
 

Definition at line 45 of file dxTextureContext7.h.

Referenced by DXTextureContext7().

Texture* TextureContext::_texture [inherited]
 

Definition at line 64 of file textureContext.h.

Referenced by GLGraphicsStateGuardian::bind_texture(), DXGraphicsStateGuardian8::draw_sphere(), TextureContext::estimate_texture_memory(), DXTextureContext8::FillDDSurfTexturePixels(), TextureContext::mark_dirty(), and CRGraphicsStateGuardian::release_geom_node().

TypeHandle DXTextureContext7::_type_handle [static, private]
 

Reimplemented from TextureContext.

Definition at line 70 of file dxTextureContext7.cxx.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:49:44 2003 for Panda by doxygen1.3