8 #ifndef META_OCEAN_RENDERING_GLES_FRAME_TEXTURE_2D_H
9 #define META_OCEAN_RENDERING_GLES_FRAME_TEXTURE_2D_H
22 namespace GLESceneGraph
77 inline GLuint textureId()
const;
150 GLuint textureId_ = 0u;
159 bool updateNeeded_ =
false;
162 std::string textureName_ = std::string(
"primaryTexture");
This class implements Ocean's image class.
Definition: Frame.h:1792
Definition of a frame type composed by the frame dimension, pixel format and pixel origin.
Definition: Frame.h:30
This class implements a container for a compressed texture.
Definition: FrameTexture2D.h:71
This class is the base class for all 2D textures receiving their image content from a frame or a buff...
Definition: FrameTexture2D.h:38
CompressedFormat
Definition of individual compressed texture formats.
Definition: FrameTexture2D.h:45
This class implements a class factory for all GLESceneGraph objects.
Definition: GLESFactory.h:30
This class wraps a GLESceneGraph frame texture object.
Definition: GLESFrameTexture2D.h:32
void updateTexture()
Updates the texture.
void onDynamicUpdate(const ViewRef &view, const Timestamp timestamp) override
Update function called by the framebuffer.
Frame frame_
The texture's frame, if any.
Definition: GLESFrameTexture2D.h:153
FrameType frameType() const override
Returns the frame type of this 2D texture.
void createMipmap() override
Updates the mipmap for this texture.
bool setTexture(CompressedFrame &&compressedFrame) override
Sets or updates the texture with a given buffer.
bool isValid() const override
Returns whether the texture internally holds valid data.
~GLESFrameTexture2D() override
Destructs a GLESceneGraph texture 2D object.
static bool determineTextureProperties(const FrameType &frameType, GLenum &format, GLenum &type)
Determines the properties of the texture for a given frame type.
static bool compressedImageSize(const CompressedFormat compressedFormat, const unsigned int width, const unsigned int height, unsigned int &size)
Returns the image size for a compressed texture.
unsigned int bindTexture(GLESShaderProgram &shaderProgram, const unsigned int id) override
Binds this texture.
bool hasTransparentPixel() const override
Returns whether this texture contains at least one transparent pixel.
bool setTexture(Frame &&frame) override
Sets or updates the texture with a given frame.
GLuint textureId() const
Returns the texture id of the texture.
Definition: GLESFrameTexture2D.h:165
static bool determineCompressedFormat(const CompressedFormat compressedFormat, GLenum &internalFormat)
Determines the OpenGL format for a given compressed texture format.
CompressedFrame compressedFrame_
The texture's compressed frame, if any.
Definition: GLESFrameTexture2D.h:156
bool setTextureName(const std::string &name) override
Sets the name of the texture e.g., in a shader.
GLuint textureId_
The OpenGL ES texture id.
Definition: GLESFrameTexture2D.h:150
GLESFrameTexture2D()
Creates a new GLESceneGraph texture 2D object.
std::string textureName() const override
Returns the name of the texture e.g., in a shader.
This class implements a container for an OpenGL ES shader program.
Definition: GLESShaderProgram.h:53
This class wraps a GLESceneGraph texture object.
Definition: GLESTexture2D.h:34
This class implements a timestamp.
Definition: Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15