Author Topic: Early WIP on v2.55  (Read 138239 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #75 on: November 03, 2018, 11:54:18 am »
You are not seeing it, because i am not doing it, but that's easy just update the Load in with the string returned by ZI_CloseSpinner.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #76 on: November 03, 2018, 11:58:50 am »
Yeah, I updated my message above. Please respond to my suggestion.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #77 on: November 03, 2018, 12:01:57 pm »
SetWindowText(GetDlgItem(gP.hMain, IDC_LOAD_TIME),  ZI_SpinnerClose());

    SetWindowText(GetDlgItem(gP.hMain, IDC_VERTICES), STRL(Mobj_getNumberOfVertices()));
    SetWindowText(GetDlgItem(gP.hMain, IDC_TRIANGLES), STRL(gM.numberOfTriangles));
    SetWindowText(GetDlgItem(gP.hMain, IDC_INDICES), STRL(gM.numberOfTriangles * 3));
    SetWindowText(GetDlgItem(gP.hMain, IDC_MESHES), STRL(gM.numberOfMeshes));
    SetWindowText(GetDlgItem(gP.hMain, IDC_MATERIALS), STRL(gM.numberOfMaterials));
    // MLL 10-28-2018: ============================
    WCHAR buf[64] = { 0 };
    swprintf_s(buf, strSize(buf), L"%.3f %s", FileSize(pszFilename) / 1048576.0f, L"MB");
    SetWindowText(GetDlgItem(gP.hMain, IDC_OBJ_SIZE), buf);
    killLoadTimer(); // stop model load timer
    // ============================================
    SetWindowText(GetDlgItem(gP.hMain, IDC_LOAD_TIME), ZI_SpinnerClose());
« Last Edit: November 03, 2018, 12:05:45 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #78 on: November 03, 2018, 12:20:29 pm »
Yeah, the bottom-most line's placement is correct while the topmost isn't.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #79 on: November 03, 2018, 12:33:07 pm »
Now how do I test Spinner.h blur in the DLL? And should I use the same SKI?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #80 on: November 03, 2018, 12:36:48 pm »
To test bluring in the DLL, just unREM this code section (line 14739-14740)

    //RECT rb; SetRect(&rb, x + r.left, y + r.top, x + r.left + Width(r), y + r.top + Height(r));
    //BlurTextPlus(hdc, g_SP.szTime, rb, g_SP.font, 4, nStrFormat);
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #81 on: November 03, 2018, 06:28:31 pm »
I have improved the ZI_SpinnerInit parameters.

Now it can use a specific private font of any size and color (with the new GDImage function zUsePrivateFont).

Example:
    Path_Combine(gP.mt.FullName, skSkinFolder(), L"lcd.ttf");
    ZI_SpinnerInit(gP.hGL, szFile, 0, zUsePrivateFont(gP.mt.FullName, 22), ZD_ARGB(255, 0,255,0));

Perhaps i should switch the layered window to a DWM composited to see if the DLL blur problem goes away  :-\
(like in my DwmSpinner demo)
« Last Edit: November 03, 2018, 07:52:37 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #82 on: November 03, 2018, 09:22:15 pm »
Patrice,

1. Sorry for not responding; I got an unexpected visit by my son.

2. When talking about blur flicker in the DLL, do you mean that dark topmost scanline that appears running randomly along the top edge of the quark frame window?

3. If yes then I'd say the pictures are looking quite differently in Spinner.h and the DLL. The .DLL blur looks much darker (and better at that!) than the .H blur (which is too thin IMHO), as if i) blur algos are different, or ii) alpha premultiplication algos are different, or iii) sizes or scale of the spinner quark texture are different so that an extra scan line is rendered by the DLL compared to the .H file. Or something else of such geometric kind, rather than DWM compositing or thread priority which would affect the entire spinner display rather than its border scan line only... :-\

Generally I like the .DLL version more than the .H one except for the offending scan line.

4. The green digital font looks very nice and a perfect match to the one used in the alpha threshold display. I'd rather we use that one instead of the cheaper looking white font... Any similar blur problems with the green digital font in the DLL spinner?
« Last Edit: November 03, 2018, 09:54:23 pm by Michael Lobko-Lobanovsky »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #83 on: November 03, 2018, 10:02:18 pm »
Quote
2. When talking about blur flicker in the DLL, do you mean that dark topmost scanline that appears running randomly along the top edge of the quark frame window?
YES

Added:
Here is how it looks with a text size of 30

Shall send you pandora with the latest spinner change tomorrow morning...
« Last Edit: November 03, 2018, 11:12:14 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #84 on: November 03, 2018, 11:23:55 pm »

To test bluring in the DLL, just unREM this code section (line 14739-14740)

    //RECT rb; SetRect(&rb, x + r.left, y + r.top, x + r.left + Width(r), y + r.top + Height(r));
    //BlurTextPlus(hdc, g_SP.szTime, rb, g_SP.font, 4, nStrFormat);


This recommendation was obviously incomplete. In fact I asked how I could switch between seeing an include spinner (I falsely assumed I was seeing it on default) and a DLL spinner.

Having got your patches and seeing Spinner.h included in the project, I thought the patches were set to use it. But in fact the calls were set to the library functions and I wasn't ever seeing how the spinner behaved in the include file. All I was seeing so far was just blur or no blur in the library spinner. It was my bad, I'm sorry to admit it, but I think next time I receive a patch I'd be grateful to be told what the patch's initial state is -- just in order to avoid losing my precious lifetime decoding it myself.

Now I can see blur in both include file and spinner and yes, its quality is identical and there's just that offending noisy scan line in the DLL that seems very much like a geometrical (spinner frame size?) issue...

Let's do the tests tomorrow. Seems like I'm too tired tonight if I overlooked such a trivial thing as finding out exactly what it was that I was looking at but not seeing. ;)

Zzzzzz...
« Last Edit: November 04, 2018, 12:18:53 am by Michael Lobko-Lobanovsky »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #85 on: November 04, 2018, 01:35:03 am »
If you goto line 14707 in void RenderAnimation() and change this funny if/else-condition as follows:

............
if (g_SP.ishorizontal) {
    GdipDrawImageRectRectI(graphics, g_SP.img, 0, -2, g_SP.imgH, g_SP.imgH, g_SP.imgH * g_SP.frametouse - g_SP.imgH, 0, g_SP.imgH, g_SP.imgH, 2, 0, NULL, NULL); // MLL: brush misalignment?
} else {
    GdipDrawImageRectRectI(graphics, g_SP.img, 0, 0, g_SP.imgW, g_SP.imgW, g_SP.imgW * g_SP.frametouse - g_SP.imgW, 0, g_SP.imgW, g_SP.imgW, 2, 0, NULL, NULL);
}
............


you'll see no scan line flicker in the DLL spinner any more.

So this is a geometrical issue and most probably, its random nature is related to brush misalignment at some stage of GDI+ image creation process. There's a lot of work going on directly in memory rather than in a specific DC canvas, and such manipulations are sensitive to proper brush alignment with calls to SetBrushOrgEx() when the canvases and brushes in question are not managed directly by Windows itself (i.e. do not belong to the OS stock objects). Especially when world transforms are in progress, and image scaling inherent in GdipDrawImageRectRectI() is one of such transforms.

This solution is definitely a crutch but as long as it works, it is just as good as any other one.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #86 on: November 04, 2018, 08:22:46 am »
Mike

Thank you for the crutch solution, i will try it and see how it works by me.

About the use of a layered window for the spinner, this was a survival of the XP's days, before Vista and the great DWM addition.

Nowdays i would have used compositing, just like what i did for the OR overlay, or for my C++ DwmSpinner project (I could  use it to solve definitly the problem, and get rid of the old layered stuff).
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #87 on: November 04, 2018, 08:53:36 am »
Here is the latest pandora, altogether with the OR.zip i have been using for test purpose.

There is no more line flicker in the DLL, thank you!

What about the LCD digit size, is it good for you?
 
Do you know of a good free antimalware for Android?
« Last Edit: November 04, 2018, 09:05:26 am by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
Re: Early WIP on v2.55
« Reply #88 on: November 04, 2018, 09:14:01 am »
You know what, if we use another FONT than the lcd.ttf, then the flicker is back again  :-\

I shall definitly give a go to the DwmSpinner version, to see if there is the same problem.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #89 on: November 04, 2018, 09:24:58 am »
Here is the latest pandora, altogether with the OR.zip i have been using for test purpose.

Thank you, DL'ed OK and deleted!

Quote
There is no more line flicker in the DLL, thank you!

Excellent! :)

Quote
What about the LCD digit size, is it good for you?

What if we make it exactly the size that's used in the alpha threshold display? The earlier screenie gave me an impression it was a little larger than that obscuring too much of quark...
 
Quote
Do you know of a good free antimalware for Android?

Sorry Patrice, I've got absolutely no experience with Android except using my smartphone on rare occasions when I'm away from my workstation and optical land line web connection. It is my good old classic Nokia 3310 that I'm using on a regular basis instead. :)

I'm sorta squeamish towards slack-baked modern gimmicks and for me, there's nothing better than a well-packed desktop PC. :)

You know what, if we use another FONT than the lcd.ttf, then the flicker is back again  :-\

For me, it's OK with the font you used before lcd.ttf. (see below)

I haven't yet tried lcd.ttf because I was busy typing this response...

Re. DWM, please don't rush if it needs much effort. Let me see first what's going on with the fonts under my Win 7 and 10...
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)