Inherits from SPTexture : NSObject
Declared in SPGLTexture.h

Overview

The SPGLTexture class is a concrete implementation of the abstract class SPTexture, containing a standard 2D OpenGL texture.

In most cases, you don’t have to use this class directly (the init-methods of the SPTexture class should suffice for most needs). However, you can use this class in combination with a GLKTextureLoader to load types that Sparrow doesn’t support itself.

Tasks

Initialization

Instance Methods

initWithData:properties:

Initializes an uncompressed texture with with raw pixel data and a set of properties. Width and height are expected pixel dimensions.

- (instancetype)initWithData:(const void *)imgData properties:(SPTextureProperties)properties

Discussion

Initializes an uncompressed texture with with raw pixel data and a set of properties. Width and height are expected pixel dimensions.

Declared In

SPGLTexture.h

initWithName:format:width:height:containsMipmaps:scale:premultipliedAlpha:

Initializes a texture with the given properties. Width and height are expected pixel dimensions. Designated Initializer.

- (instancetype)initWithName:(uint)name format:(SPTextureFormat)format width:(float)width height:(float)height containsMipmaps:(BOOL)mipmaps scale:(float)scale premultipliedAlpha:(BOOL)pma

Discussion

Initializes a texture with the given properties. Width and height are expected pixel dimensions. Designated Initializer.

Declared In

SPGLTexture.h

initWithPVRData:scale:

Initializes a PVR texture with with a certain scale factor.

- (instancetype)initWithPVRData:(SPPVRData *)pvrData scale:(float)scale

Discussion

Initializes a PVR texture with with a certain scale factor.

Declared In

SPGLTexture.h