1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: demo_CommandList.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 46365 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef DEMO_COMMAND_LIST_H_ 17 #define DEMO_COMMAND_LIST_H_ 18 19 #include "demo/Utility/demo_Utility.h" 20 21 namespace demo 22 { 23 24 const u32 DEMO_COMMAND_LIST_NUM = 1; 25 26 /*! 27 @brief Class for command list 28 */ 29 30 class CommandList : private nn::util::NonCopyable<CommandList> 31 { 32 public: 33 CommandList(void); 34 virtual ~CommandList(void); 35 36 public: 37 void Initialize(const GLsizei bufferSize, const GLsizei requestNum, 38 const bool serialRunMode = false); 39 void Finalize(void); 40 41 public: 42 void Run(void); 43 protected: 44 void RunSingle(void); 45 public: 46 void Swap(void); 47 void Stop(void); 48 void Wait(void); 49 void Clear(void); 50 51 public: 52 void SetSerialRun(const bool flag); 53 54 protected: 55 bool m_InitializeFlag; 56 bool m_SerialRunFlag; 57 bool m_Padding[2]; 58 59 u32 m_StoreCommandListIndex; 60 u32 m_RunningCommandListIndex; 61 62 GLuint m_CommandListIdArray[DEMO_COMMAND_LIST_NUM]; 63 64 GLsizei m_BufferSize; 65 GLsizei m_RequestNum; 66 }; 67 68 } 69 70 #endif 71