Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cDXSpriteDC.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cDXSpriteDC_H
7 #define _INC_cDXSpriteDC_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cDXBase.h"
15 
16 #ifdef USE_DXX
22 
23 namespace Gray3D
24 {
25  class cDXTextureBase;
26 
27  class GRAY3D_LINK cDXSpriteDC : public cDXBaseT<ID3DXSprite>
28  {
31 
32  typedef cDXBaseT<ID3DXSprite> SUPER_t;
33 
34  private:
35  bool m_bDrawOpen;
36  DWORD m_dwDrawOpenFlags;
37 
38  public:
39  // DECLARE_HEAP_ALIGNED_ALLOC(cDXSpriteDC);
40  cDXSpriteDC();
41  ~cDXSpriteDC();
42 
43  ID3DXSprite* get_Sprite() const
44  {
45  return m_pDXObj;
46  }
47 
48  HRESULT MakeTransform(const cPoint2i& ptDst, const cDXSpriteElem& SpriteElem);
49 
50  HRESULT DrawBegin(DWORD dwFlags);
51  HRESULT DrawBeginText();
52  HRESULT DrawElem(const cPoint2i& ptDst, const cDXSpriteElem& SpriteElem);
53  HRESULT DrawEnd();
54  HRESULT DrawEndBatch(); // end the current batch!
55 
56  // Begin, Draw, End in one function.
57  HRESULT DrawFull(const cPoint2i& ptDst, const cDXSpriteElem& SpriteElem);
58 
59  HRESULT InitDeviceObjects(cDXDevice* pDXDev);
60  virtual HRESULT OnLostDeviceX(void)
61  {
62  ASSERT(!m_bDrawOpen);
63  return SUPER_t::OnLostDeviceX();
64  }
65  };
66 
67  class GRAY3D_LINK cDXSpriteDrawBatch
68  {
69  };
70  class GRAY3D_LINK cDXSpriteDraw
71  {
72  };
73 }
74 
75 #endif // USE_DXX
76 #endif // _INC_cDXSpriteDC_H
#define GRAY3D_LINK
Definition: Gray3D.h:15
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
Definition: Gray3D.cpp:12