U4DEngine::U4DRenderMultiImage class

The U4DRenderMultiImage class manages entities with multiple images such as buttons and joysticks.

Base classes

class U4DEngine::U4DRenderImage
The U4DRenderImage class manages the rendering of all 2D images.

Constructors, destructors, conversion operators

U4DRenderMultiImage(U4DImage* uU4DImage)
Constructor for class.
~U4DRenderMultiImage()
Destructor for class.

Public functions

void loadMTLTexture() virtual
Loads image texture into GPU.
void render(id<MTLRenderCommandEncoder> uRenderEncoder) virtual
Renders the current entity.
void setTexture0(const char* uTexture) virtual
Sets the texture image for the image.
void setTexture1(const char* uTexture) virtual
Sets the texture1 image for the image.
void createSecondaryTextureObject()
Create secondaray texture for multiple images.
void loadMTLAdditionalInformation() virtual
Loads the additional information.
void updateMultiImage()
Updates the image to render

Function documentation

U4DEngine::U4DRenderMultiImage::U4DRenderMultiImage(U4DImage* uU4DImage)

Constructor for class.

Parameters
uU4DImage image entity

It sets the image entity it will manage

U4DEngine::U4DRenderMultiImage::~U4DRenderMultiImage()

Destructor for class.

sets the multi-image buffer to null

void U4DEngine::U4DRenderMultiImage::loadMTLTexture() virtual

Loads image texture into GPU.

It decodes the current texture image, creates a texture object, a texture sampler, and loads the raw data into a buffer

void U4DEngine::U4DRenderMultiImage::render(id<MTLRenderCommandEncoder> uRenderEncoder) virtual

Renders the current entity.

Parameters
uRenderEncoder Metal encoder object for the current entity

Updates the space matrix and any rendering flags. It encodes the pipeline, buffers and issues the draw command

void U4DEngine::U4DRenderMultiImage::setTexture0(const char* uTexture) virtual

Sets the texture image for the image.

Parameters
uTexture texture name

It sets the texture that will be decoded into raw data and loaded into the texture buffer

void U4DEngine::U4DRenderMultiImage::setTexture1(const char* uTexture) virtual

Sets the texture1 image for the image.

Parameters
uTexture texture1 name

It sets the texture that will be decoded into raw data and loaded into the texture buffer

void U4DEngine::U4DRenderMultiImage::createSecondaryTextureObject()

Create secondaray texture for multiple images.

The main image uses the diffuse texture. The secondary image uses the ambient texture

void U4DEngine::U4DRenderMultiImage::loadMTLAdditionalInformation() virtual

Loads the additional information.

loads the secondary texture into the buffer

void U4DEngine::U4DRenderMultiImage::updateMultiImage()

Updates the image to render

Changes the image of the entity to render