12#ifndef MANAGEDTEXTURE3D_H_6014714286
13#define MANAGEDTEXTURE3D_H_6014714286
15#include <Carna/Carna.h>
115 ,
const void* bufferPtr );
Defines Carna::base::GeometryFeature.
Defines Carna::base::ManagedTexture3DInterface.
Represents an association.
Represents "components" that are aggregated by Geometry objects. Closer description is given here.
Interfaces the Texture<3> that a ManagedTexture3D represents.
Represents 3D OpenGL texture object whose lifetime is managed by instances of this class.
const int internalFormat
Holds the number of color components in the texture, e.g. GL_RGBA8UI or GL_INTENSITY16.
ManagedTexture3DInterface ManagedInterface
Defines the type to be used for interfacing the video resource.
virtual bool controlsSameVideoResource(const GeometryFeature &) const override
Tells whether this instance maintains the same video resources like other.
const base::math::Matrix4f textureCoordinatesCorrection
Stretches texture coordinates s.t. the centers of the texels, that are located in the texture corners...
ManagedTexture3D(const math::Vector3ui &size, int internalFormat, int pixelFormat, int bufferType, const void *bufferPtr)
Instantiates.
const int bufferType
Specifies the data type of the pixel data to be uploaded to the texture.
~ManagedTexture3D()
Deletes.
const int pixelFormat
Holds the format of the pixel data, e.g. GL_RED, GL_RGB or GL_RGBA.
const void *const bufferPtr
Points to the pixel data that will be uploaded to the texture.
virtual ManagedTexture3DInterface * acquireVideoResource() override
Acquires the video resources from this GeometryFeature by returning new instance of a class derived f...
const math::Vector3ui size
Tells the resolution of this texture.
std::unique_ptr< Texture< 3 > > textureObject
Holds the maintained OpenGL texture object.
static ManagedTexture3D & create(const math::Vector3ui &size, int internalFormat, int pixelFormat, int bufferType, const void *bufferPtr)
Instantiates. Invoke release when it isn't needed any longer.
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
#define NON_COPYABLE
Features class it is placed in as non-copyable.