create and manager default depth and stencil attachment.
More...
|
static void | updateDefaultColorAttachmentTexture (id< MTLTexture > texture) |
| Update default color attachment texture.
|
|
static MTLPixelFormat | getDefaultDepthStencilAttachmentPixelFormat () |
| Get the default combined depth and stencil attachment pixel format.
|
|
static MTLPixelFormat | getDefaultColorAttachmentPixelFormat () |
| Get the default color attachment pixel format.
|
|
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 | 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.
|
|
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.
|
|
create and manager default depth and stencil attachment.
generate mipmaps. read pixles from texture.
static void updateDefaultColorAttachmentTexture |
( |
id< MTLTexture > |
texture | ) |
|
|
static |
Update default color attachment texture.
- Parameters
-
texture | Specifies the texture to be setted to the color attachemnt. |
static MTLPixelFormat getDefaultDepthStencilAttachmentPixelFormat |
( |
| ) |
|
|
static |
Get the default combined depth and stencil attachment pixel format.
- Returns
- The default combined depth and stencil attachment pixel format.
static MTLPixelFormat getDefaultColorAttachmentPixelFormat |
( |
| ) |
|
|
static |
Get the default color attachment pixel format.
- Returns
- The default color attachment pixel format.
static id<MTLTexture> getDefaultDepthStencilTexture |
( |
| ) |
|
|
static |
Get the default combined depth and stencil texture.
- Returns
- The default combined depth and stencil texture.
static MTLPixelFormat toMTLPixelFormat |
( |
PixelFormat |
textureFormat | ) |
|
|
static |
Convert backend::PixelFormat to MTLPixelFormat.
- Parameters
-
textureFormat | Specifies a pixel format to be converted. |
- Returns
- A MTLPixelFormat.
static void generateMipmaps |
( |
id< MTLTexture > |
texture | ) |
|
|
static |
Generate a complete set of mipmaps in given texture.
- Parameters
-
texture | Specifies a texture to generate mipmap. |
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 |
|
) |
| |
|
static |
Read a block of pixels from the given texture.
- Parameters
-
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 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
-
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. |
The documentation for this class was generated from the following file: