MCPcopy Create free account
hub / github.com/Voine/ChatWaifu_Mobile / PreModelDraw

Method PreModelDraw

Live2D/src/main/cpp/LAppView.cpp:302–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void LAppView::PreModelDraw(LAppModel &refModel)
303{
304 // 別のレンダリングターゲットへ向けて描画する場合の使用するフレームバッファ
305 Csm::Rendering::CubismOffscreenFrame_OpenGLES2* useTarget = NULL;
306
307 if (_renderTarget != SelectTarget_None)
308 {// 別のレンダリングターゲットへ向けて描画する場合
309
310 // 使用するターゲット
311 useTarget = (_renderTarget == SelectTarget_ViewFrameBuffer) ? &_renderBuffer : &refModel.GetRenderBuffer();
312
313 if (!useTarget->IsValid())
314 {// 描画ターゲット内部未作成の場合はここで作成
315 int width = LAppDelegate::GetInstance()->GetWindowWidth();
316 int height = LAppDelegate::GetInstance()->GetWindowHeight();
317
318 // モデル描画キャンバス
319 useTarget->CreateOffscreenFrame(static_cast<csmUint32>(width), static_cast<csmUint32>(height));
320 }
321
322 // レンダリング開始
323 useTarget->BeginDraw();
324 useTarget->Clear(_clearColor[0], _clearColor[1], _clearColor[2], _clearColor[3]); // 背景クリアカラー
325 }
326}
327
328void LAppView::PostModelDraw(LAppModel &refModel)
329{

Callers 1

OnUpdateMethod · 0.80

Calls 6

GetWindowWidthMethod · 0.80
GetWindowHeightMethod · 0.80
IsValidMethod · 0.45
CreateOffscreenFrameMethod · 0.45
BeginDrawMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected