NDEVR
API Documentation
GLESImageData

A pointer to an Image and functions relating to that image within the GLES logic space. More...

Inheritance diagram for GLESImageData:
[legend]
Collaboration diagram for GLESImageData:
[legend]

Public Member Functions

 GLESImageData (const DynamicPointer< GLESGraphicsDevice > &device, const StringView &image_id)
 Constructs a GLESImageData and uploads the image to GPU.
void destroy (const DynamicPointer< GLESGraphicsDevice > &instance)
 Deletes the GPU texture resource.
bool hasAlpha () const
 Checks whether the image has an alpha channel.
bool needsUpdate () const
 Checks whether the source image has been modified since last upload.
void setUniformVariables (uint04 bind_position, const DynamicPointer< GLESGraphicsDevice > &instance) const
 Binds this texture to the given texture unit for shader use.
void update (const DynamicPointer< GLESGraphicsDevice > &instance)
 Reloads and re-uploads the image texture to GPU.
Public Member Functions inherited from Image
virtual ~Image ()
 Virtual destructor for proper cleanup of derived Image classes.
virtual uint04 pixelSize () const
 Returns the number of bytes per pixel in this image.
virtual uint01scanLine (uint04 row)
 Returns a pointer to the raw pixel data for a given scanline (row).
virtual Vector< 2, uint04size () const
 Returns the dimensions of the image as a 2D vector (width, height).

Detailed Description

A pointer to an Image and functions relating to that image within the GLES logic space.


Definition at line 56 of file GLESImage.h.

Constructor & Destructor Documentation

◆ GLESImageData()

GLESImageData::GLESImageData ( const DynamicPointer< GLESGraphicsDevice > & device,
const StringView & image_id )
inline

Constructs a GLESImageData and uploads the image to GPU.

Parameters
[in]deviceThe OpenGL graphics device.
[in]image_idThe image identifier in the ImageFactory.

Definition at line 62 of file GLESImage.h.

References update().

Member Function Documentation

◆ destroy()

void GLESImageData::destroy ( const DynamicPointer< GLESGraphicsDevice > & instance)
inline

Deletes the GPU texture resource.

Parameters
[in]instanceThe OpenGL graphics device.

Definition at line 70 of file GLESImage.h.

References IsValid().

Referenced by update().

◆ hasAlpha()

bool GLESImageData::hasAlpha ( ) const
inline

Checks whether the image has an alpha channel.

Returns
True if the image has alpha transparency.

Definition at line 132 of file GLESImage.h.

◆ needsUpdate()

bool GLESImageData::needsUpdate ( ) const
inline

Checks whether the source image has been modified since last upload.

Returns
True if the image needs re-uploading.

Definition at line 138 of file GLESImage.h.

References ImageFactory::modifiedTime().

◆ setUniformVariables()

void GLESImageData::setUniformVariables ( uint04 bind_position,
const DynamicPointer< GLESGraphicsDevice > & instance ) const
inline

Binds this texture to the given texture unit for shader use.

Parameters
[in]bind_positionThe texture unit index.
[in]instanceThe OpenGL graphics device.

Definition at line 125 of file GLESImage.h.

◆ update()

void GLESImageData::update ( const DynamicPointer< GLESGraphicsDevice > & instance)
inline

Reloads and re-uploads the image texture to GPU.

Parameters
[in]instanceThe OpenGL graphics device.

Definition at line 78 of file GLESImage.h.

References cast(), ImageFactory::DefaultFactory(), destroy(), ImageFactory::getUncompressed(), ImageFactory::hasImage(), and ImageFactory::Resize().

Referenced by GLESImageData().


The documentation for this class was generated from the following file: