OpenGL components in viewports


#1

Hey guys -

After upgrading a clients project lately, we found that openGL components in viewports no longer work as well.

I am aware that this is a heavyweight component sitting overtop the main window component, and there are certain limitations associated with that.

However, it used to fit properly into the viewport, and scroll appropriately.

It still trims itself to be the right size, but no longer moves properly with the viewport scrollbars (it insists on the left hand edge staying at the edge of the viewport).

Anyway, I can fix that issue by setting GLviewport directly, but there are issues with mouse interactions and child components of the GL component, so it’s better to get a fix from you if possible.

Anyway, if needed I can probably whip up a example with the demo, but hopefully you are aware of the issue and don’t need this, but let me know :slight_smile:


#2

No… I can’t really see how it could ever have done that. Like you said, it’s a heavyweight window, which can’t be clipped by lightweight ones, and that’s the way it always worked. Maybe in the past you just never scrolled it outside the viewport bounds or something?


#3

Right, I know it can’t interact with lightweight components.

But it does clip its own viewport … trimming the right hand side for instance so as not to spill outside of the viewport it’s placed within (though of course, it covers up the scrollbar itself).

What it is NOT doing (but used to, I think) is trim the left hand side when scrolled, which is could easily do I believe (using the glViewport command IIRC?).


#4

Aha! I was wrong, looking at an older build, this was always an issue.

Ok, nevermind, back to futzing with the glViewport at a higher level then.