1 /*---------------------------------------------------------------------------*
2 Project: NintendoWare
3 File: dev_Utility.h
4
5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. 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 $Revision: 14250 $
14 *---------------------------------------------------------------------------*/
15
16 #ifndef NW_DEV_UTILITY_H_
17 #define NW_DEV_UTILITY_H_
18
19 #include <nw/types.h>
20 #include <GLES2/gl2.h>
21 #include <GLES2/gl2ext.h>
22
23
24 #if defined(NW_DEV_ENABLED)
25
26 //! @brief Debug/Development/Release のビルドターゲットに関係なく、コンソールへ文字列を出力します。
27 //!
28 //! @param[in] fmt フォーマット文字列です。
29 //! @param[in] ... フォーマットパラメータです。
30 //
31 void NW_DEV_LOG( const char* fmt, ... );
32
33 namespace nw {
34 namespace dev {
35
36 //! @brief 指定したカラーフォーマットとサイズで必要なメモリサイズを計算します。
37 int CalcMemorySize(GLint format, int width, int height);
38
39 //! @brief カラーフォーマットからバイト数を計算します。
40 int FormatToByte(GLint format);
41
42 } // namespace nw::dev
43 } // namespace nw
44
45 #else
46
47 #define NW_DEV_LOG(...) (void)0
48
49 namespace nw {
50 namespace dev {
51
CalcMemorySize(GLint,int,int)52 inline int CalcMemorySize(GLint, int, int) { return 0; }
53
FormatToByte(GLint)54 inline int FormatToByte(GLint) { return 0; }
55
56 } // namespace nw::dev
57 } // namespace nw
58
59 #endif // NW_DEV_ENABLED
60
61 #endif // NW_DEV_UTILITY_H_
62
63