1 /*---------------------------------------------------------------------------*
2 Project: NintendoWare
3 File: lyt_DrawInfo.cpp
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: 13839 $
14 *---------------------------------------------------------------------------*/
15
16 #include "precompiled.h"
17
18 #include <nw/lyt/lyt_DrawInfo.h>
19 #include <nw/lyt/lyt_Types.h>
20 #include <nw/lyt/lyt_Common.h>
21 #include <nw/lyt/lyt_GraphicsResource.h>
22
23 namespace nw
24 {
25 namespace lyt
26 {
27
DrawInfo()28 DrawInfo::DrawInfo()
29 : m_LocationAdjustScale(1.f, 1.f),
30 m_GlobalAlpha(1.f),
31 m_pGraphicsResource(0),
32 m_pLayout(0)
33 {
34 std::memset(&m_Flag, 0, sizeof(m_Flag));
35
36 MTX34Identity(&m_ViewMtx);
37 }
38
~DrawInfo()39 DrawInfo::~DrawInfo()
40 {
41 }
42
43 void
SetProjectionMtx(const nw::math::MTX44 & mtx)44 DrawInfo::SetProjectionMtx(const nw::math::MTX44& mtx)
45 {
46 // 直ちにシェーダに反映させると複数の DrawInfo がある場合に
47 // 誤作動するので、ここでは値を保持するのみ。
48 // 実際の設定は Layout::Draw() で行う。
49 math::MTX44Copy(&m_ProjMtx, &mtx);
50 }
51
52 } // namespace nw::lyt
53 } // namespace nw
54