Home › Forums › Syphon › Syphon Development – Developer › Facility to get texture size without client
- This topic has 6 replies, 2 voices, and was last updated 7 years, 3 months ago by
SeriousCyrus.
-
AuthorPosts
-
November 27, 2013 at 3:29 pm #37850
SeriousCyrus
ParticipantJust implement syphon in my app and was very pleased at how easy it was. I had a small problem having to first get a client and image before being able to deduce the texture size, could this not be provided by the directory class without having to init a client and wait for the first frame?
November 27, 2013 at 8:55 pm #37894bangnoise
KeymasterDimensions are a property of each SyphonImage, not of the server/client – a series of frames from a single client may have different dimensions, sometimes changing very frequently.
November 28, 2013 at 5:14 pm #37933SeriousCyrus
ParticipantI hadn’t considered that, is it common that texture sizes change frequently for a session? In the situations I’ve been using syphon, I always assumed a fixed size for the session.
While I can compensate for changes, i base a lot of functionality on the assumption that syphon is supplying textures of a fixed size. It’d be nice to have an option that guarantees a certain dimension, with an update notification if those dimensions change.
November 29, 2013 at 7:22 am #38110bangnoise
KeymasterSome applications tie frame dimensions to window dimensions, which results in a lot of changes if the window is resized by a drag. Try the demo Simple Server to test your application in those circumstances. Others have server dimensions determined by a user preference or changes in connected hardware and will change much less frequently, if at all.
Variable frame dimensions is a feature of Syphon, so you would be wrong to assume anything about the dimensions of incoming frames – hopefully the modifications to your code to detect and respond to change won’t be too arduous.
November 29, 2013 at 1:46 pm #38198SeriousCyrus
ParticipantWhile i can easily check for it, it might produce unexpected behaviour as far as the user is concerned, especially if it’s anything other than pure scaling. A little note on the ui and in the docs warning the user should address it.
November 29, 2013 at 5:19 pm #38219bangnoise
KeymasterWhat are you doing with the frames?
November 30, 2013 at 4:31 am #38245SeriousCyrus
ParticipantJust letting the user grab crops of the frames, the crops could be scaled with the frames, but if the user for some reason didn’t realise the incoming frame size could change outside of their control, they might wonder why something looks a little different, I thought it might be best to notifiy the user when it happens.
-
AuthorPosts
- You must be logged in to reply to this topic.