DDModeInfoObject.inl
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: DDModeInfoObject.inl
- // Inlines for CDDModeInfoObject
- inline DWORD CDDModeInfoObject::GetWidth(void) const
- {
- ASSERT(m_pDDSurfaceDesc->dwSize == sizeof(DDSURFACEDESC2));
- ASSERT((m_pDDSurfaceDesc->dwFlags & DDSD_WIDTH) != 0);
- return m_pDDSurfaceDesc->dwWidth;
- }
- inline DWORD CDDModeInfoObject::GetHeight(void) const
- {
- ASSERT(m_pDDSurfaceDesc->dwSize == sizeof(DDSURFACEDESC2));
- ASSERT((m_pDDSurfaceDesc->dwFlags & DDSD_HEIGHT) != 0);
- return m_pDDSurfaceDesc->dwHeight;
- }
- inline DWORD CDDModeInfoObject::GetBPP(void) const
- {
- ASSERT(m_pDDSurfaceDesc->dwSize == sizeof(DDSURFACEDESC2));
- // Check that Pixel format is valid
- ASSERT((m_pDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT) != 0);
- ASSERT(m_pDDSurfaceDesc->ddpfPixelFormat.dwSize == sizeof(DDPIXELFORMAT));
- // Assume it is RGB
- return m_pDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount;
- }