create and manager default depth and stencil attachment. More...
Static Public Member Functions | |
static void | updateDefaultColorAttachmentTexture (id< MTLTexture > texture) |
Update default color attachment texture. More... | |
static MTLPixelFormat | getDefaultDepthStencilAttachmentPixelFormat () |
Get the default combined depth and stencil attachment pixel format. More... | |
static MTLPixelFormat | getDefaultColorAttachmentPixelFormat () |
Get the default color attachment pixel format. More... | |
static id< MTLTexture > | getDefaultDepthStencilTexture () |
Get the default combined depth and stencil texture. More... | |
static MTLPixelFormat | toMTLPixelFormat (PixelFormat textureFormat) |
Convert backend::PixelFormat to MTLPixelFormat. More... | |
static void | generateMipmaps (id< MTLTexture > texture) |
Generate a complete set of mipmaps in given texture. More... | |
static void | getTextureBytes (std::size_t origX, std::size_t origY, std::size_t rectWidth, std::size_t rectHeight, id< MTLTexture > texture, std::function< void(const unsigned char *, std::size_t, std::size_t)> callback) |
Read a block of pixels from the given texture. More... | |
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. More... | |
create and manager default depth and stencil attachment.
generate mipmaps. read pixles from texture.
|
static |
Update default color attachment texture.
texture | Specifies the texture to be setted to the color attachemnt. |
|
static |
Get the default combined depth and stencil attachment pixel format.
|
static |
Get the default color attachment pixel format.
|
static |
Get the default combined depth and stencil texture.
|
static |
Convert backend::PixelFormat to MTLPixelFormat.
textureFormat | Specifies a pixel format to be converted. |
|
static |
Generate a complete set of mipmaps in given texture.
texture | Specifies a texture to generate mipmap. |
|
static |
Read a block of pixels from the given texture.
origX,origY | Specify the window coordinates of the first pixel that is read from the given texture. This location is the lower left corner of a rectangular block of pixels. |
rectWidth,rectHeight | Specify the dimensions of the pixel rectangle. rectWidth and rectHeight of one correspond to a single pixel. |
texture | Specifies the texture to get the image. |
callback | Specifies a call back function to deal with the image. |
|
static |
Swizzle the iamge form the given format to MTLPixelFormatRGBA8Unorm.
image | Specifies the image to be swizzled. |
width | Specifies the width of the image. |
heigth | Specifies the height of the image. |
format | Specifies the format of the image. |