⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 halcaps.cpp

📁 IMX31开发板
💻 CPP
📖 第 1 页 / 共 3 页
字号:
        DDSCAPS_OVERLAY |                       // Indicates that this surface is an overlay.
        DDSCAPS_PRIMARYSURFACE |                // Indicates the surface is the primary surface.
        // DDSCAPS_READONLY |                      // Indicates that only read access is permitted to the surface. When locking the surface with IDirectDrawSurface::Lock, the DDLOCK_READONLY flag must be specified.
        DDSCAPS_SYSTEMMEMORY |                  // Indicates that this surface memory was allocated in system memory.
        DDSCAPS_VIDEOMEMORY |                   // Indicates that this surface exists in display memory.
        // DDSCAPS_WRITEONLY |                     // Indicates that only write access is permitted to the surface.
        0;

    lpddhi->lpdwFourCC = FSLFourCC;                // fourcc codes supported

    lpddhi->ddCaps.dwVidMemTotal = g_nVideoMemorySize;
    lpddhi->ddCaps.dwVidMemFree = g_nVideoMemorySize;

    lpddhi->ddCaps.dwPalCaps=0;                                     // palette capabilities

    lpddhi->ddCaps.dwMaxVisibleOverlays=1;         // maximum number of visible overlays
    lpddhi->ddCaps.dwCurrVisibleOverlays = 0;      // current number of visible overlays
    lpddhi->ddCaps.dwMinOverlayStretch=125;        // Min Overlay Stretch factor
    lpddhi->ddCaps.dwMaxOverlayStretch=100000;     // Max Overlay Stretch factor


    lpddhi->ddCaps.dwNumFourCCCodes = MAX_FOURCC;  // number of four cc codes
    lpddhi->ddCaps.dwAlignBoundarySrc = 1;        // overlay source rectangle alignment
    lpddhi->ddCaps.dwAlignSizeSrc = 8;            // overlay source rectangle byte size
    lpddhi->ddCaps.dwAlignBoundaryDest = 1;        // overlay destination rectangle alignment
    lpddhi->ddCaps.dwAlignSizeDest = 8;        // overlay destination rectangle byte size


    lpddhi->ddCaps.dwMaxVisibleOverlays=1;         // maximum number of visible overlays
    lpddhi->ddCaps.dwCurrVisibleOverlays = 0;      // current number of visible overlays
    lpddhi->ddCaps.dwMinOverlayStretch=125;        // Min Overlay Stretch factor
    lpddhi->ddCaps.dwMaxOverlayStretch=100000;     // Max Overlay Stretch factor

#else

    lpddhi->ddCaps.dwCaps =                        // driver specific capabilities
        // DDCAPS_3D |                             // Display hardware has 3D acceleration
        // DDCAPS_BLT |                               // Display hardware is capable of blt operations
        // DDCAPS_BLTQUEUE |                        // Display hardware is capable of asynchronous blt operations
        // DDCAPS_BLTFOURCC |                      // Display hardware is capable of color space conversions during the blt operation
        // DDCAPS_BLTSTRETCH |                      // Display hardware is capable of stretching during blt operations
        DDCAPS_GDI |                               // Display hardware is shared with GDI
        DDCAPS_OVERLAY |                           // Display hardware can overlay
        DDCAPS_OVERLAYCANTCLIP |                   // Set if display hardware supports overlays but can not clip them
        DDCAPS_OVERLAYFOURCC |                     // overlay hardware is capable of color space conversions
        DDCAPS_OVERLAYSTRETCH |                    // Indicates that stretching can be done by the overlay hardware
        // DDCAPS_PALETTE |                        // unique DirectDrawPalettes can be created for DirectDrawSurfaces
        // DDCAPS_PALETTEVSYNC |                   // palette changes can be syncd with the vertical
        // DDCAPS_READSCANLINE |                      // Display hardware can return the current scan line
        // DDCAPS_STEREOVIEW |                     // Display hardware has stereo vision capabilities
        // DDCAPS_VBI |                               // Display hardware is capable of generating a vertical blank interrupt
        // DDCAPS_ZBLTS |                          // Supports the use of z buffers with blt operations
        // DDCAPS_ZOVERLAYS |                      // Supports Z Ordering of overlays
        DDCAPS_COLORKEY |                          // Supports color key
        // DDCAPS_ALPHA |                          // Supports alpha surfaces
        DDCAPS_COLORKEYHWASSIST |                   // colorkey is hardware assisted
        // DDCAPS_NOHARDWARE |                     // no hardware support at all
        // DDCAPS_BLTCOLORFILL |                      // Display hardware is capable of color fill with bltter
        // DDCAPS_BANKSWITCHED |                   // Display hardware is bank switched
        // DDCAPS_BLTDEPTHFILL |                   // Display hardware is capable of depth filling Z-buffers with bltter
        // DDCAPS_CANCLIP |                        // Display hardware is capable of clipping while bltting
        // DDCAPS_CANCLIPSTRETCHED |               // Display hardware is capable of clipping while stretch bltting
        // DDCAPS_CANBLTSYSMEM |                   // Display hardware is capable of bltting to or from system memory
        DDCAPS_ALIGNSIZESRC |
        DDCAPS_ALIGNSIZEDEST |
        DDCAPS_ALIGNSTRIDE |
        0;


    lpddhi->ddCaps.dwCKeyCaps =                    // color key capabilities of the surface
        // DDCKEYCAPS_DESTBLT                  |    // Supports transparent blitting with a color key that identifies the replaceable bits of the destination surface for RGB colors.
        DDCKEYCAPS_DESTOVERLAYONEACTIVE        |    // Supports only one active destination color key value for visible overlay surfaces.
        // DDCKEYCAPS_DESTOVERLAYYUV             |    // Supports overlaying using color keying of the replaceable bits of the destination surface being overlaid for YUV colors.
        DDCKEYCAPS_DESTOVERLAY                |    // Supports overlaying with color keying of the replaceable bits of the destination surface being overlaid for RGB colors.
        // DDCKEYCAPS_SRCBLT                     |    // Supports transparent blitting using the color key for the source with this surface for RGB colors.
        // DDCKEYCAPS_DESTBLTCLRSPACE         |    // Supports transparent blitting with a color space that identifies the replaceable bits of the destination surface for RGB colors.
        // DDCKEYCAPS_DESTBLTCLRSPACEYUV      |    // Supports transparent blitting with a color space that identifies the replaceable bits of the destination surface for YUV colors.
        // DDCKEYCAPS_DESTBLTYUV              |    // Supports transparent blitting with a color key that identifies the replaceable bits of the destination surface for YUV colors.
        // DDCKEYCAPS_DESTOVERLAYCLRSPACE     |    // Supports a color space as the color key for the destination of RGB colors.
        // DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV  |    // Supports a color space as the color key for the destination of YUV colors.
        DDCKEYCAPS_NOCOSTOVERLAY           |    // Indicates there are no bandwidth trade-offs for using the color key with an overlay.
        // DDCKEYCAPS_SRCBLTCLRSPACE          |    // Supports transparent blitting using a color space for the source with this surface for RGB colors.
        // DDCKEYCAPS_SRCBLTCLRSPACEYUV       |    // Supports transparent blitting using a color space for the source with this surface for YUV colors.
        // DDCKEYCAPS_SRCBLTYUV               |    // Supports transparent blitting using the color key for the source with this surface for YUV colors.
        DDCKEYCAPS_SRCOVERLAY                 |    // Supports overlaying using the color key for the source with this overlay surface for RGB colors.
        // DDCKEYCAPS_SRCOVERLAYCLRSPACE      |    // Supports overlaying using a color space as the source color key for the overlay surface for RGB colors.
        // DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV   |    // Supports overlaying using a color space as the source color key for the overlay surface for YUV colors.
        DDCKEYCAPS_SRCOVERLAYONEACTIVE        |    // Supports only one active source color key value for visible overlay surfaces.
        // DDCKEYCAPS_SRCOVERLAYYUV           |    // Supports overlaying using the color key for the source with this overlay surface for YUV colors.
        0;


    lpddhi->ddCaps.dwFXCaps=                       // driver specific stretching and effects capabilites
        // DDFXCAPS_BLTMIRRORUPDOWN |               // Supports vertical inversion Blts
        // DDFXCAPS_BLTROTATION90 |               // Supports vertical inversion Blts
        // DDFXCAPS_BLTSTRETCHY |                   // Supports stretch blts in the Y-direction
        // DDFXCAPS_BLTSHRINKY |                    // Supports shrink blts in the Y-direction
        // DDFXCAPS_BLTSTRETCHX |                   // Supports stretch blts in the X-direction
        // DDFXCAPS_BLTSHRINKX |                    // Supports shrink blts in the X-direction
         DDFXCAPS_OVERLAYSTRETCHX              |
         DDFXCAPS_OVERLAYSTRETCHXN             |
         DDFXCAPS_OVERLAYSTRETCHY              |
         DDFXCAPS_OVERLAYSTRETCHYN             |
        // DDFXCAPS_OVERLAYARITHSTRETCHYN      |
        // DDFXCAPS_OVERLAYARITHSTRETCHY       |
         DDFXCAPS_OVERLAYSHRINKX               |
         DDFXCAPS_OVERLAYSHRINKXN              |
         DDFXCAPS_OVERLAYSHRINKY               |
         DDFXCAPS_OVERLAYSHRINKYN              |
        // DDFXCAPS_OVERLAYALPHA               |
        DDFXCAPS_OVERLAYMIRRORUPDOWN |
        0;


    lpddhi->ddCaps.dwCaps2 =                    // more driver specific capabilities
                // DDCAPS2_CERTIFIED                                    // Display hardware is certified
                // DDCAPS2_NO2DDURING3DSCENE |                             // Driver cannot interleave 2D & 3D operations
                // DDCAPS2_VIDEOPORT |                                  // Display hardware contains a video port
                // DDCAPS2_AUTOFLIPOVERLAY |                    // automatic doubled buffered display of video port
                // DDCAPS2_CANBOBINTERLEAVED |                  // Overlay can display each field of interlaced data
                // DDCAPS2_CANBOBNONINTERLEAVED |               // As above but for non-interleaved data
                // DDCAPS2_COLORCONTROLOVERLAY |                // The overlay surface contains color controls
                // DDCAPS2_COLORCONTROLPRIMARY |                // The primary surface contains color controls
                // DDCAPS2_CANDROPZ16BIT |                              // RGBZ -> RGB supported for 16:16 RGB:Z
                // DDCAPS2_NONLOCALVIDMEM |                             // Driver supports non-local video memory
                // DDCAPS2_NONLOCALVIDMEMCAPS |                 // Dirver supports non-local video memory but has different capabilities
                // DDCAPS2_NOPAGELOCKREQUIRED |                 // Driver neither requires nor prefers surfaces to be pagelocked
                // TODO: Determine if this should be kept active
                DDCAPS2_WIDESURFACES |                                  // Driver can create surfaces which are wider than the primary surface
                // DDCAPS2_CANFLIPODDEVEN |                             // Driver supports bob without using a video port
                // DDCAPS2_CANBOBHARDWARE |                             // Driver supports bob using hardware
                // DDCAPS2_COPYFOURCC |                                 // Driver supports bltting any FOURCC surface to another surface of the same FOURCC
                0 ;


    lpddhi->ddCaps.dwPalCaps=0;                                     // palette capabilities

    lpddhi->ddCaps.dwSVCaps=0;                     // Stereo vision capabilities (none)
    lpddhi->ddCaps.dwAlphaBltConstBitDepths = 0;   // No Alpha Blt's
    lpddhi->ddCaps.dwAlphaBltPixelBitDepths = 0;
    lpddhi->ddCaps.dwAlphaBltSurfaceBitDepths = 0;
    lpddhi->ddCaps.dwZBufferBitDepths=0;           // No z buffer
    lpddhi->ddCaps.dwVidMemTotal = g_nVideoMemorySize;   // total amount of video memory
    lpddhi->ddCaps.dwVidMemFree = g_nVideoMemorySize;    // amount of free video memory


    lpddhi->ddCaps.dwMaxVisibleOverlays=1;         // maximum number of visible overlays
    lpddhi->ddCaps.dwCurrVisibleOverlays = 0;      // current number of visible overlays
    lpddhi->ddCaps.dwMinOverlayStretch=125;        // Min Overlay Stretch factor
    lpddhi->ddCaps.dwMaxOverlayStretch=100000;     // Max Overlay Stretch factor


    lpddhi->ddCaps.dwNumFourCCCodes = MAX_FOURCC;  // number of four cc codes
    lpddhi->ddCaps.dwAlignStrideAlign = 16;         // stride alignment
    lpddhi->ddCaps.dwAlignBoundarySrc = 1;        // overlay source rectangle alignment
    lpddhi->ddCaps.dwAlignSizeSrc = 8;            // overlay source rectangle byte size
    lpddhi->ddCaps.dwAlignBoundaryDest = 1;        // overlay destination rectangle alignment
    lpddhi->ddCaps.dwAlignSizeDest = 8;        // overlay destination rectangle byte size


    lpddhi->ddCaps.ddsCaps.dwCaps=                 // DDSCAPS structure has all the general capabilities
        // DDSCAPS_ALPHA |                         // Can create alpha-only surfaces
        DDSCAPS_BACKBUFFER |                       // Can create backbuffer surfaces
        DDSCAPS_COMPLEX |                          // Can create complex surfaces
        DDSCAPS_FLIP |                             // Can flip between surfaces
        DDSCAPS_FRONTBUFFER |                      // Can create front-buffer surfaces
        DDSCAPS_OFFSCREENPLAIN |                   // Can create off-screen bitmaps
        DDSCAPS_OVERLAY |                          // Can create overlay surfaces
        DDSCAPS_PALETTE |                          // Has one palette ???
        DDSCAPS_PRIMARYSURFACE |                   // Has a primary surface
        // DDSCAPS_PRIMARYSURFACELEFT |            // Has a left-eye primary surface
        // DDSCAPS_TEXTURE |                       // Supports texture surrfaces
        DDSCAPS_SYSTEMMEMORY |                  // Surfaces are in system memory
        DDSCAPS_VIDEOMEMORY |                      // Surfaces are in video memory
        DDSCAPS_VISIBLE |                          // Changes are instant ???
        // DDSCAPS_ZBUFFER |                       // Can create (pseudo) Z buffer
        // DDSCAPS_EXECUTEBUFFER |                 // Can create execute buffer
        // DDSCAPS_3DDEVICE |                      // Surfaces can be 3d targets
        // DDSCAPS_WRITEONLY |                     // Can create write-only surfaces
        // DDSCAPS_ALLOCONLOAD |                   // Can create alloconload surfaces
        // DDSCAPS_MIPMAP |                        // Can create mipmap
        0;

    // caps for system to video blts
    lpddhi->ddCaps.dwSVBCaps =             // driver specific capabilities
        // DDCAPS_BLT |                    // Display hardware is capable of
                                           // blt operations
        // DDCAPS_COLORKEY |               // Supports color key
        // DDCAPS_COLORKEYHWASSIST |       // colorkey is hardware assisted
        // DDCAPS_BLTCOLORFILL |           // Display hardware is capable of
                                           // color fill with bltter
        0;
    lpddhi->ddCaps.dwSVBCKeyCaps =        // color key capabilities of the surface
        // DDCKEYCAPS_SRCBLT |             // Hardware can use colorkey (cf source
                                          // only) ..for transparent blts
        0;
    lpddhi->ddCaps.dwSVBFXCaps=           // driver specific stretching and
                                          // effects capabilites
        0;


    lpddhi->dwMonitorFrequency = pModeTable->wRefreshRate;
                                                   // monitor frequency in current mode (60 field/sec)
    lpddhi->dwModeIndex = 0; // g_nMode;           // current mode: index into array
    lpddhi->lpdwFourCC = FSLFourCC;                // fourcc codes supported
    lpddhi->dwNumModes = 1;                        // number of modes supported
    lpddhi->lpModeInfo = pModeTable;               // mode information
    lpddhi->dwFlags =
                    DDHALINFO_MODEXILLEGAL |       // create flags
                    DDHALINFO_GETDRIVERINFOSET |
                    // DDHALINFO_ISPRIMARYDISPLAY |
                    0;
    lpddhi->lpPDevice = (LPVOID)0;                 // physical device ptr
    lpddhi->hInstance = (DWORD)0;                  // instance handle of driver
#endif // PLAT_WPC || PLAT_SMARTPHONE

    SETROPBIT(lpddhi->ddCaps.dwRops,SRCCOPY);      // Set bits for ROPS supported
    SETROPBIT(lpddhi->ddCaps.dwRops,PATCOPY);
    SETROPBIT(lpddhi->ddCaps.dwRops,BLACKNESS);
    SETROPBIT(lpddhi->ddCaps.dwRops,WHITENESS);

    DEBUGMSG(GPE_ZONE_INIT, (TEXT("DDIPU_SDC buildDDHALInfo: <==\r\n")));
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -