2D Graphics

RSS for tag

Discuss integrating two-dimensional graphics into your app.

Posts under 2D Graphics tag

2 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Determining SpriteKit Interaction using SKRenderer
Hey, Wondering how other developers have been able to determine the location of a mouse event or tap (ie NSEvent) when using MetalView (MKTView) with SKRenderer with a SpriteKit scene (.sks scene) for a 2D game. In the original scenario with SpriteKit, we could use SKViews convertPoint(fromView:) to determine where in the scene the user tapped. But with the SKRenderer we can no longer use convertPoint(fromView:) as its reliant on SKView being used and thus its making it difficult to determine. What I do have is: locationInWindow: NSPoint for showing me where in the MKTView which was touched Any ideas, would be great Many thanks
0
0
157
2w
MTLTexture streaming to app directory
For better memory usage when working with MTLTextures (editing + displaying in render passes, compute shaders, etc.) is it possible to save the texture to the app's Documents folder, and then use an UnsafeMutablePointer to access/modify the contents of the texture before displaying in a render pass? And would this be performant (i.e 60fps)? That way the texture won't be directly in memory all the time, but the contents can still be edited and displayed when needed.
1
0
739
Nov ’23