René's URL Explorer Experiment


Title: WebGPU surface creation / basic app lifecycle by tychedelia · Pull Request #1302 · processing/processing4 · GitHub

Open Graph Title: WebGPU surface creation / basic app lifecycle by tychedelia · Pull Request #1302 · processing/processing4

X Title: WebGPU surface creation / basic app lifecycle by tychedelia · Pull Request #1302 · processing/processing4

Description: Implements the basic rendering lifecycle needed to drive bevy forward from the processing event loop. When a PSurfaceGLFW is created, we pass the window handle over ffi and import it into bevy. Bevy then will create the underlying wgpu surface via its ordinary operations for windows. The Window here we insert is a non-functional facade -- we'll make sure to synchronize it from the Java side but have no need atm to allow bi-directional communication (i.e. bevy resizes Glfw). There's some additional work we'll need to do to think about multi-window support. Right now we're driving the wgpu renderer forward in endDraw on PGraphicsWebGPU but this may not be correct in the presence of multiple graphics contexts. Basically, for implementing the main processing api, what we'll want to do is run all the user's functions to build up a frame's worth of abstract draw data on the Rust side (i.e. insert stuff into the ECS world as needed) and then run update once at the end of frame which will drive the world forward one tick and present to the surface. GLFW + AWT = :( GLFW does not play nice with AWT, especially on macOS where we have the requirement to run on the main thread. This is well documented including in this repo and will be an issue long term. Right now, I've chosen to just hard code disabling AWT when launching a sketch, but we'll need a more comprehensive solution here eventually. How to test Right now, I've only added support for macOS because I don't have my other machines to test on. But if you have a mac it should be pretty easy, just add a basic bevy scene to the app init. The next PR should implement our first basic actual rendering to test from Java.

Open Graph Description: Implements the basic rendering lifecycle needed to drive bevy forward from the processing event loop. When a PSurfaceGLFW is created, we pass the window handle over ffi and import it into bevy. Bev...

X Description: Implements the basic rendering lifecycle needed to drive bevy forward from the processing event loop. When a PSurfaceGLFW is created, we pass the window handle over ffi and import it into bevy. Bev...

Opengraph URL: https://github.com/processing/processing4/pull/1302

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8de77821-e45c-9f4a-e390-03228c98c883
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD81A:300F93:60745C7:8221A35:6A5E0187
html-safe-noncec6d750721a52bcce4f08878afbd55a41d4b235eb3d52fb3b3f2a4138eb5c6bd4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODFBOjMwMEY5Mzo2MDc0NUM3OjgyMjFBMzU6NkE1RTAxODciLCJ2aXNpdG9yX2lkIjoiNDAyMTM0NDI4MTUwMDE4OTA2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb65f232aa53bea163ea02b129d9f708a42071eae8e0ede7760b93bd24ee9c0e5
hovercard-subject-tagpull_request:2938755313
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/processing/processing4/pull/1302/files
twitter:imagehttps://avatars.githubusercontent.com/u/10366310?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10366310?s=400&v=4
og:image:altImplements the basic rendering lifecycle needed to drive bevy forward from the processing event loop. When a PSurfaceGLFW is created, we pass the window handle over ffi and import it into bevy. Bev...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7c1de870f4c0eff05971cd22970403a1239a98dc1a35e52a43594f23fc4d546f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/processing/processing4 git https://github.com/processing/processing4.git
octolytics-dimension-user_id1617169
octolytics-dimension-user_loginprocessing
octolytics-dimension-repository_id844382769
octolytics-dimension-repository_nwoprocessing/processing4
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id844382769
octolytics-dimension-repository_network_root_nwoprocessing/processing4
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee90635d4b07e4a20ff548df2e2bfea2179c6a3f3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/processing/processing4/pull/1302/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprocessing%2Fprocessing4%2Fpull%2F1302%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprocessing%2Fprocessing4%2Fpull%2F1302%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=processing%2Fprocessing4
Reloadhttps://github.com/processing/processing4/pull/1302/files
Reloadhttps://github.com/processing/processing4/pull/1302/files
Reloadhttps://github.com/processing/processing4/pull/1302/files
Please reload this pagehttps://github.com/processing/processing4/pull/1302/files
processing https://github.com/processing
processing4https://github.com/processing/processing4
Please reload this pagehttps://github.com/processing/processing4/pull/1302/files
Notifications https://github.com/login?return_to=%2Fprocessing%2Fprocessing4
Fork 175 https://github.com/login?return_to=%2Fprocessing%2Fprocessing4
Star 442 https://github.com/login?return_to=%2Fprocessing%2Fprocessing4
Code https://github.com/processing/processing4
Issues 248 https://github.com/processing/processing4/issues
Pull requests 26 https://github.com/processing/processing4/pulls
Actions https://github.com/processing/processing4/actions
Projects https://github.com/processing/processing4/projects
Wiki https://github.com/processing/processing4/wiki
Security and quality 0 https://github.com/processing/processing4/security
Insights https://github.com/processing/processing4/pulse
Code https://github.com/processing/processing4
Issues https://github.com/processing/processing4/issues
Pull requests https://github.com/processing/processing4/pulls
Actions https://github.com/processing/processing4/actions
Projects https://github.com/processing/processing4/projects
Wiki https://github.com/processing/processing4/wiki
Security and quality https://github.com/processing/processing4/security
Insights https://github.com/processing/processing4/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fprocessing%2Fprocessing4%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fprocessing%2Fprocessing4%2Fissues%2Fnew%2Fchoose
tychedeliahttps://github.com/tychedelia
processing:the-wgpu-momenthttps://github.com/processing/processing4/tree/the-wgpu-moment
tychedelia:1271-surface-creationhttps://github.com/tychedelia/processing4/tree/1271-surface-creation
Conversation 7 https://github.com/processing/processing4/pull/1302
Commits 2 https://github.com/processing/processing4/pull/1302/commits
Checks 0 https://github.com/processing/processing4/pull/1302/checks
Files changed https://github.com/processing/processing4/pull/1302/files
Please reload this pagehttps://github.com/processing/processing4/pull/1302/files
WebGPU surface creation / basic app lifecycle https://github.com/processing/processing4/pull/1302/files#top
Show all changes 2 commits https://github.com/processing/processing4/pull/1302/files
bc5a524 Basic app lifecycle / surface creation. tychedelia Oct 22, 2025 https://github.com/processing/processing4/pull/1302/commits/bc5a52425d23ecd04f2600307c68ff9bcf943715
fa83874 Throw when not on macos. tychedelia Oct 22, 2025 https://github.com/processing/processing4/pull/1302/commits/fa83874d2012d442176e560dca0aac6c18f9b8ea
Clear filters https://github.com/processing/processing4/pull/1302/files
Please reload this pagehttps://github.com/processing/processing4/pull/1302/files
Please reload this pagehttps://github.com/processing/processing4/pull/1302/files
build.gradle.kts https://github.com/processing/processing4/pull/1302/files#diff-a6fced4b4e4a99784a2b92028b1adbc8c0ca28ff54e264b0e73727b3d4a460cf
PApplet.java https://github.com/processing/processing4/pull/1302/files#diff-846d69408802c91b9a58b14d8cd66c9e7007265822a1e330b64d991aaf27eeda
PConstants.java https://github.com/processing/processing4/pull/1302/files#diff-d9e1fc7de6ffaf108b4ff3bbeb9e81452a3674c85bd19a9c42d311000ef8307f
PGraphicsWebGPU.java https://github.com/processing/processing4/pull/1302/files#diff-5c287ec90f640185d635e60c39d326e9b4fa351d48df06c86a0ce2151e778dc2
PSurfaceGLFW.java https://github.com/processing/processing4/pull/1302/files#diff-1a271c8053aab461b21bd8f1132fc000719fb487028e55bf55352ff0b6d252bf
PWebGPU.java https://github.com/processing/processing4/pull/1302/files#diff-0085c138866e2716ecabe57a153bd4863eccc7e77d6c04f97e09f7378b4d8167
Runner.java https://github.com/processing/processing4/pull/1302/files#diff-4ac148a49ec5c30727b9c9dc68b17fa01281afc94824304eb7ed2e8179938d49
Cargo.lock https://github.com/processing/processing4/pull/1302/files#diff-a424153eb24e183472d49762f0f3b334690d38d7e8ac07fb8fc2302689cbfbfc
error.rs https://github.com/processing/processing4/pull/1302/files#diff-4edff8fb405bc6bfa7dc0745a1ed1ddb080fb44b0a0845b6d5b6686410f30be0
lib.rs https://github.com/processing/processing4/pull/1302/files#diff-fe9468adbd7a77f4af7ac0dd93af54f9490c5da61be9282f725f8f7a562f7b96
Cargo.toml https://github.com/processing/processing4/pull/1302/files#diff-d35d03d326453cdc2f7ddfd939df8e4b157861c5e7ec34bd1138264287ae1995
error.rs https://github.com/processing/processing4/pull/1302/files#diff-3e7212da2d810504624e8df5161d7cd3a62826803c046e28cd86c60aa6eff0d8
lib.rs https://github.com/processing/processing4/pull/1302/files#diff-2b5b62f564e7d8ecb4db92c6b6f4fa8a4c1a91885625bf9190ac2b95d0944bd3
core/build.gradle.ktshttps://github.com/processing/processing4/pull/1302/files#diff-a6fced4b4e4a99784a2b92028b1adbc8c0ca28ff54e264b0e73727b3d4a460cf
View file https://github.com/tychedelia/processing4/blob/fa83874d2012d442176e560dca0aac6c18f9b8ea/core/build.gradle.kts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/processing/processing4/pull/1302/{{ revealButtonHref }}
https://github.com/processing/processing4/pull/1302/files#diff-a6fced4b4e4a99784a2b92028b1adbc8c0ca28ff54e264b0e73727b3d4a460cf
https://github.com/processing/processing4/pull/1302/files#diff-a6fced4b4e4a99784a2b92028b1adbc8c0ca28ff54e264b0e73727b3d4a460cf
core/src/processing/core/PApplet.javahttps://github.com/processing/processing4/pull/1302/files#diff-846d69408802c91b9a58b14d8cd66c9e7007265822a1e330b64d991aaf27eeda
View file https://github.com/tychedelia/processing4/blob/fa83874d2012d442176e560dca0aac6c18f9b8ea/core/src/processing/core/PApplet.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/processing/processing4/pull/1302/{{ revealButtonHref }}
https://github.com/processing/processing4/pull/1302/files#diff-846d69408802c91b9a58b14d8cd66c9e7007265822a1e330b64d991aaf27eeda
https://github.com/processing/processing4/pull/1302/files#diff-846d69408802c91b9a58b14d8cd66c9e7007265822a1e330b64d991aaf27eeda
https://github.com/processing/processing4/pull/1302/files#diff-846d69408802c91b9a58b14d8cd66c9e7007265822a1e330b64d991aaf27eeda
https://github.com/processing/processing4/pull/1302/files#diff-846d69408802c91b9a58b14d8cd66c9e7007265822a1e330b64d991aaf27eeda
core/src/processing/core/PConstants.javahttps://github.com/processing/processing4/pull/1302/files#diff-d9e1fc7de6ffaf108b4ff3bbeb9e81452a3674c85bd19a9c42d311000ef8307f
View file https://github.com/tychedelia/processing4/blob/fa83874d2012d442176e560dca0aac6c18f9b8ea/core/src/processing/core/PConstants.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/processing/processing4/pull/1302/{{ revealButtonHref }}
https://github.com/processing/processing4/pull/1302/files#diff-d9e1fc7de6ffaf108b4ff3bbeb9e81452a3674c85bd19a9c42d311000ef8307f
https://github.com/processing/processing4/pull/1302/files#diff-d9e1fc7de6ffaf108b4ff3bbeb9e81452a3674c85bd19a9c42d311000ef8307f
core/src/processing/webgpu/PGraphicsWebGPU.javahttps://github.com/processing/processing4/pull/1302/files#diff-5c287ec90f640185d635e60c39d326e9b4fa351d48df06c86a0ce2151e778dc2
View file https://github.com/tychedelia/processing4/blob/fa83874d2012d442176e560dca0aac6c18f9b8ea/core/src/processing/webgpu/PGraphicsWebGPU.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/processing/processing4/pull/1302/{{ revealButtonHref }}
Please reload this pagehttps://github.com/processing/processing4/pull/1302/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.