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:
parent
e91315aa2d
commit
5522045320
@ -128,7 +128,12 @@ void BGLView::AttachedToWindow()
|
|||||||
if (fRenderer) {
|
if (fRenderer) {
|
||||||
// Don't paint white window background when resized
|
// Don't paint white window background when resized
|
||||||
SetViewColor(B_TRANSPARENT_32_BIT);
|
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
|
// No Renderer, no rendering. Setup a minimal "No Renderer" string drawing context
|
||||||
|
Loading…
Reference in New Issue
Block a user