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

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #555 on: January 24, 2019, 09:22:21 pm »
Oh, then sure it's a deficiency in the Intel HD Graphics implementation of OpenGL driver.

We should make the glFlush()/glFinish() choice graphics vendor dependent...
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #556 on: January 24, 2019, 09:25:05 pm »
The glFinish function does not return until the effects of all previously called OpenGL functions are complete. Such effects include all changes to the OpenGL state, all changes to the connection state, and all changes to the framebuffer contents.

On my Intel it takes almost 90 seconds to complete all the effects, during all this time the application becomes unresponsive.

Quote
We should make the glFlush()/glFinish() choice graphics vendor dependent...
Of course, that is the best solution.

Added:
https://forums.intel.com/s/question/0D50P0000490CB8SAM/opengl-is-super-slow-on-windows-10-intel-hd-4000-and-earlier?language=en_US

https://www.opengl.org/discussion_boards/showthread.php/200367-An-Intel%28R%29-HD-Graphics-4000-War-Story
« Last Edit: January 24, 2019, 09:33:51 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 #557 on: January 24, 2019, 09:37:54 pm »
The glFinish function does not return until the effects of all previously called OpenGL functions are complete. Such effects include all changes to the OpenGL state, all changes to the connection state, and all changes to the framebuffer contents.

That's why I chose it for the task. I must be absolutely sure gP.hGL has completed its draw cycle before I proceed with a new iteration. Otherwise the viewport is likely to stay half-drawn.

If your Intel were running W7 rather than W10, you would see flicker with your glFlush() call pretty much like I'm seeing it without my glFinish(). It's because glFlush() wouldn't produce the desired effect.

So, it'll be either glFinish() if nVidia or ATi is detected or no such call at all in case of Intel (assuming it runs W10). We can postpone this issue till I (hopefully) have a discrete Intel video card later this year to test it.
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 #558 on: January 24, 2019, 09:47:37 pm »
So, please make it

                if (gP.graphicCard != INTEL)
                    glFinish(); // Complete redraw first then proceed (eliminate gP.hGL flicker)


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

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #559 on: January 26, 2019, 03:26:11 pm »
Please tell me if this code works on Seven, to keep the main caption enlighted when the help get visible and while switching the scrolling between the text and the mesh?


LRESULT CALLBACK HelpProc(IN HWND hWnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam) {
    HDROP hfInfo = { 0 };
    WCHAR szFile[MAX_PATH] = { 0 };
    LRESULT nRet = 0;

    switch (uMsg) {
    case WM_NCACTIVATE:
        if (wParam) { skRestoreCaption(gP.hHelp, 0); }
        break;


    case WM_DROPFILES:
        hfInfo = HDROP(wParam);
        if (DragQueryFile(hfInfo, 0xFFFFFFFF, NULL, 0) > 0) {
            if (DragQueryFile(hfInfo, 0, szFile, MAX_PATH)) {
                ProccessCommandline(szFile);
            }
        }
        DragFinish(hfInfo);
        break;
    }
    return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #560 on: January 26, 2019, 08:14:46 pm »
Yes Patrice,

Your fix works flawlessly for me; the caption stays in focus, and the LED light, green, no matter what I do scrolling the help or panning/orbiting the model.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #561 on: January 26, 2019, 08:59:30 pm »
Good, thank you.
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #562 on: February 09, 2019, 02:43:00 pm »
My friend

What are exactly the features that you want me to cleaned up from the version 2.75 release?

What are the new features do you think are missing from the documentation?
and to help my old brain, could you give me a short list of the new features that have been added since version 2.54.
(map_Ke, map_Ns, rotating lights, multiple shaders, model slicer, toast messages, transparent help, etc.)

Thank you!
« Last Edit: February 09, 2019, 03:26:09 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 #563 on: February 09, 2019, 06:13:35 pm »
Patrice,

1. I can't tell you exactly because I don't remember what code version you have. Please send me your sources tonight to WinDiff them, and I'll clean them up by tomorrow morning.

2. The new features are (not in the order of importance):

- transparent help and toast window help
- full OpenGL driver/GLSL version info
- model reload and unload
- load progress timer
- selectable fields of view
- emissive color mapping
- specular exponent mapping
- design modes:
     - texture inspection (Main->Inspect: 8 per-texture viewers + UV checker)
     - geometry inspection (Main->Inspect: material surface, color coded wireframe overlay, color coded meshes, vertex normals/tangents/bitangents)
     - mesh info tips
     - Z-axis rotation
     - bounding volumes
     - scene grid
     - model slicer
- 6 fancy lighting/shading modes (Main->Renderer)
- animated
     - lights
     - model reset
- not counting numerous bug fixes here and there...

Quite an impressive list for a minor version, isn't it? ;)
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 #564 on: February 10, 2019, 11:04:03 am »
Patrice,

The verified sources are attached below. A couple bugs fixed. (material initialization is definitely not your strongest point! ;))

The files have been checked for smooth compilation.

A few obsolete files are marked with a _WTF postfix.

We have differences in Help.h. I've included my version in the zip under the name of !!!MY_Help!!!.h. Please WinDiff them and advise which one I should use, yours or mine.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #565 on: February 10, 2019, 12:21:57 pm »
Thank you very much, we are back in sync!

Here is the correct Help.h to use, yours didn't had the latest changes, especially to keep the caption highlighted while switching between GL for zooming and help for scrolling text with the middle mouse.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #566 on: February 10, 2019, 12:32:48 pm »
Thank you Patrice!

Strange as it may seem, my Help.h worked perfectly for me under W7 as far as scrolling and caption focus were concerned. I did make a few changes in it following your advice in this thread, after all.

But I'll be using the version that you attached above.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #567 on: February 10, 2019, 06:35:45 pm »
Version 2.75 has been released.

I have reworked all the .png files from the resource folder with TruePNG, for the purpose of size reduction.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #568 on: February 11, 2019, 09:54:39 am »
Thank you!

I've DL'ed the zip for the sake of getting the new PNG's.

You seem to have saved around 5MB of folder footprint. :)
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 #569 on: February 11, 2019, 03:53:32 pm »
We've achieved the goals set forth in this thread, so I'm closing it down.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)