/*---------------------------------------------------------------------------* Project: Horizon File: font_CmdCache.h Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Revision: 25674 $ *---------------------------------------------------------------------------*/ #ifndef NN_FONT_CTR_FONT_CMD_CACHE_H_ #define NN_FONT_CTR_FONT_CMD_CACHE_H_ #include #include namespace nn { namespace font { namespace CTR { //! :private //! @brief コマンドキャッシュクラスです。 class CmdCache { public: CmdCache(); ~CmdCache(); void Gen( GLuint size, bool isUseDrawElements); void Delete(); GLuint Start( bool clear = true ); void Stop( GLuint cmdListId, u32 validateMask, bool isCopy = true ); void Use() const; void Add( const u32* command, u32 size); GLubyte* GetAddr() const { return m_CmdBuffer; } GLsizei GetSize() const { return m_CmdBufferSize; } void Dump( bool asF32 = false, bool showMnemonic = false ) const #if !defined(NN_BUILD_NOOPT) && !defined(NN_BUILD_VERBOSE) { (void)asF32; (void)showMnemonic; } #else ; #endif static void Dump( const void* from, const void* to, bool asF32 = false, bool showMnemonic = false ) #if !defined(NN_BUILD_NOOPT) && !defined(NN_BUILD_VERBOSE) { (void)from; (void)to; (void)asF32; (void)showMnemonic; } #else ; #endif private: static void DumpCommon( const void* from, const void* to, bool asF32, bool showMnemonic ); GLuint m_CmdListID; GLubyte* m_CmdBuffer; GLsizei m_CmdBufferSize; GLsizei m_CmdMaxBufferSize; GLuint m_RequestId; GLsizei m_RequestSize; bool m_IsCopy; bool m_IsUseDrawElements; NN_PADDING2; }; } // namespace CTR } // namespace font } // namespace nn #endif // NN_FONT_CTR_FONT_CMD_CACHE_H_