[haiku-appserver] Re: Be's BView and BGLView (and BDirectWindow?) clipping info is faulty

  • From: Philippe Houdoin <philippe.houdoin@xxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Fri, 8 Apr 2005 11:42:06 +0200

Hi guys,
(Hi Rudolf!)

Sorry for being slow to react.

> ->BGLView::DirectConnected()'s info struct's direct=5Fbuffer=5Finfo's
> clipping info is bad.

I guess you run your tests using your Mesa-based (3.2 or even latest version)
nVidia HW accelerated libGL.so's, right?
Then, that's right, the BGLView::DirectConnected() method receive the view's
window owner clipping rects list. From beBook :

"If the BGLView is in a BDirectWindow, you should call this from your
BDirectWindow::DirectConnected() function to let OpenGL update the window
properly."

So, that's expected. If no other window overlap yours (no menu popup, no other
window), you'll always get one single clipping rect, in screen coordinates
space, corresponding to the window whole content area (parent view).

Included your BGLView's view obviously (;-) ) but also any others optional views
attached to the window (MenuBar view, for instance).

To be usefull, my Mesa's BGLView::DirectConnected() must be implemented to
compute the view clipping rect list in screen coordinates space. That the kind
of values the renderer (HW or software) needs.

It should be just a matter of intersecting direct_info's clipping rect list with
the screen-translated view clipping rect list.

But, currently, it's not implement. That's a known unsupported feature of Mesa
at the moment.

> My take: both problems can be easily fixed, in a compatible way.

Yep. My bad for not had put a comment in BGLView::DirectConnected() about what
should REALLY be done there. I didn't considered supporting (Be's) Direct mode
in Mesa's BGLView much urgent, as it does make sense only in BGL_SINGLE (aka
not double-buffered) rendering which is... old-ish.

- Philippe

Other related posts: