#include <windows.h>#include <d3d8.h>#include <d3dx8.h>#include <dxerr8.h>#include "pandabase.h"#include "graphicsWindow.h"Go to the source code of this file.
| Compounds | |
| struct | DXScreenData | 
| Defines | |
| #define | _WIN32_WINNT 0x0502 | 
| #define | WIN32_LEAN_AND_MEAN | 
| #define | D3D_OVERLOADS | 
| #define | D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DXGetErrorString8(HRESULT) << ": " << DXGetErrorDescription8(HRESULT) << endl | 
| #define | IS_NVIDIA(DDDEVICEID) ((DDDEVICEID.VendorId==0x10DE) || (DDDEVICEID.VendorId==0x12D2)) | 
| #define | IS_ATI(DDDEVICEID) (DDDEVICEID.VendorId==0x1002) | 
| #define | IS_MATROX(DDDEVICEID) (DDDEVICEID.VendorId==0x102B) | 
| #define | D3D_MAXTEXTURESTAGES 8 | 
| #define | ISPOW2(X) (((X) & ((X)-1))==0) | 
| #define | IS_VALID_PTR(PTR) (!IsBadWritePtr(PTR,sizeof(void*))) | 
| #define | DX_DECLARE_CLEAN(type, var) | 
| #define | SAFE_DELSHADER(TYPE, HANDLE, PDEVICE) if((HANDLE!=NULL)&&IS_VALID_PTR(PDEVICE)) { PDEVICE->Delete##TYPE##Shader(HANDLE); HANDLE=NULL; } | 
| #define | SAFE_DELETE(p) { if(p) { assert(IS_VALID_PTR(p)); delete (p); (p)=NULL; } } | 
| #define | SAFE_DELETE_ARRAY(p) { if(p) { assert(IS_VALID_PTR(p)); delete [] (p); (p)=NULL; } } | 
| #define | SAFE_RELEASE(p) { if(p) { assert(IS_VALID_PTR(p)); (p)->Release(); (p)=NULL; } } | 
| #define | SAFE_FREELIB(hDLL) { if(hDLL!=NULL) { FreeLibrary(hDLL);hDLL = NULL; } } | 
| #define | RELEASE_DOWN_TO_ZERO true | 
| #define | RELEASE_ONCE false | 
| #define | DEBUG_RELEASES | 
| #define | RELEASE(OBJECT, MODULE, DBGSTR, bDoDownToZero) | 
| #define | PRINT_REFCNT(MODULE, p) | 
| #define | DO_PSTATS_STUFF(XX) | 
| #define | PANDA_MAXNUMVERTS 0xFFFF | 
| #define | FLG(NN) (1<<NN) | 
| #define | MAX_POSSIBLE_TEXFMTS 32 | 
| #define | DISPLAY_32BPP_REQUIRES_16BPP_ZBUFFER_FLAG DXT1_FLAG | 
| #define | DISPLAY_16BPP_REQUIRES_16BPP_ZBUFFER_FLAG DXT2_FLAG | 
| #define | IS_16BPP_DISPLAY_FORMAT(FMT) (((FMT)==D3DFMT_R5G6B5)||((FMT)==D3DFMT_X1R5G5B5)||((FMT)==D3DFMT_A1R5G5B5)) | 
| #define | IS_16BPP_ZBUFFER(FMT) ((FMT==D3DFMT_D16)||(FMT==D3DFMT_D15S1)) | 
| #define | IS_STENCIL_FORMAT(FMT) (((FMT)==D3DFMT_D24S8) || ((FMT)==D3DFMT_D15S1) || ((FMT)==D3DFMT_D24X4S4)) | 
| #define | RECT_XSIZE(REC) (REC.right-REC.left) | 
| #define | RECT_YSIZE(REC) (REC.bottom-REC.top) | 
| Typedefs | |
| typedef DWORD | DXShaderHandle | 
| Enumerations | |
| enum | ShaderType { VertexShader, PixelShader } | 
| enum | D3DFORMAT_FLAG { R8G8B8_FLAG = FLG(0), A8R8G8B8_FLAG = FLG(1), X8R8G8B8_FLAG = FLG(2), R5G6B5_FLAG = FLG(3), X1R5G5B5_FLAG = FLG(4), A1R5G5B5_FLAG = FLG(5), A4R4G4B4_FLAG = FLG(6), R3G3B2_FLAG = FLG(7), A8_FLAG = FLG(8), A8R3G3B2_FLAG = FLG(9), X4R4G4B4_FLAG = FLG(10), A2B10G10R10_FLAG = FLG(11), G16R16_FLAG = FLG(12), A8P8_FLAG = FLG(13), P8_FLAG = FLG(14), L8_FLAG = FLG(15), A8L8_FLAG = FLG(16), A4L4_FLAG = FLG(17), V8U8_FLAG = FLG(18), L6V5U5_FLAG = FLG(19), X8L8V8U8_FLAG = FLG(20), Q8W8V8U8_FLAG = FLG(21), V16U16_FLAG = FLG(22), W11V11U10_FLAG = FLG(23), A2W10V10U10_FLAG = FLG(24), UYVY_FLAG = FLG(25), YUY2_FLAG = FLG(26), DXT1_FLAG = FLG(27), DXT2_FLAG = FLG(28), DXT3_FLAG = FLG(29), DXT4_FLAG = FLG(30), DXT5_FLAG = FLG(31) } | 
| Functions | |
| void | Init_D3DFORMAT_map (void) | 
| const char * | D3DFormatStr (D3DFORMAT fmt) | 
| Variables | |
| map< D3DFORMAT_FLAG, D3DFORMAT > | g_D3DFORMATmap | 
| 
 | 
| 
 Definition at line 25 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 69 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::dx_cleanup(), and DXGraphicsStateGuardian8::free_d3d_device(). | 
| 
 | 
| 
 Definition at line 35 of file dxgsg8base.h. | 
| 
 | 
| 
 | 
| 
 Definition at line 98 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 184 of file dxgsg8base.h. Referenced by wdxGraphicsPipe8::search_for_valid_displaymode(). | 
| 
 | 
| 
 Definition at line 183 of file dxgsg8base.h. Referenced by wdxGraphicsPipe8::search_for_valid_displaymode(). | 
| 
 | 
| 
 Definition at line 140 of file dxgsg8base.h. | 
| 
 | 
| Value: type var; \ ZeroMemory(&var, sizeof(type)); \ var.dwSize = sizeof(type); Definition at line 77 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 145 of file dxgsg8base.h. | 
| 
 | 
| 
 | 
| 
 Definition at line 187 of file dxgsg8base.h. Referenced by wdxGraphicsPipe8::find_best_depth_format(), and wdxGraphicsPipe8::search_for_valid_displaymode(). | 
| 
 | 
| 
 Definition at line 66 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 67 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 65 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 188 of file dxgsg8base.h. Referenced by wdxGraphicsWindow8::create_screen_buffers_and_device(), DXGraphicsStateGuardian8::do_clear(), wdxGraphicsWindow8::do_fullscreen_resize(), and wdxGraphicsWindow8::verify_window_sizes(). | 
| 
 | 
| 
 Definition at line 75 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 74 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 146 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::dx_init(). | 
| 
 | 
| 
 Definition at line 143 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian8::dx_init(), and DXGraphicsStateGuardian8::GenerateSphere(). | 
| 
 | 
| Value: { ULONG refcnt;  (p)->AddRef();  refcnt=(p)->Release(); \
                                 MODULE##_cat.debug() << #p << " has refcnt = " << refcnt << " at " << __FILE__ << ":" << __LINE__ << endl; }
Definition at line 117 of file dxgsg8base.h. Referenced by wdxGraphicsWindow8::create_screen_buffers_and_device(), CD3DFont::DeleteDeviceObjects(), DXGraphicsStateGuardian8::dx_cleanup(), DXGraphicsStateGuardian8::dx_init(), CD3DFont::InvalidateDeviceObjects(), and CD3DFont::RestoreDeviceObjects(). | 
| 
 | 
| 
 Definition at line 189 of file dxgsg8base.h. Referenced by ConvertD3DSurftoPixBuf(), and DXGraphicsStateGuardian8::copy_pixel_buffer(). | 
| 
 | 
| 
 Definition at line 190 of file dxgsg8base.h. Referenced by ConvertD3DSurftoPixBuf(), and DXGraphicsStateGuardian8::copy_pixel_buffer(). | 
| 
 | 
| Value: {  \
   ULONG refcnt;                                                \
   if(IS_VALID_PTR(OBJECT)) {                                   \
        refcnt = (OBJECT)->Release();                           \
        MODULE##_cat.debug() << DBGSTR << " released, refcnt = " << refcnt << " at " << __FILE__ << ":" << __LINE__ << endl; \
        if((bDoDownToZero) && (refcnt>0)) {                     \
              MODULE##_cat.warning() << DBGSTR << " released but still has a non-zero refcnt(" << refcnt << "), multi-releasing it down to zero!\n"; \
              do {                                \
                refcnt = (OBJECT)->Release();     \
              } while(refcnt>0);                  \
        }                                         \
        (OBJECT) = NULL;                          \
      } else {                                    \
        MODULE##_cat.debug() << DBGSTR << " not released, ptr == NULL" << endl;  \
      }}
Definition at line 101 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 93 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 94 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 85 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 86 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 82 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::DeleteAllDeviceObjects(), and DXGraphicsStateGuardian8::dx_cleanup(). | 
| 
 | 
| 
 Definition at line 90 of file dxgsg8base.h. | 
| 
 | 
| 
 | 
| 
 Definition at line 27 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 72 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::read_pixel_shader(), and DXGraphicsStateGuardian8::read_vertex_shader(). | 
| 
 | 
| 
 
 Definition at line 147 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::dx_init(). | 
| 
 | 
| 
 Definition at line 71 of file dxgsg8base.h. | 
| 
 | 
| 
 Definition at line 838 of file wdxGraphicsPipe8.cxx. Referenced by ConvertD3DSurftoPixBuf(), wdxGraphicsWindow8::create_screen_buffers_and_device(), DXTextureContext8::CreateTexture(), wdxGraphicsPipe8::find_best_depth_format(), and wdxGraphicsPipe8::search_for_valid_displaymode(). | 
| 
 | 
| 
 Definition at line 797 of file wdxGraphicsPipe8.cxx. References g_D3DFORMATmap. Referenced by wdxGraphicsPipe8::init(). | 
| 
 | 
| 
 Definition at line 216 of file dxgsg8base.h. Referenced by DXGraphicsStateGuardian8::dx_init(), and Init_D3DFORMAT_map(). | 
 1.3
1.3