---
title: SKTexture
framework: spritekit
role: symbol
role_heading: Class
path: spritekit/sktexture
---

# SKTexture

An image, decoded on the GPU, that can be used to render various SpriteKit objects.

## Declaration

```swift
class SKTexture
```

## Mentioned in

Getting Started with Sprite Nodes Loading and Using Textures About Texture Atlases Maximizing Node Drawing Performance Maximizing Texture Performance Preloading Textures into Memory

## Overview

Overview An SKTexture object is an image that can be applied to SKSpriteNode and SKShapeNode objects, particles created by an SKEmitterNode object, or tiles used in an SKTileMapNode. A texture object manages the texture data and graphics resources that are needed to render the image. Most texture objects are created from source images stored in your app bundle—your game’s artwork. Once created, a texture object’s contents are immutable. Multiple sprites can share the same texture object, sharing a single resource. Deallocating a Texture After a texture is loaded into the graphics hardware memory, it stays in memory until the referencing SKTexture object is deleted. This means that between levels (or in a dynamic game), you may need to make sure a texture object is deleted. Delete a SKTexture object by removing any strong references to it, including: All texture references from SKSpriteNode and SKEffectNode objects in your game Any strong references to the texture in your own code An SKTextureAtlas object that was used to create the texture object

## Topics

### First Steps

- [Loading and Using Textures](spritekit/loading-and-using-textures.md)
- [Texture Initializers](spritekit/texture-initializers.md)

### Reading a Texture’s Size and Optional Source Location

- [size()](spritekit/sktexture/size().md)
- [textureRect()](spritekit/sktexture/texturerect().md)

### Configuring a Texture’s Behavior for Scaling

- [filteringMode](spritekit/sktexture/filteringmode.md)
- [SKTextureFilteringMode](spritekit/sktexturefilteringmode.md)
- [usesMipmaps](spritekit/sktexture/usesmipmaps.md)

### Getting a Texture’s Underlying Image

- [cgImage()](spritekit/sktexture/cgimage().md)

### Preloading a Texture for Performance

- [Preloading Textures into Memory](spritekit/preloading-textures-into-memory.md)
- [preload(completionHandler:)](spritekit/sktexture/preload(completionhandler:).md)
- [preload(_:withCompletionHandler:)](spritekit/sktexture/preload(_:withcompletionhandler:).md)

### Instance Properties

- [customPlaygroundQuickLook](spritekit/sktexture/customplaygroundquicklook.md)

### Initializers

- [init(CGImage:)](spritekit/sktexture/init(cgimage:)-4ypk.md)
- [init(coder:)](spritekit/sktexture/init(coder:).md)
- [init(rect:inTexture:)](spritekit/sktexture/init(rect:intexture:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [SKMutableTexture](spritekit/skmutabletexture.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Textures

- [Maximizing Texture Performance](spritekit/maximizing-texture-performance.md)
- [SKTextureAtlas](spritekit/sktextureatlas.md)
- [SKMutableTexture](spritekit/skmutabletexture.md)
