processing / processing/processing4
Copying PGraphics to PImage using .get() or .copy() clears PGraphics object, if the renderer is P2D
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 494
- フォーク
- 183
- 平均マージ
- 4時間 39分
- マージ済み PR(30日)
- 3
説明
Created by: agrshch
Description
An attempt of copying information from PGraphics to PImage using get() or copy() clears the PGraphics object if P2D renderer is used. It makes impossible many things, for example using PGraphics (or its copy) as a texture for the shader.
Expected Behavior
successful copying, like with default renderer
Current Behavior
both PGraphics and PImage are empty.
Steps to Reproduce
PGraphics img1;
void setup() {
size(300, 300, P2D);
img1 = createGraphics(200, 200, P2D);
img1.beginDraw();
img1.background(120);
img1.endDraw();
PImage img2 = img1.get(); // if comment out this line — grey rectangle appears
}
void draw() {
background(255);
image(img1, 100, 20);
}
Your Environment
- Processing version: 4.2
- Operating System and OS version: Mac OS 10.15.7
- Other information:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されたP2Dスケッチを実行し、Javaコアライブラリ内のPGraphicsのget()およびcopy()エントリポイントを追跡します。P2Dの動作をデフォルトのレンダラーと比較し、ソースとデスティネーションが空になる理由を確認します。P2DでコピーによってPGraphicsの内容が保持され、内容のあるPImageが生成されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100