processing / processing/processing4

Copying PGraphics to PImage using .get() or .copy() clears PGraphics object, if the renderer is P2D

オープン
#681 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

help wanted opengl
主要言語
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:

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず、提供されたP2Dスケッチを実行し、Javaコアライブラリ内のPGraphicsのget()およびcopy()エントリポイントを追跡します。P2Dの動作をデフォルトのレンダラーと比較し、ソースとデスティネーションが空になる理由を確認します。P2DでコピーによってPGraphicsの内容が保持され、内容のあるPImageが生成されれば完了です。

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

評価

技術スタック
java
領域
computer-graphics
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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