Closed TeamPuzel closed 1 year ago
Please cast JSValue to Int and apply OR in Swift, then pass it to JS method like below:
let COLOR_BUFFER_BIT = Int(context.COLOR_BUFFER_BIT.number!)
let DEPTH_BUFFER_BIT = Int(context.DEPTH_BUFFER_BIT.number!)
context.clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT)
Thanks, I couldn't figure out the .number! part 🙂
Hey, is it possible to use the OR operator somehow? I can call this webgl function:
however this does not work: