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

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #30 on: October 28, 2018, 08:48:46 pm »
BTW spot the two differences:  :D

8)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #31 on: October 29, 2018, 09:11:41 am »
Brighter lighting, and more contrast because of higher straylight.

Andů of course "Obj size" and "Load in", taking benefit of the extra height size added to the window and its right panel  :)

BTW: The "load in" time, seems to be almost the same than on my computer.
What woul be nice would be to update the display in real time while loading the model, to get this final report 02:02,82 (like for a StopWatch, see MBox64).

Code: [Select]
void SetStatusTime(const MFTIME &time, IN long nID, IN long redraw) {
    static MFTIME wastime = -1;
    if (wastime != time) {
        HRESULT hr = S_OK;
        WCHAR szTimeStamp[32];

        long T = (long) (time / ONE_SECOND);
        long HH = T / 3600;
        long MM = (T - HH * 3600) / 60;
        long SS = T - HH * 3600 - MM * 60;

        hr = StringCchPrintf(szTimeStamp, strSize(szTimeStamp), L"%02d:%02d:%02d", HH, MM, SS);

        if (SUCCEEDED(hr)) {
            ZD_SetObjectTextEx(nID, szTimeStamp, redraw);
        }
    }
    wastime = time;
}
« Last Edit: October 29, 2018, 09:46:19 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55:: AHTUNG!!!
« Reply #32 on: October 29, 2018, 08:15:00 pm »
Patrice my friend,

I have a simple and nice model I'm often using for experimentation. It has the following MAT file:

newmtl 08___Default
illum 4
Ka 1 1 1
Kd .6 .6 .6
Ks 1 1 1
Ke 0 0 0
Ns 500
map_Ka ./Textures\Raw/Cerberus_AO.tga
map_Kd .\Textures\Cerberus_A.tga
map_Ks ./Textures/Cerberus_R.tga
map_bump .\Textures/Raw\Cerberus_N.tga


Below are the snapshots of this model rendered in an OR recompilation with Intel C++ I made two weeks ago to test its new free license I'm supposed to renew every three months, and the same model rendered in our latest "reference" OR. :'(

... GDIplus requires a fully qualified path.

Why should I care? :o

i) Wavefront OBJ format, ii) ObjReader, and iii) myself all require fully qualified, 8.3, absolute and relative paths and slashes both ways in an arbitrary order. When dealing with pathnames, first REPLACE$ their possible '/' forward slashes with '\\' back slashes and then reparse them as usual.

Quote
See this API ...

Is this supposed to mean that it is I who is supposed to fix this glitch? I have every reason to believe the regression appeared as a result of you recent material name case insensitivity "hotfix".

Can you work on it a little more, please? ::)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #33 on: October 29, 2018, 08:57:24 pm »
send me the obj model altogether with the faulty mtl file, and i shall fix it.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55 :: AHTUNG!!!
« Reply #34 on: October 29, 2018, 09:42:03 pm »
... the obj model altogether with the faulty mtl file, and i shall fix it.

The MTL file is not faulty, and it needs not any fixing. Rather it is the hotfixed OR that's faulty and in need of more work to be able to display the model properly with the existing MAT file. ;)

Thanks!
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #35 on: October 29, 2018, 10:02:46 pm »
Matching slash and anti_slash is a very bad practice, but i will take care of it, no problem, this is easy to solve.

Will do it tomorrow morning, first thing  8)
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #36 on: October 30, 2018, 12:27:22 am »
The model and its textures import flawlessly with the current MAT file into all 3D editors and viewers I have, including 3ds Max. If anything's wrong with at least one index, 3ds Max always aborts import and throws an error message. I'm inclined to believe it more than the debugger.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #37 on: October 30, 2018, 01:38:48 am »
Here is the new Tools.h to fix the relative path problem, and remove the duplicated slash.

See the new function replaceA, and the changes done into Path_CombineA

Warning for dynamic memory allocation, replaceA uses malloc, thus don't forget to use free once done.
« Last Edit: October 30, 2018, 01:41:34 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #38 on: October 30, 2018, 01:06:22 pm »
Hi Patrice,

The fixes seem to work fine for me, thank you! :)

BTW I cannot compile my VS 2013 solution in the Debug mode; I'm getting three linker errors:

error LNK2001: unresolved external symbol __imp_DwmGetCompositionTimingInfo   Main.obj   ObjReader64
error LNK2001: unresolved external symbol __imp_timeBeginPeriod               Main.obj   ObjReader64
error LNK2001: unresolved external symbol __imp_timeEndPeriod                 Main.obj   ObjReader64

Does that mean I'm missing some WinAPI debug mode library(-ies) or #pragma lib(-s), do you think?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #39 on: October 30, 2018, 01:34:08 pm »
Put this in the debug Property Pages
Linker -> Input section

Additional Dependencies
Winmm.lib;Dwmapi.lib;pdh.lib;UxTheme.lib;Comctl32.lib;Glu32.lib;Shlwapi.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;%(AdditionalDependencies)
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #40 on: October 30, 2018, 01:41:47 pm »
Small fix to change into replaceA

    // Making new string of enough length
    long nLen = (K + cnt * (newlen - oldlen) + 1) * 2;

shoul be

    // Making new string of enough length
    long nLen = (K + cnt * (newlen - oldlen) + 1); // * 2; we are using char here rather than WCHAR
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #41 on: October 30, 2018, 02:43:51 pm »
Put this in the debug Property Pages

That did the trick, thanks! :) (how could I overlook such an obvious thing? :o)

Small fix to change into replaceA

Done!
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: 753
Re: Early WIP on v2.55 :: !!! AHTUNG, Part II !!!
« Reply #42 on: October 31, 2018, 07:05:42 am »
Patrice,

I'm sorry to say but I have every reason to believe that your

!!! ZI_SPINNER LEAKS GDI OBJECTS !!!

at a rate of 8 handles each time it pops up and down at model load time under my Win 7.

Will you please fix that leak in your GDImage?

(Please don't ask me for proof; I'm pretty good at isolating and fixing the source of GDI memory leaks. I am 100% sure the problem exists under your Win 10 as well though the exact number of handles may differ.)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #43 on: October 31, 2018, 09:51:53 am »
May i send you a spinner.h to use with OR (in debug mode), as i have no way to check it with Seven  :-[

Note: I am using the undocumented API RtlDecompressBuffer, but i could use my proprietary png animation rather than a .ski file, or even just a simple .png
« Last Edit: October 31, 2018, 09:59:10 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55 :: !!! AHTUNG, Part II !!!
« Reply #44 on: October 31, 2018, 10:13:46 am »
Of course you may, my friend.

Re. your RtlDecompressBuffer, I know. It's in the import table of all the spinners you've ever used. ;) Remember I re-implemented your spinner in multi-threaded OOP FBSL in my Objector? :)

But no, RtlDecompressBuffer has no relation to GDI objects. I'm sure the problem is seen also under your Win 10. I can check it here too but I just was too lazy to switch on my own Win 10 box.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)