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

How to make WebGL draw on a specific texture #22481

Open
paulrouget opened this issue Dec 17, 2018 · 2 comments
Open

How to make WebGL draw on a specific texture #22481

paulrouget opened this issue Dec 17, 2018 · 2 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Dec 17, 2018

For WebVR + immersive mode, FxR will provide a specific texture to draw on (new texture, new size).

Any recommendation on how to approach this?

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Dec 17, 2018

A typical scenario is:

  • servo renders a webpage which includes a webgl canvas
  • through the webvr api, the user requests to switch to immersive mode
  • FirefoxReality creates a SurfaceTexture
  • Servo needs to draw on the texture

Sending the surface handle to servo's internals is not really the problem, it's more about how to swap from the initial texture to a new one.

@jdm
Copy link
Member

@jdm jdm commented Dec 17, 2018

If you take a look at servo/surfman#131, that's the code that needs to be provided with the texture I'd so it can be bound to the framebuffer.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.