mirror of https://github.com/axmolengine/axmol.git
30 lines
762 B
Objective-C
30 lines
762 B
Objective-C
#pragma once
|
|
|
|
#include "../Macros.h"
|
|
#include "../Types.h"
|
|
#import <Metal/Metal.h>
|
|
|
|
CC_BACKEND_BEGIN
|
|
|
|
class Utils
|
|
{
|
|
public:
|
|
static void updateDefaultColorAttachmentTexture(id<MTLTexture> texture);
|
|
static MTLPixelFormat getDefaultDepthStencilAttachmentPixelFormat();
|
|
static MTLPixelFormat getDefaultColorAttachmentPixelFormat();
|
|
static id<MTLTexture> getDefaultDepthStencilTexture();
|
|
|
|
|
|
static MTLPixelFormat toMTLPixelFormat(TextureFormat textureFormat);
|
|
static void generateMipmaps(id<MTLTexture> texture);
|
|
|
|
private:
|
|
static id<MTLTexture> createDepthStencilAttachmentTexture();
|
|
|
|
|
|
static id<MTLTexture> _defaultColorAttachmentTexture;
|
|
static id<MTLTexture> _defaultDepthStencilAttachmentTexture;
|
|
};
|
|
|
|
CC_BACKEND_END
|