Attach depth array layers and cube faces with the matching GL call

オープン 初心者向け
#141 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp

調査の方向性

source/renderer/ore/gl/ore_context_gl.cpp の ContextGL::beginRenderPass から始め、issue で言及されている深度 attachment の処理をカラー attachment の処理と比較してください。キューブの各面と 2D 配列の各レイヤーが、どの attachment 呼び出しと layer または mip の値を選択するか確認してください。深度のキューブおよび配列 view が対応する GL 呼び出しで attachment されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Attach depth array layers and cube faces with the matching GL call.

- source/renderer/ore/gl/ore_context_gl.cpp: Ore GL beginRenderPass: attach a layer of a depth array or cube face with the matching call, as color attachments do, instead of always as a 2D texture

diff --git a/source/renderer/ore/gl/ore_context_gl.cpp b/source/renderer/ore/gl/ore_context_gl.cpp
index f6ca307d474486aef4fba23b1785f7b7de0c1251..539a2c5ac2afc290d517afb2284044096bf04669 100644
--- a/source/renderer/ore/gl/ore_context_gl.cpp
+++ b/source/renderer/ore/gl/ore_context_gl.cpp
@@ -1264,6 +1264,24 @@ std::unique_ptr<RenderPass> ContextGL::beginRenderPass(
           GL_RENDERBUFFER,
           depthTexGL->m_glRenderbuffer);
     }
+    else if (depthTexGL->type() == TextureType::cube)
+    {
+      glFramebufferTexture2D(
+          GL_FRAMEBUFFER,
+          depthAttachment,
+          GL_TEXTURE_CUBE_MAP_POSITIVE_X + desc.depthStencil.view->baseLayer(),
+          depthTexGL->m_glTexture,
+          desc.depthStencil.view->baseMipLevel());
+    }
+    else if (depthTexGL->type() == TextureType::array2D)
+    {
+      glFramebufferTextureLayer(
+          GL_FRAMEBUFFER,
+          depthAttachment,
+          depthTexGL->m_glTexture,
+          desc.depthStencil.view->baseMipLevel(),
+          desc.depthStencil.view->baseLayer());
+    }
     else
     {
       glFramebufferTexture2D(
主要言語
C++
スター
1.2k
フォーク
133
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rive-app/rive-runtime のほかの issue

rive-app/rive-runtime の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。