Forum Replies Created
-
AuthorPosts
-
DiGiTaLFX
ParticipantIn case anyone comes across this post the example has now moved to:
DiGiTaLFX
ParticipantYep you’re right, I’ve made all those changes and everything works great! For future reference if anyone needs it, I’ve uploaded a sample project to github:
https://github.com/digitalfx/Syphon-Swift-Example
Thanks again for your help 🙂
DiGiTaLFX
ParticipantAmazing, thanks! I literally just had to update the
kCVPixelBufferPixelFormatTypeKeytokCVPixelFormatType_32BGRAand set the syphon server to flip the texture and I’ve got an image 😀When you say that you don’t have to specify a pixel format, is there then an easy way to read the format of a surface and pass it back into the
CGLTexImageIOSurface2Dfunction?Regarding the leaking textures, can I safely just add
glDeleteTextures(1, &texture)after publishing to syphon?I was changing the use count on the IOSurface as I’m currently holding on to the surface in a class variable between frames (after calling
takeUnretainedValuewhich sounded scary). But basically it’s because I saw it on StackOverflow like that…! Can I throw that bit away? I might actually hold onto the texture between frames rather than the surface thinking about it.Also, one last question, I’ve called
flushBufferon my context after publishing each frame, is this something I actually need to do?Thanks for your help 👍🏻
-
This reply was modified 5 years, 1 month ago by
DiGiTaLFX.
-
This reply was modified 5 years, 1 month ago by
-
AuthorPosts