1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_OnScreenBuffer.h 4 5 Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain proprietary 8 information of Nintendo and/or its licensed developers and are protected by 9 national and international copyright laws. They may not be disclosed to third 10 parties or copied or duplicated in any form, in whole or in part, without the 11 prior written consent of Nintendo. 12 13 The content herein is highly confidential and should be handled accordingly. 14 15 $Revision: 31311 $ 16 *---------------------------------------------------------------------------*/ 17 18 #ifndef NW_GFX_ONSCREENBUFFER_H_ 19 #define NW_GFX_ONSCREENBUFFER_H_ 20 21 #include <nw/gfx/gfx_IRenderTarget.h> 22 #include <nw/ut/ut_Preprocessor.h> 23 24 namespace nw 25 { 26 namespace os 27 { 28 class IAllocator; 29 } // namespace os 30 31 namespace gfx 32 { 33 34 //--------------------------------------------------------------------------- 35 //! @brief 画面に表示させるための描画対象を表すクラスです。 36 //--------------------------------------------------------------------------- 37 class OnScreenBuffer : public IRenderTarget 38 { 39 private: 40 NW_DISALLOW_COPY_AND_ASSIGN(OnScreenBuffer); 41 42 public: 43 NW_UT_RUNTIME_TYPEINFO; 44 45 //! 設定内容を取得します。 GetDescription()46 virtual const Description& GetDescription() const { return m_Description; } 47 48 //--------------------------------------------------------------------------- 49 //! @brief バッファオブジェクトを取得します。 50 //! 51 //! @return バッファオブジェクトを返します。 52 //--------------------------------------------------------------------------- GetBufferObject()53 virtual const FrameBufferObject& GetBufferObject() const { return m_BackBufferObject; } 54 55 private: 56 //! @brief コンストラクタです。 57 OnScreenBuffer(os::IAllocator* pAllocator, const Description& description); 58 59 void InitializeGl(); 60 void InitizlizeManulally(); 61 62 //! @brief デストラクタです。 63 virtual ~OnScreenBuffer(); 64 65 u32 m_ColorBuffer; 66 u32 m_DepthBuffer; 67 FrameBufferObject m_BackBufferObject; 68 69 Description m_Description; 70 71 friend class IRenderTarget; 72 }; 73 74 } // namespace gfx 75 } // namespace nw 76 77 #endif // NW_GFX_ONSCREENBUFFER_H_ 78