Is there a way to draw in overlay in absolute position from shared memory?

Discussion in 'Rivatuner Statistics Server (RTSS) Forum' started by Skewjo, Mar 15, 2021.

  1. Skewjo

    Skewjo Member

    Messages:
    34
    Likes Received:
    0
    GPU:
    GTX 1060 3GB
    I need my program to draw in the corners, preferably detached from anything else that RTSS is displaying.

    My program is currently able to take over the 0th slot so that it can occupy the corners when the RTSS position is top-left or top-right, but when it is bottom-left or bottom-right anything that is drawn via RTSS pushes my item up.

    What I'm looking for is a method to draw in a corner of my choice, regardless of what the position setting is in RTSS.

    If this is not possible, I've got an idea for a solution that will resolve the issue, but this would save me quite a bit of work.

    (Was this functionality recently changed? the client "slot-priority" drew slot 0 in the corner set by RTSS and the slots went up as you got further away from the corners...)
     
  2. Andy_K

    Andy_K Master Guru

    Messages:
    594
    Likes Received:
    103
    GPU:
    MSI GTX 960 OC
    use the position tag before your data
     
  3. Skewjo

    Skewjo Member

    Messages:
    34
    Likes Received:
    0
    GPU:
    GTX 1060 3GB
    Thanks for the suggestion. I'm already using the <P> tag (that's what you're referring to, right?), but it's still relative to the corner that RTSS is operating in, correct?
     
  4. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,304
    Likes Received:
    2,606
    Yes, it is relative to the corner selected as coordinate origin in RTSS and it won't change, sorry.
     

  5. Skewjo

    Skewjo Member

    Messages:
    34
    Likes Received:
    0
    GPU:
    GTX 1060 3GB
    All good, I can work around it. Just wanted to make sure I wasn't missing some obvious way to achieve absolute position.
     
  6. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,304
    Likes Received:
    2,606
    I'll add consept of sticky layers, which can be used for your specific task. <P> hypertext tag format will be extended, so it can be used in two forms now:

    <P=x,y> - define position relative to OSD origin, in both symbols (if negative) or zoomed pixels (if positive)
    <P0> .. <P8> - define one of 9 sticky positions: left top (0), center top (1), right top (2), left center (3) ... right bottom (8)

    There will be two restrictions for sticky position tags:

    - Sticky positions can be applied to layers only, it won't work if you use it without layer <L> tag
    - Layers with sticky positions will be excluded from total (covering whole overlay) extent calculation. It means that background of such layers won' be filled with global "OSD fill" option in main RTSS GUI.
     
    Skewjo, The1 and Dan Longman like this.
  7. Dan Longman

    Dan Longman Member Guru

    Messages:
    145
    Likes Received:
    85
    GPU:
    STRIX 3080
    This will be an awesome addition, thanks Unwinder!
     
  8. Skewjo

    Skewjo Member

    Messages:
    34
    Likes Received:
    0
    GPU:
    GTX 1060 3GB
    Awesome! Thanks Unwinder!
     
  9. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,304
    Likes Received:
    2,606
    @Skewjo

    Not sure if it is necessary for your system (you already do color input/latency markers rendering on your side), but I think I could simplify design of similar custom systems a lof by introducing new FCAT overlay mode in 7.3.2. When "latency marker" mode is enabled in GUI, RTSS will do the following:

    - Register any keyboard or mouse button press events (low-latency DirectInput mode, which is normally used by games). Save high precision button press event timestamp in RTSS shared memory so client apps can read it back.
    - Render latency marker in one of screen corners (hardcoded position, unaffected by OSD origin selected in RTSS GUI) on the next frame following by input event registration. Save high precision marker presentation timestamp in RTSS shared memory (independently for each 3D application running in the system) so clients can read it back too.

    So you can use this data as, do not need to think about rendering the markers yourself and focus on processing data from luminance sensor only.
     

Share This Page