As reported by Fredrik Ekdahli, the GL viewport should be set by default as soon as the view is attached to a window.

But the default size is the view one, not the view's window size, which doesn't make much sense.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17798 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2006-06-12 15:50:27 +00:00
parent e91315aa2d
commit 5522045320

View File

@ -128,7 +128,12 @@ void BGLView::AttachedToWindow()
if (fRenderer) {
// Don't paint white window background when resized
SetViewColor(B_TRANSPARENT_32_BIT);
return fRenderer->AttachedToWindow();
fRenderer->AttachedToWindow();
// Set default OpenGL viewport:
glViewport(0, 0, Bounds().IntegerWidth(), Bounds().IntegerHeight());
return;
}
// No Renderer, no rendering. Setup a minimal "No Renderer" string drawing context