#pragma once #include "../Macros.h" #include "../Types.h" #import CC_BACKEND_BEGIN class Utils { public: static void updateDefaultColorAttachmentTexture(id texture); static MTLPixelFormat getDefaultDepthStencilAttachmentPixelFormat(); static MTLPixelFormat getDefaultColorAttachmentPixelFormat(); static id getDefaultDepthStencilTexture(); static MTLPixelFormat toMTLPixelFormat(TextureFormat textureFormat); static void generateMipmaps(id texture); private: static id createDepthStencilAttachmentTexture(); static id _defaultColorAttachmentTexture; static id _defaultDepthStencilAttachmentTexture; }; CC_BACKEND_END