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

Create a Framebuffer in Piston #280

Open
jabdoa2 opened this issue Oct 4, 2020 · 3 comments
Open

Create a Framebuffer in Piston #280

jabdoa2 opened this issue Oct 4, 2020 · 3 comments

Comments

@jabdoa2
Copy link

jabdoa2 commented Oct 4, 2020

Is there a sane way to render to a framebuffer/FBO in piston? Most of my 2D graphics never change and I would like to render them only once and then reuse the FBO until they change. Is that possible? I found this old SO response which explains how to do it using raw unsafe OpenGL commands. I tried the gfx_core example but it no longer works for me. Is this supported at all? Or is this intentionally unsupported?

@bvssvni
Copy link
Member

bvssvni commented Oct 5, 2020

@jabdoa2 Currently, there is no way to do this except to use the underlying graphics API.

@jabdoa2
Copy link
Author

jabdoa2 commented Oct 5, 2020

Should I use the gl calls directly or is there something I should try from gfx/gfx_core. Are PRs for this wanted in piston or should I create a separate crate for this? To me this seems to be something which exists in most game framework.

As a background: We are coming from a python framework which supports this. Currently, I'm not able to match the performance of kivy on embedded systems with my piston PoC which should be much faster in general. Piston actually is faster as long as there are few elements on screen but with a lot of elements interpreted python with FBOs wins because it simply does less work.

@bvssvni
Copy link
Member

bvssvni commented Oct 5, 2020

@jabdoa2 PRs are welcome! I agree this should be better. I'm open to suggestions.

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

No branches or pull requests

2 participants