STORM-IRIT / Radium-Engine

Research 3D Engine for rendering, animation and processing

Home Page:https://storm-irit.github.io/Radium-Engine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor Texture

dlyr opened this issue · comments

Current Engine/Data/Texture implementation have some flaws.
This issue is to track/discuss solution, in continuation of the modification proposed in #982

Concurrent multi-thread access might cause data inconsistency, between texture parameters and texture data.
Current implementation use texture parameters for multiples usage, and is a bit hacky.
Textures do not own its data, but may represent gpu data that was available on cpu side, but has been deleted afterward.

Proposed guidelines:
split sampler parameters and image data
make texture the owner of image data
then methods can use class own mutex, be re-entrant...