Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
UtilsMTL Struct Reference

create and manager default depth and stencil attachment. More...

#include <UtilsMTL.h>

Static Public Member Functions

static void updateDefaultColorAttachmentTexture (id< MTLTexture > texture)
 Update default color attachment texture.
 
static id< MTLTexture > getDefaultDepthStencilTexture ()
 Get the default combined depth and stencil texture.
 
static MTLPixelFormat toMTLPixelFormat (PixelFormat textureFormat)
 Convert backend::PixelFormat to MTLPixelFormat.
 
static void generateMipmaps (id< MTLTexture > texture)
 Generate a complete set of mipmaps in given texture.
 
static void swizzleImage (unsigned char *image, std::size_t width, std::size_t height, MTLPixelFormat format)
 Swizzle the iamge form the given format to MTLPixelFormatRGBA8Unorm.
 

Detailed Description

create and manager default depth and stencil attachment.

generate mipmaps. read pixles from texture.

Member Function Documentation

◆ updateDefaultColorAttachmentTexture()

static void updateDefaultColorAttachmentTexture ( id< MTLTexture > texture)
static

Update default color attachment texture.

Parameters
textureSpecifies the texture to be setted to the color attachemnt.

◆ getDefaultDepthStencilTexture()

static id< MTLTexture > getDefaultDepthStencilTexture ( )
static

Get the default combined depth and stencil texture.

Returns
The default combined depth and stencil texture.

◆ toMTLPixelFormat()

static MTLPixelFormat toMTLPixelFormat ( PixelFormat textureFormat)
static

Convert backend::PixelFormat to MTLPixelFormat.

Parameters
textureFormatSpecifies a pixel format to be converted.
Returns
A MTLPixelFormat.

◆ generateMipmaps()

static void generateMipmaps ( id< MTLTexture > texture)
static

Generate a complete set of mipmaps in given texture.

Parameters
textureSpecifies a texture to generate mipmap.

◆ swizzleImage()

static void swizzleImage ( unsigned char * image,
std::size_t width,
std::size_t height,
MTLPixelFormat format )
static

Swizzle the iamge form the given format to MTLPixelFormatRGBA8Unorm.

Parameters
imageSpecifies the image to be swizzled.
widthSpecifies the width of the image.
heigthSpecifies the height of the image.
formatSpecifies the format of the image.

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