"L. Spiro Engine"
|
00001 00016 #ifndef __LSG_RENDERQUEUEBASE_H__ 00017 #define __LSG_RENDERQUEUEBASE_H__ 00018 00019 #include "../LSGGraphicsLib.h" 00020 #include "LSGRenderQueueClient.h" 00021 #include "LSGRenderQueueItem.h" 00022 #include "Vector/LSTLVectorPoD.h" 00023 00024 namespace lsg { 00025 00032 class CRenderQueueBase { 00033 public : 00034 // == Functions. 00040 LSVOID LSE_CALL SetAlphaBased( LSBOOL _bValue ); 00041 00050 LSVOID LSE_CALL AddItem( LSG_RENDER_QUEUE_ITEM * _prqiItem, 00051 CRenderQueueClient * _prqcSender, LSREAL _fDist, LSUINTPTR _uiptrUser ); 00052 00056 LSVOID LSE_CALL Clear(); 00057 00063 LSE_INLINE LSUINT32 LSE_CALL TotalItems() const; 00064 00065 00066 protected : 00067 // == Various constructors. 00068 LSE_CALLCTOR CRenderQueueBase(); 00069 00070 // == Types. 00074 typedef struct LSG_RENDER_QUEUE_ENTRY { 00078 LSG_RENDER_QUEUE_ITEM * prqiItem; 00079 00083 CRenderQueueClient * prqcSender; 00084 00088 LSUINTPTR uiptrUser; 00089 00093 LSREAL fDist; 00094 00098 LSBOOL bAlpha; 00099 00103 LSUINT32 ui32MaxPass; 00104 } * LPLSG_RENDER_QUEUE_ENTRY, * const LPCLSG_RENDER_QUEUE_ENTRY; 00105 00106 00107 // == Members. 00111 CVectorPoD<LSG_RENDER_QUEUE_ENTRY, LSUINT32, 1024UL> 00112 m_vList; 00113 00117 LSBOOL m_bAlpha; 00118 }; 00119 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00122 // DEFINITIONS 00123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00124 // == Functions. 00130 LSE_INLINE LSUINT32 LSE_CALL CRenderQueueBase::TotalItems() const { 00131 return m_vList.Length(); 00132 } 00133 00134 } // namespace lsg 00135 00136 #endif // __LSG_RENDERQUEUEBASE_H__