The Skung Rockification of Ziggy Skungdust and the SIMD's
This commit is contained in:
@ -3,7 +3,30 @@ import Foundation
|
||||
|
||||
public struct Image: Resource
|
||||
{
|
||||
let pixels: Data
|
||||
let width: Int
|
||||
let height: Int
|
||||
let data: Data
|
||||
let format: Format
|
||||
let width: Int, height: Int
|
||||
let mipLevels: Int
|
||||
|
||||
public enum Format
|
||||
{
|
||||
case argb8888, abgr8888
|
||||
case rgb888, bgr888
|
||||
//case l8, l16, a8, al88
|
||||
case s3tc_bc1, s3tc_bc2_premul
|
||||
case s3tc_bc2, s3tc_bc3_premul
|
||||
case s3tc_bc3, rgtc_bc4, rgtc_bc5_3dc
|
||||
}
|
||||
}
|
||||
|
||||
extension Image
|
||||
{
|
||||
init(_ data: Data, format: Format, width: Int, height: Int, mipLevels: Int = 0)
|
||||
{
|
||||
self.data = data
|
||||
self.format = format
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.mipLevels = mipLevels
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user