Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-24 01:12:22



Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
On Mac 1.26.22.23, editor floater at top of screen blank. 
Author Message

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
Having migrated from1.26.22.21 to 1.26.22.23 on Mac, I find that in Editor, the floater that normally shows the Position, Size, or Rotation of objects and prims is blank.

On 1.26.22.21:
Image

On 1.26.22.23:
Image


2018-12-08 10:15:16
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
There was indeed a fix by LL for "trembling" coordinates that I backported to the Cool VL Viewer, but it is working fine, here, under Linux and Windows, so I assume it is a MacOS-X rendering bug (buggy driver or another of their custom OpenGL "quirks")...


2018-12-08 10:20:09
Profile WWW

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
Testing shows same problem under High Sierra as well as Mojave, and on machines with GPUs from entirely different manufacturers, so I guess that eliminates OS or driver issues. :?:


2018-12-08 11:18:21
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
linyifei wrote:
so I guess that eliminates OS or driver issues. :?:

Not at all... Apple is alas known for the many "glitches" (read: "bugs") in its OpenGL implementation (the viewer sources are full of workarounds for Apple's crippled OpenGL). The fact that the code works both under Linux and Windows demonstrates it is an Apple-specific issue, and since this is pure OpenGL code, it shows it's a bug in their OpenGL implementation...

Since I cannot test/develop myself on a Mac, I will simply revert the "trembling coordinates" fix for Darwin in next release. If you compile the viewer yourself, here is the corresponding patch (with a bonus speed optimization for non-Mac builds):
Code:
diff -durN cv1262225/indra/newview/llmanip.cpp cv1262226/indra/newview/llmanip.cpp
--- cv1262225/indra/newview/llmanip.cpp   2018-11-06 19:04:59.725811654 +0100
+++ cv1262226/indra/newview/llmanip.cpp   2018-12-08 12:15:22.046325355 +0100
@@ -478,15 +478,70 @@
    S32 window_center_x = gViewerWindowp->getWindowWidth() / 2;
    S32 window_center_y = gViewerWindowp->getWindowHeight() / 2;
    S32 vertical_offset = window_center_y - VERTICAL_OFFSET;
+   S32 center_y = window_center_y + vertical_offset;
+
+   LLWString str_x = utf8str_to_wstring(llformat("X: %.3f", vec.mV[VX]));
+   LLWString str_y = utf8str_to_wstring(llformat("Y: %.3f", vec.mV[VY]));
+   LLWString str_z = utf8str_to_wstring(llformat("Z: %.3f", vec.mV[VZ]));
 
+   // A bug in MacOS-X OpenGL makes the trembling-coordinates fix inadequate
+   // for Mac builds (coordinates do not appear)...
+#if LL_DARWIN
    gGL.pushMatrix();
    {
       gViewerWindowp->setup2DRender();
+
       const LLVector2& display_scale = gViewerWindowp->getDisplayScale();
       gGL.scalef(display_scale.mV[VX], display_scale.mV[VY], 1.f);
       gGL.color4f(0.f, 0.f, 0.f, 0.7f);
+      rounded_square->draw(window_center_x - 115, center_y - PAD, 235,
+                      PAD * 2 + 10, LLColor4(0.f, 0.f, 0.f, 0.7f));
+   }
+   gGL.popMatrix();
 
-      S32 center_y = window_center_y + vertical_offset;
+   gViewerWindowp->setup3DRender();
+
+   {
+      LLVector3 camera_pos = gViewerCamera.getOrigin() +
+                        gViewerCamera.getAtAxis();
+
+      LLLocale locale(LLLocale::USER_LOCALE);
+      LLGLDepthTest gls_depth(GL_FALSE);
+
+      // Render drop shadowed text
+      hud_render_text(str_x, camera_pos, *font, LLFontGL::NORMAL, -101.f,
+                  (F32)(vertical_offset - 1), LLColor4::black, false);
+
+      hud_render_text(str_y, camera_pos, *font, LLFontGL::NORMAL, -26.f,
+                  (F32)(vertical_offset - 1), LLColor4::black, false);
+
+      hud_render_text(str_z, camera_pos, *font, LLFontGL::NORMAL, 49.f,
+                  (F32)(vertical_offset - 1), LLColor4::black, false);
+
+      // Render text on top
+      gGL.diffuseColor3f(1.f, 0.5f, 0.5f);
+      hud_render_text(str_x, camera_pos, *font, LLFontGL::NORMAL, -102.f,
+                  (F32)vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f),
+                  false);
+
+      gGL.diffuseColor3f(0.5f, 1.f, 0.5f);
+      hud_render_text(str_y, camera_pos, *font, LLFontGL::NORMAL, -27.f,
+                  (F32)vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f),
+                  false);
+
+      gGL.diffuseColor3f(0.5f, 0.5f, 1.f);
+      hud_render_text(str_z, camera_pos, *font, LLFontGL::NORMAL, 48.f,
+                  (F32)vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f),
+                  false);
+   }
+#else
+   gGL.pushMatrix();
+   {
+      gViewerWindowp->setup2DRender();
+
+      const LLVector2& display_scale = gViewerWindowp->getDisplayScale();
+      gGL.scalef(display_scale.mV[VX], display_scale.mV[VY], 1.f);
+      gGL.color4f(0.f, 0.f, 0.f, 0.7f);
       rounded_square->draw(window_center_x - 115, center_y - PAD, 235,
                       PAD * 2 + 10, LLColor4(0.f, 0.f, 0.f, 0.7f));
 
@@ -495,34 +550,32 @@
 
       // Render drop shadowed text (manually because of bigger 'distance')
       F32 right_x;
-      LLWString str_x = utf8str_to_wstring(llformat("X: %.3f", vec.mV[VX]));
       font->render(str_x, 0, window_center_x - 101,  center_y - 2,
                 LLColor4::black, LLFontGL::LEFT, LLFontGL::BASELINE,
                 LLFontGL::NORMAL, S32_MAX, 1000, &right_x);
 
-      LLWString str_y = utf8str_to_wstring(llformat("Y: %.3f", vec.mV[VY]));
       font->render(str_y, 0, window_center_x - 26, center_y - 2,
                 LLColor4::black, LLFontGL::LEFT, LLFontGL::BASELINE,
                 LLFontGL::NORMAL, S32_MAX, 1000, &right_x);
 
-      LLWString str_z = utf8str_to_wstring(llformat("Z: %.3f", vec.mV[VZ]));
       font->render(str_z, 0, window_center_x + 49, center_y - 2,
                 LLColor4::black, LLFontGL::LEFT, LLFontGL::BASELINE,
                 LLFontGL::NORMAL, S32_MAX, 1000, &right_x);
 
+      static const LLColor4 color_x(1.f, 0.5f, 0.5f, 1.f);
+      static const LLColor4 color_y(0.5f, 1.f, 0.5f, 1.f);
+      static const LLColor4 color_z(0.5f, 0.5f, 1.f, 1.f);
+
       // Render text on top
-      font->render(str_x, 0, window_center_x - 102,  center_y,
-                LLColor4(1.f, 0.5f, 0.5f, 1.f),
+      font->render(str_x, 0, window_center_x - 102, center_y, color_x,
                 LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL,
                 S32_MAX, 1000, &right_x);
 
-      font->render(str_y, 0, window_center_x - 27, center_y,
-                LLColor4(0.5f, 1.f, 0.5f, 1.f),
+      font->render(str_y, 0, window_center_x - 27, center_y, color_y,
                 LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL,
                 S32_MAX, 1000, &right_x);
 
-      font->render(str_z, 0, window_center_x + 48, center_y,
-                LLColor4(0.5f, 0.5f, 1.f, 1.f),
+      font->render(str_z, 0, window_center_x + 48, center_y, color_z,
                 LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL,
                 S32_MAX, 1000, &right_x);
    }
@@ -530,6 +583,7 @@
    gGL.popMatrix();
 
    gViewerWindowp->setup3DRender();
+#endif
 }
 
 void LLManip::renderTickText(const LLVector3& pos, const std::string& text,


2018-12-08 11:34:49
Profile WWW

Joined: 2010-04-07 08:23:18
Posts: 210
Reply with quote
You may want to rethink that approach, as I can confirm the issue here on my linux installation. Coordinates floater is fine in .21 and empty in .24 / .25 -- haven't checked the ones inbetween. Can provide logs or additional information if needed.

P.S.: Built a .25 viewer with your proposed patch and force-enabled it. Resulting viewer shows the coordinate floater without issue.


2018-12-08 19:33:25
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
Amalia Illios wrote:
You may want to rethink that approach, as I can confirm the issue here on my linux installation. Coordinates floater is fine in .21 and empty in .24 / .25 -- haven't checked the ones inbetween. Can provide logs or additional information if needed.

P.S.: Built a .25 viewer with your proposed patch and force-enabled it. Resulting viewer shows the coordinate floater without issue.

Tested here on 5 different Linux distros/installations/computers + 2 (EDIT) 4 Windows (2*7 & 2*10) installations/computers. No issue...

Please, provide your system GPU model and driver version... Your graphics settings could also be useful (even though I tested pretty much all combinations myself: with ALM on or off, and various deferred rendering settings).


2018-12-08 21:20:05
Profile WWW

Joined: 2010-04-07 08:23:18
Posts: 210
Reply with quote
Henri Beauchamp wrote:
Please, provide your system GPU model and driver version... Your graphics settings could also be useful (even though I tested pretty much all combinations myself: with ALM on or off, and various deferred rendering settings).

Gladly. from Help / About ...
Code:
Cool VL Viewer v1.26.22.25, 64 bits, Dec  8 2018 09:41:05
RestrainedLove viewer v2.09.23.20
Release Notes

You are at 463381.0, 303382.0, 34.5  in Crossbrook located at
sim10711.agni.lindenlab.com (216.82.53.73:13019)
Second Life Server 18.11.09.521593
Release Notes

CPU: Intel(R) Core(TM) i9-7960X CPU @ 2.80GHz (3864.87 MHz)
Memory: 128633MB
OS version: Linux-x86_64 v4.15.0-38201811061723-generic #0+mediatree+hauppauge-Ubuntu SMP Tue Nov 6 19:03:14 UTC 2018
Memory manager: jemalloc v5.1.0-20181208
Graphics card vendor: NVIDIA Corporation
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2
OpenGL version: 4.6.0 NVIDIA 415.18
Detected VRAM: 11264MB
J2C decoder: OpenJPEG: 1.4.0.635d
Audio driver: FMOD Studio v1.10.10 (PulseAudio)
Networking backend: libcurl/7.47.0 OpenSSL/1.0.2q zlib/1.2.11
Embedded browser: CEF3 plugin v3.3538.1852.gcb937fc
Packets lost: 0/4346 (0.0%)

Built with: GCC v4.8.5

Compile flags used for this build:
-O3 -fno-delete-null-pointer-checks -fno-align-labels -fno-align-loops -fno-ipa-cp-clone -fsched-pressure -frename-registers -fweb -DNDEBUG -std=c++98 -pipe -g -gdwarf-2 -gstrict-dwarf -fno-var-tracking-assignments -fexceptions -fno-strict-aliasing -fvisibility=hidden -fsigned-char -m64 -mfpmath=sse -fno-math-errno -fno-trapping-math -pthread -fno-stack-protector -Wall -Wno-reorder -Wno-unused-local-typedefs -Werror -DLL_LINUX=1 -D_REENTRANT -D_GLIBCXX_USE_C99_MATH=1 -DXML_STATIC -DLL_USE_JEMALLOC=1 -DLL_ELFBIN=1 -DLL_LUA=1 -DOV_EXCLUDE_STATIC_CALLBACKS -DLL_FMODSTUDIO=1 -DLL_OPENAL=1 -DLL_SDL=1 -DLIB_NDOF=1 -DLL_X11=1

Settings are on Ultra, but there is no change even when I change settings (i.e. turn off deferred). Anything else, just let me know.


2018-12-09 04:54:03
Profile

Joined: 2011-12-13 14:11:38
Posts: 186
Reply with quote
Just to add to the confusion: I'm on a Mac too, with High Sierra (10.13) and for me, it's working totally fine. Though I noticed the box where the coordinates are displayed doesn't look like linifey's. Is there a setting for that?
Code:
Cool VL Viewer v1.26.22.24, 64 bits, Dec  3 2018 18:21:27
Release Notes

You are at 463844.5, 306852.5, 1801.3  in Mostly Beatrice located at
sim10034.agni.lindenlab.com (216.82.48.44:13015)
Second Life RC LeTigre 18.12.04.522206
Release Notes: Retrieving...

CPU: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz (3500 MHz)
Memory: 32768MB
OS version: Mac OS X 10.13.6 Darwin 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018; root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64
Memory manager: OS native
Graphics card vendor: NVIDIA Corporation
Graphics card: NVIDIA GeForce GTX 775M OpenGL Engine
OpenGL version: 2.1 NVIDIA-10.32.0 355.11.10.10.40.102
Detected VRAM: 2048MB
J2C decoder: OpenJPEG: 1.4.0.635d
Audio driver: FMOD Studio v1.10.09
Networking backend: libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.8 nghttp2/1.25.0
Embedded browser: CEF3 plugin v3.3325.1750.gaabe4c4
Packets lost: 26/9778 (0.3%)

Built with: Clang/LLVM v10.0.0

Compile flags used for this build:
-O2 -DNDEBUG -pipe -g -fexceptions -fno-strict-aliasing -fvisibility-inlines-hidden -fsigned-char -m64 -mfpmath=sse -fno-math-errno -fno-trapping-math -pthread -fno-stack-protector -Wall -Wno-reorder -Wno-unused-local-typedef -Wno-unused-const-variable -Wno-unused-function -Wno-unused-value -Wno-gnu -Werror -DLL_DARWIN=1 -DXML_STATIC -DLL_LUA=1 -DOV_EXCLUDE_STATIC_CALLBACKS -DLL_FMODSTUDIO=1 -DLIB_NDOF=1


Attachments:
EditCoords.jpg
EditCoords.jpg [ 14.13 KiB | Viewed 2295 times ]
2018-12-09 06:27:48
Profile

Joined: 2010-04-07 08:23:18
Posts: 210
Reply with quote
Ok, figured it out. The culprit is UI scaling.


2018-12-09 08:17:17
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
Amalia Illios wrote:
Ok, figured it out. The culprit is UI scaling.
Ah, thanks, great job !

Indeed, I can reproduce it here. It looks like LL overlooked that in their code, and since I don't use UI scaling, I overlooked it too when backporting it !

I will fix it for next release.


2018-12-09 09:37:13
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.