Skip to content

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

@Atair1

Description

@Atair1

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions