Replies: 3 comments
-
I have figured out the following regarding the resizing:
So my question is what is the best way of selectively overriding this for my overlay views? Can I install into the render graph my own derived Shouldn't this be a |
Beta Was this translation helpful? Give feedback.
-
I managed to override the window ResizeHandler and override the
However, I'd like something more generic, and here is an idea of how this can be implemented:
Such a change would allow deriving from a |
Beta Was this translation helpful? Give feedback.
-
For reference, I created a pull request that improves the pixel exact overlay handling by introducing the |
Beta Was this translation helpful? Give feedback.
-
I'd like to draw a rectangle in pixel size coordinates, e.g. (0,0)→(w,s) where s=40. My scene graph for such a rectangle is as follows:
where the quad geometry was created with
geomInfo.transform=vsg::translate(0.5,0.5,0)
and thus lies on (0,0)→(1,1).I have managed to create the transRect matrix during construction to fullfil the requirement as follows:
So far so good.
But the problem is that once I resize my window I need to change the
trans
matrix.I tried doing this by a visitor and overloading the configure event as follows:
I'm using exactly the same calculation as during the construction, but the result is now wrong.
Oops number 1:
The
configureEvent.width != extent.width
. Thus it seems like theconfigureEvent
is called "too early", i.e. before the window extent has been updated.So my question how to solve this? How can I draw a pixel defined rectangle, and have it redrawn at its new coordinates when the window is resized?
Beta Was this translation helpful? Give feedback.
All reactions