Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch WebXRInterface from using external textures to using the render targets from Godot #55869

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Dec 12, 2021

This has two positive effects:

  1. 2D controls on a CanvasLayer will actually render, which is useful for smartphone AR
  2. There's less code - deleting lines is always good :-)

This PR is only for 3.x - I tried to make a 4.x version, but it really doesn't make sense. The primary change here is that we are taking an OpenGL texture ID for a texture that Godot created and passing it into the WebXR JS code (rather than the texture being created on the JS end). But in 4.x, there is no OpenGL texture ID to pass in, since we're still waiting for 3D and XR support to be added to the OpenGL renderer in 4.x. I asked @BastiaanOlij on RocketChat and he thought it would be OK to make this 3.x only.

@dsnopek dsnopek requested a review from a team as a code owner December 12, 2021 19:28
@dsnopek dsnopek modified the milestone: 3.5 Dec 12, 2021
@dsnopek dsnopek added this to the 3.5 milestone Dec 12, 2021
@dsnopek dsnopek requested a review from a team December 12, 2021 19:36
Copy link
Contributor

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @dsnopek , indeed much simpler this way. The external texture feature only makes sense if it results in Godot rendering into the buffer the XR Compositor will use to render things on screen. As this currently not the case but you're blitting the end result to WebXRs provided framebuffer this is simpler and better.

@akien-mga akien-mga merged commit 8098d16 into godotengine:3.x Dec 12, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants