Is it possible to render an MTKView in different color spaces? For example, if I want to render it in CMYK, is there a way to adjust the colors on every frame to that colorspace before presenting it on the screen, or is that something that needs to be handled in a shader?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm using Xcode 13 after recently updating to MacOS Monterey, and only after updating am I getting this error: [MTLDebugCommandBuffer lockPurgeableObjects]:2103: failed assertion `MTLResource 0x14a8a8cc0 (label: null), referenced in cmd buffer 0x149091400 (label: null) is in volatile or empty purgeable state at commit'
I haven't changed my code at all between updating to the latest OS, and it worked perfectly before. How can I fix this? I don't think there should be any reason that I can't use a command buffer on a texture resource with a volatile/empty purgeable state.
I have a string encoded as ascii characters that contains letters and numbers. When I print out the string it looks like the numbers are not showing up properly. The string is being read from a data object where I convert everything to an Int8 type and construct a Character from that:
for i in 0..<dataLength {
let byte: Int8 = readByte()
let char = Character(unicodeScalarLiteral: .init(.init(byte)))
print("Character: ", char, char.asciiValue)
}
Example.) "40" appears as "@D". I was able to print out the ascii codes of these and found it to be [64, 68], but I'm not sure how to now convert it to the number 40.