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

Update to new buffer copy - much faster now! #65

Open
Atair1 opened this issue Jan 7, 2022 · 0 comments
Open

Update to new buffer copy - much faster now! #65

Atair1 opened this issue Jan 7, 2022 · 0 comments

Comments

@Atair1
Copy link

Atair1 commented Jan 7, 2022

Edit: Sorry this was meant for the Blender glsl plugin.. i clicked on the wrong repo before writing the comment!!

Hi, i never got into github, so i am not familiar with making suggestions the proper way..
What i cam here to say:
there is a newer approach to copy data from buffers: https://developer.blender.org/D7053

basically changing lines 194, 195, 196 to:

buffer = bgl.Buffer(bgl.GL_FLOAT, self.width * self.height * 4)
bgl.glReadBuffer(bgl.GL_BACK)
bgl.glReadPixels(0, 0, self.width, self.height, bgl.GL_RGBA, bgl.GL_FLOAT, buffer)

and 207 to:
image.pixels.foreach_set(buffer)

makes everything much faster..

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

1 participant