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