00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include "ISubPic.h"
00025
00026
00027
00028 class CDX7SubPic : public ISubPicImpl
00029 {
00030 CComPtr<IDirect3DDevice7> m_pD3DDev;
00031 CComPtr<IDirectDrawSurface7> m_pSurface;
00032
00033 protected:
00034 STDMETHODIMP_(void*) GetObject();
00035
00036 public:
00037 CDX7SubPic(IDirect3DDevice7* pD3DDev, IDirectDrawSurface7* pSurface);
00038
00039
00040 STDMETHODIMP GetDesc(SubPicDesc& spd);
00041 STDMETHODIMP CopyTo(ISubPic* pSubPic);
00042 STDMETHODIMP ClearDirtyRect(DWORD color);
00043 STDMETHODIMP Lock(SubPicDesc& spd);
00044 STDMETHODIMP Unlock(RECT* pDirtyRect);
00045 STDMETHODIMP AlphaBlt(RECT* pSrc, RECT* pDst, SubPicDesc* pTarget);
00046 };
00047
00048
00049
00050 class CDX7SubPicAllocator : public ISubPicAllocatorImpl, public CCritSec
00051 {
00052 CComPtr<IDirect3DDevice7> m_pD3DDev;
00053 CSize m_maxsize;
00054
00055 bool Alloc(bool fStatic, ISubPic** ppSubPic);
00056
00057 public:
00058 CDX7SubPicAllocator(IDirect3DDevice7* pD3DDev, SIZE maxsize, bool fPow2Textures);
00059
00060
00061 STDMETHODIMP ChangeDevice(IUnknown* pDev);
00062 };