processing / processing/processing4

Move core away from OpenGL (JOGL) Dependencies

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

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

help wanted
主要言語
Java
スター
494
フォーク
183
平均マージ
4時間 39分
マージ済み PR(30日)
3

説明

[!NOTE]
This issue is a Work In Progress about a long term goal.
It needs more discussion and is subject to changes.

Reasoning

There are a number of reasons to want to move away from OpenGL and JOGL:

  • OpenGL is deprecated on macOS, and support could be removed at any time.
  • JOGL is no longer actively maintained, raising concerns about stability, security, and the ability to adapt to new platforms.
  • ...
Challenges
  • Tight Coupling with Core Components: JOGL is deeply integrated with Swing, PGraphics, AWT, and Processing's event management system. This makes it difficult to migrate without breaking existing functionality.
  • Rigidity of Modern Graphics APIs: Modern graphics APIs like Vulkan and WebGPU offer more control and performance but are more rigid in how the rendering pipeline is structured. Unlike OpenGL, which allows flexible, state-based changes at runtime, Vulkan and WebGPU require rendering pipelines to be defined upfront through fixed pipeline objects. This rigidity poses challenges for a creative coding tool like Processing, where sketches often rely on modifying drawing parameters on the fly.
  • Backward Compatibility: Many sketches, libraries, and tools rely on JOGL-based renderers (P2D/P3D). Replacing them could introduce breaking changes. Small visual differences in rendering may also cause issues, especially in an educational context.
  • ...
Research
  • Look into OpenRNDR's approach: using Google’s Angle library. Emulates the entire OpenGL ES API. Bridges to Metal via MoltenVK, WebGPU via WGPU (Rust).
  • LWJGL. There was an attempt by Andres Colubri and Jakub Valtar but it was abandonned. There is a working fork of processing where OpenGL was replaced with LWJGL by Neil C. Smith called libp5x.
  • FX2D support for Processing exists via a library, but it has not been updated for years, and there are compatibility issues with recent versions of Processing. It may be a viable alternative to P2D.
Proposed Approach
  • Modularize the Rendering Pipeline: Decoupling rendering from event management and UI layers would make it easier to support multiple backends in the future.
  • Introduce a New Renderer Alongside JOGL: Instead of an immediate replacement, we propose developing and releasing a new renderer library (e.g., LWJGL-based) as an alternative to P2D/P3D. This would allow for gradual adoption, testing, and feedback without disrupting existing workflows.
  • Phased Deprecation of JOGL: Long-term, we should consider sunsetting JOGL-based renderers once alternatives are stable and widely adopted. This would involve clear communication with the community, providing migration guides, and maintaining legacy support for a transition period.

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

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

はじめの一歩

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

調査の方向性

まず、JOGL が Swing、PGraphics、AWT、および Processing のイベント管理システムとどのように結合されているかをマッピングします。OpenRNDR、LWJGL、libp5x、FX2D のリファレンスを読み、そのうえで、既存のスケッチを壊すことなく P2D/P3D と並行して代替 renderer を導入できるモジュール型のレンダリングパスを定義します。

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

評価

技術スタック
java
領域
computer-graphics
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

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

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