MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / FinishFrame

Method FinishFrame

engine/PoseidonGL33/TextureBankGL33_Cache.cpp:58–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void TextBankGL33::FinishFrame()
59{
60 for (HMipCacheGL33* tc = _thisFramePartialUsed.Last(); tc; tc = _thisFramePartialUsed.Prev(tc))
61 {
62 TextureGL33* tex = tc->texture;
63 tex->_levelNeededLastFrame = tex->_levelNeededThisFrame;
64 tex->_levelNeededThisFrame = tex->_nMipmaps;
65 tex->ResetMipmap();
66 }
67 for (HMipCacheGL33* tc = _thisFrameWholeUsed.Last(); tc; tc = _thisFrameWholeUsed.Prev(tc))
68 {
69 TextureGL33* tex = tc->texture;
70 tex->_levelNeededLastFrame = tex->_levelNeededThisFrame;
71 tex->_levelNeededThisFrame = tex->_nMipmaps;
72 tex->ResetMipmap();
73 }
74 for (HMipCacheGL33* tc = _lastFramePartialUsed.Last(); tc; tc = _lastFramePartialUsed.Prev(tc))
75 {
76 TextureGL33* tex = tc->texture;
77 tex->_levelNeededLastFrame = tex->_levelNeededThisFrame;
78 tex->_levelNeededThisFrame = tex->_nMipmaps;
79 tex->ResetMipmap();
80 }
81 for (HMipCacheGL33* tc = _lastFrameWholeUsed.Last(); tc; tc = _lastFrameWholeUsed.Prev(tc))
82 {
83 TextureGL33* tex = tc->texture;
84 tex->_levelNeededLastFrame = tex->_levelNeededThisFrame;
85 tex->_levelNeededThisFrame = tex->_nMipmaps;
86 tex->ResetMipmap();
87 }
88
89 _previousUsed.Move(_lastFrameWholeUsed);
90 PoseidonAssert(_lastFrameWholeUsed.Last() == nullptr);
91
92 _lastFrameWholeUsed.Move(_thisFrameWholeUsed);
93 PoseidonAssert(_thisFrameWholeUsed.Last() == nullptr);
94
95 _previousUsed.Move(_lastFramePartialUsed);
96 PoseidonAssert(_lastFramePartialUsed.Last() == nullptr);
97
98 _lastFramePartialUsed.Move(_thisFramePartialUsed);
99 PoseidonAssert(_thisFramePartialUsed.Last() == nullptr);
100}
101
102DEFINE_FAST_ALLOCATOR(HMipCacheGL33);
103

Callers 1

FinishDrawMethod · 0.45

Calls 4

LastMethod · 0.80
ResetMipmapMethod · 0.80
PrevMethod · 0.45
MoveMethod · 0.45

Tested by

no test coverage detected