magic-lang / ooc-kean

ooc port of parts of Kean.
MIT License
7 stars 30 forks source link

Move recycling of GpuImages to a lower abstraction layer #1067

Open emilwestergren opened 8 years ago

emilwestergren commented 8 years ago

Currently OpenGLPacked images (packed GpuImages) are recycled in the GpuContext they are created in. I suggest we move this recycling to a lower level (OpenGL texture level). This is more in sync with the recycling of ByteBuffer for RasterImages.

@sebastianbaginski @simonmika opinions?

ghost commented 8 years ago

The cost is some extra memory allocations every frame

How much will it cost in terms of processing time per frame ?

Hides recycling from the "user layer"

I think it's a good idea.

simonmika commented 8 years ago

Go ahead. It is a good idea as we most likely will keep the luma part around for longer then the color.

emilwestergren commented 8 years ago

How much will it cost in terms of processing time per frame ?

Not that much, it's just the extra allocation and deallocation of object data for the high level images.

marcusnaslund commented 8 years ago

Is this issue still relevant? @emilwestergren

emilwestergren commented 8 years ago

Yes, but it's not urgent and it might not be possible with our current architecture.