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

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #60 on: November 01, 2018, 10:13:11 am »
I think i have found what causes the 6 extra GDI leak, i am doing a few more tests before posting the fix

You will have to restore the ZI_SpinnerInit and ZI_SpinnerClose to avoid code duplication with the DLL, and remove the spinner.h from the OR project.

Added
Here is the new pandora…

Hunting is closed for now  8)
« Last Edit: November 01, 2018, 01:21:23 pm by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #61 on: November 01, 2018, 01:46:10 pm »
YOU DID IT!!! :o

"You're my hero!" (c) 8)

:D

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 #62 on: November 01, 2018, 09:35:50 pm »
OK Patrice,

I'm feeling a bit ashamed of not being so fast with my fixes as you are. :)

Here are my fixes dated MLL 10-28-2018. They include:
  • Model rotation around the Z axis implemented as a Design modes menu entry. I find this style more common to the existing UI.
  • Model loading timer implemented in a worker thread.
Don't forget to copy a new ellipse texture from the zip into the \Reader subfolder overwriting the old one. The texture is color mapped to match the colors of respective axes on the scene grid.

Shader controls aren't ready yet due to my recent agitation caused by the GDI object leaks. ;)

Your feedback will be much appreciated.


[ADD] Oh, and one more thing: being a lazy bones, I haven't tried it out under Windows 10 . However I will if you report anything wrong with my code on your machine. :)
« Last Edit: November 01, 2018, 10:45:34 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: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #63 on: November 01, 2018, 10:52:02 pm »
I have downloaded the patch and merged the last changes, thank you!

Right now i am too tired to check it, and i am going to bed.
You will have my feedback tomorrow. Zzzz!
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #64 on: November 02, 2018, 08:55:45 am »
Quote
•Model rotation around the Z axis implemented as a Design modes menu entry. I find this style more common to the existing UI.
That works nicely, thank you!

Quote
•Model loading timer implemented in a worker thread.
BTW to avoid the use of a new thread, i have been working myself on an enhancement of the GDImage/spinner that now displays a chrono hover the animation, and returns the total time ellapsed when closing the spinner.
« Last Edit: November 02, 2018, 09:24:06 am 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 #65 on: November 02, 2018, 10:28:29 am »
Thanks for a favorable feedback! :)

BTW to avoid the use of a new thread, i have been working myself on an enhancement of the GDImage/spinner that now displays a chrono hover the animation, and returns the total time ellapsed when closing the spinner.
  • There's nothing wrong with using as many threads as we actually need. We're going to use more in the future, and most probably in the triangulation and texture loading loops in the first place. You see, we can't afford to wait 2 minutes to load 2 gigs of model data because we're on the wrong side of our sixties -- both of us. ;) And from this perspective, I see absolutely no reason in setting the processor affinity to one core only, as I've noted several times already.
  • While the ZI_Spinner is on, the main window is on the verge of becoming totally non-respondent due to the tight loops in the main thread. This may provoke the user to forcibly close the app and trash OR altogether. But seeing the figures scrolling apparently in the main window (wink-wink), the user will be made to realize everything's going on normally and the main window isn't frozen at all.
  • I doubt your time readings are going to be seen clearly against the flashing spinner and possible near-white wallpapers. Yet your solution has a right to live. At any rate, the final decision will be yours of course.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #66 on: November 02, 2018, 10:50:41 am »
Quote
3.I doubt your time readings are going to be seen clearly against the flashing spinner and possible near-white wallpapers
Hey Thomas, you will see the result, even on white wallpapers. 8)
« Last Edit: November 02, 2018, 12:05:06 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 #67 on: November 02, 2018, 12:42:21 pm »
I'm always open to discussions, but of course it's you who's the boss here. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #68 on: November 02, 2018, 10:02:51 pm »
Mike

Could you Please check the attached GDImage.dll with OR on Seven.

You must change this in the GDImage.h
Code: [Select]
C_IMPORT WCHAR*    ZI_SpinnerClose();
C_IMPORT HWND      ZI_SpinnerInit(IN HWND hParent, IN WCHAR* szFileName, IN long nSpeeDelay, IN LONG_PTR UseFont);

and use this in
Code: [Select]
void gl_LoadTextures(IN long nSpinnerFlag, OUT long &nBump) { // 05-24-2015 setup the new nBump value.
    MobjMat* pMaterial = 0;
    long nI = 0, nCount = 0;
    nBump = 0; // 05-24-2015
    if (nSpinnerFlag) {
        WCHAR szFile[MAX_PATH] = { 0 };
        Path_Combine(szFile, EXEresource(), L"ObjReader.ski");
        ZI_SpinnerInit(gP.hGL, szFile, 0, 0);
    }

and this in void gl_InitRenderProps() {
Code: [Select]
    // Start spinner animation
    WCHAR szFile[MAX_PATH] = { 0 };
    Path_Combine(szFile, EXEresource(), L"ObjReader.ski");
    ZI_SpinnerInit(gP.hGL, szFile, 0, skCaptionFontPlus());

Note: ZI_SpinnerClose();
returns a pointer to the formated string, matching the last chrono.

if it works by you, then i will send you the updated pandora...
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #69 on: November 03, 2018, 02:08:44 am »
Hehe, it works and looks not so bad as I would expect! 8)

If used in parallel with my loadTimer, the spinner shows the time a few fractions of a second longer because it starts not exactly when the new model begins to load but rather when the old model is still deleting its data.

(Anyway, I guess there's nothing preventing me from using my own neat loadTimer in my in-house OR builds similar to the "lightweight Fraps" I'm using instead of the standard FPS counter. ::) )
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #70 on: November 03, 2018, 08:44:38 am »
Indeed, i have a much better one that is based on my bluring function, unfortunatly it works only when the code is put into OR.
Because of thread priority, there is a flickering line when the same code is put into the DLL.

If you want i can send you the bluring version if you want to test it inside of OR.

Your loadtimer is fine, however the text size used, being very small, is very hard to read for old eyes like myself.

Adding the chrono inside of the spinner (this is an optional feature) is a good addition to the GDImage engine, especially because we can adjust the text size and because we can use any private font, including LED display if we want.  :)
« Last Edit: November 03, 2018, 08:46:24 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #71 on: November 03, 2018, 09:21:02 am »
About your "lightweight Fraps", to make our life easier, switch to "PAT's gasoline station" and use the attached "fraps.png" instead of "digit.png".

Then just change this in the code
Path_Combine(gP.mt.FullName, skSkinFolder(), L"fraps.png");//L"digit.png");

easier isn't it  :)

Or even more easier, without changing anything in the code, just keep the name digit.png and overwrite digit.png with fraps.png into your Reader folder.
« Last Edit: November 03, 2018, 09:24:43 am 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 #72 on: November 03, 2018, 09:46:52 am »
Thank you for the new fraps PNG. So its kerning satisfies the metrics of your gasoline station calc, doesn't it? If so then I'll sure use it instead of my monospaced font image and custom code.

Re. my custom code pieces, I grouped them all in a MLL_DEV.h file and added global commentable #define MLL_DEV and conditional #include MLL_DEV.h statements at the top of Main.cpp. Now I'm using just a few #ifdef MLL_DEV/#ifndef MLL_DEV statements throughout the code to attach/detach the MLL_DEV.h code versions instead of main code automatically as necessary.

This way there won't be any variations in the main code any more, and hence no need to exchange MLL_DEV.h between us to be able to compile the project both ourselves and at the user's. Just comment out the #define MLL_DEV directive and off you go with your compilation.

So, where's the promised pandora? Or does it depend on my willingness to use the chronoized spinner? ;D OK, I will use it. Please send me the sources (and the blurred/flickering spinner) for respective sync'ing and testing. :)

Note I'll also need your Main.cpp file to sync with my OR. Actually there are two places where the spinner is called to pop up: gl_LoadModel() and gl_LoadTextures(). I want to know how you prevent yet another spinner thread from launching when two of them are called, directly and indirectly, from gl_LoadModel() sequentially at model load time as opposed to the re-mipmapping of textures when only one spinner is called from gl_LoadTextures() alone.
« Last Edit: November 03, 2018, 10:20:00 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 #73 on: November 03, 2018, 10:59:25 am »
Got it, thanks! Off for testing.
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 #74 on: November 03, 2018, 11:13:49 am »
I am not seeing how the spinner sets the final time reading in the Load in edit box.

[EDIT] OK no problem, it was "left as an exercise for the reader" (c). ;)

I think ZI_SpinnerClose(); in gl_LoadModel() should be moved down to the place where killLoadTimer() now resides. If not, some UI finalization steps are excluded from the overall loading time. This isn't fair, because until those are completed ObjReader is not yet ready for user interaction, i.e. the model loading process isn't fully over yet.
« Last Edit: November 03, 2018, 11:58:08 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)