Textures loaded from disk are now cached for their lifetime (and immutable)
All textures are constructed via static factory methods which return shared pointers
Immutable textures can be made mutable via copy-construction.
Proper constructor for raw/mutable texture handling
Proper configuration of common texture wrapping/filtering options (these are shared across all instances of immutable textures)
All texture classes (and the new RenderBuffer) now have explicit copy constructors
Hope to eventually do this for all classes, especially Shaders
Textures now bind to shaders like everything else (but this might change in the near future when materials are added)
Texture2D autogenerates mipmap when setTexture() and resize() are called with data.
Not done:
Not added native support for glBindImageTexture() or memory barriers to Compute Shaders (this is currently used by GaussBlur/Compute shaders)
Not encapsulated copy constructors into a copy() or clone() method, trigger copy constructor currently involves dereferencing a shared pointer, this seems awkward. May add this in future, but I don't currently think copy constructors will be widely used, they were added more for safety.
Haven't created a format factory for raw textures like we have for FrameBufferAttachment, desirable option but don't currently feel a need, never had much issue working these out with docs.
Haven't tested copy constructors either (although cant see why they would fail).
This is a large breaking change.
Primary improvements:
RenderBuffer
) now have explicit copy constructorsShaders
Texture2D
autogenerates mipmap whensetTexture()
andresize()
are called with data.Not done:
glBindImageTexture()
or memory barriers to Compute Shaders (this is currently used by GaussBlur/Compute shaders)copy()
orclone()
method, trigger copy constructor currently involves dereferencing a shared pointer, this seems awkward. May add this in future, but I don't currently think copy constructors will be widely used, they were added more for safety.FrameBufferAttachment
, desirable option but don't currently feel a need, never had much issue working these out with docs.