Facility to get texture size without client

Home Forums Syphon Syphon Development – Developer Facility to get texture size without client

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37850
    SeriousCyrus
    Participant

    Just 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?

    #37894
    bangnoise
    Keymaster

    Dimensions 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.

    #37933
    SeriousCyrus
    Participant

    I 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.

    #38110
    bangnoise
    Keymaster

    Some 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.

    #38198
    SeriousCyrus
    Participant

    While 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.

    #38219
    bangnoise
    Keymaster

    What are you doing with the frames?

    #38245
    SeriousCyrus
    Participant

    Just 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.