00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef DXTEXTURECONTEXT7_H
00020 #define DXTEXTURECONTEXT7_H
00021
00022 #include "dxgsg7base.h"
00023
00024 #include <texture.h>
00025 #include <textureContext.h>
00026
00027
00028
00029
00030
00031 class EXPCL_PANDADX DXTextureContext7 : public TextureContext {
00032 friend class DXGraphicsStateGuardian7;
00033 friend class wdxGraphicsWindow7;
00034
00035 public:
00036 DXTextureContext7(Texture *tex);
00037 ~DXTextureContext7();
00038
00039 LPDIRECTDRAWSURFACE7 _surface;
00040 Texture *_tex;
00041
00042
00043
00044 #ifdef USE_TEXFMTVEC
00045 LPDIRECTDRAWSURFACE7 CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, DDPixelFormatVec &TexFmts,LPD3DDEVICEDESC7 pD3DDevDesc);
00046 #else
00047 LPDIRECTDRAWSURFACE7 CreateTexture(LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts, DDPIXELFORMAT *pTexFmts,LPD3DDEVICEDESC7 pD3DDevDesc);
00048 #endif
00049
00050 bool _bHasMipMaps;
00051 DWORD _PixBufConversionType;
00052
00053
00054 void DeleteTexture(void);
00055 HRESULT FillDDSurfTexturePixels(void);
00056
00057 protected:
00058 unsigned int get_bits_per_pixel(PixelBuffer::Format format, int *alphbits);
00059
00060 public:
00061 static TypeHandle get_class_type() {
00062 return _type_handle;
00063 }
00064 static void init_type() {
00065 TextureContext::init_type();
00066 register_type(_type_handle, "DXTextureContext7",
00067 TextureContext::get_class_type());
00068 }
00069 virtual TypeHandle get_type() const {
00070 return get_class_type();
00071 }
00072 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00073
00074 private:
00075 static TypeHandle _type_handle;
00076 };
00077
00078
00079 #endif
00080