| 300 | } |
| 301 | |
| 302 | void 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 | |
| 328 | void LAppView::PostModelDraw(LAppModel &refModel) |
| 329 | { |
no test coverage detected