From 2b8e00698199823331ca1af698b09b7eecb1def2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 14:10:40 +0200 Subject: [PATCH] Initialize object viewer viewport at correct size --- code/nel/tools/3d/object_viewer/object_viewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index ff530e007..be4e6f1cd 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -676,9 +676,12 @@ bool CObjectViewer::initUI (HWND parent) view->MainFrame = _MainFrame; _MainFrame->ShowWindow (SW_SHOW); + + RECT viewportRect; + GetClientRect(view->m_hWnd, &viewportRect); // Init NELU - if (!CNELU::init (640, 480, viewport, 32, true, view->m_hWnd, false, _Direct3d)) + if (!CNELU::init (viewportRect.right, viewportRect.bottom, viewport, 32, true, view->m_hWnd, false, _Direct3d)) { return false; }