RevalSoft
Topic Author
Posts: 15
Joined: 24 Jun 2018, 15:23

Texture glitch without visible reason

20 Jan 2022, 08:39

Hello!

I'm continuing integration Noesis inside my proprietary OpenGL engine, all problems with state management was been fixed, but now I got one more phantom problem - after a random time after View rendering begin (like 1-2 minutes), it looks like elements broken (Text, Custom Elements, but not the background or simply button).

Then, after some time, it can randomly back to normal and back to glitch again.
void NSUIView::Update(double secs) {
    if (!IsVisible()) return;

    m_PureView->Update(secs);
    m_PureView->GetRenderer()->UpdateRenderTree();

    OnUpdate();
}

void NSUIView::Render() {
    if (!IsVisible()) return;

    m_PureView->GetRenderer()->RenderOffscreen();

    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glViewport(0, 0, WindowWidth, WindowHeight);

    m_PureView->GetRenderer()->Render();

    glUseProgramObjectARB(0);

    OnRender();
}
How it looks:
Image

How expected:
Image

Noesis Version: 3.1.2

Will be glad for any tips.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Texture glitch without visible reason

20 Jan 2022, 13:07

Could you please share two RenderDoc captures (one without glitches and one with errors) ?

I assume this is using our GLRenderDevice, not a custom renderer right?
 
RevalSoft
Topic Author
Posts: 15
Joined: 24 Jun 2018, 15:23

Re: Texture glitch without visible reason

20 Jan 2022, 22:10

Could you please share two RenderDoc captures (one without glitches and one with errors) ?

I assume this is using our GLRenderDevice, not a custom renderer right?
I have a problem with RenderDoc because it is required modern OpenGL Context Pipeline 3.2+, currently, my project uses 2+ (old pipeline) with extensions.
Please, maybe exist some other method to track problem reason?

Yes, all right, default GLRenderDevice.
 
RevalSoft
Topic Author
Posts: 15
Joined: 24 Jun 2018, 15:23

Re: Texture glitch without visible reason

20 Jan 2022, 23:42

I used Nvidia Nsight for capturing, it works, but while not handling how to save traces.

But, I got some interesting things.

Without glitch Color 0 buffer (after ~1 minute after render begin):
Image

With glitch Color 0 buffer (after ~5 minutes after render begin):
Image

Seems that the buffer does not clear as well and after time just getting overloaded?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Texture glitch without visible reason

21 Jan 2022, 00:19

Probably same issue as in viewtopic.php?f=3&t=2489

Make sure you are doing glColorMask(true, true, true, true) before clearing.
 
RevalSoft
Topic Author
Posts: 15
Joined: 24 Jun 2018, 15:23

Re: Texture glitch without visible reason

21 Jan 2022, 00:34

Probably same issue as in viewtopic.php?f=3&t=2489

Make sure you are doing glColorMask(true, true, true, true) before clearing.
Tried:
void NSUIView::Render() {
    if (!IsVisible()) return;

    m_PureView->GetRenderer()->RenderOffscreen();

    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glViewport(0, 0, WindowWidth, WindowHeight);
    
    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    glClearStencil(0);
    glColorMask(true, true, true, true);
    glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);

    m_PureView->GetRenderer()->Render();

    glUseProgramObjectARB(0);

    OnRender();
}
Result after short time is same:
Image
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Texture glitch without visible reason

21 Jan 2022, 00:39

Let me understand something, what buffer is the "Color 0 buffer" in the screenshots. It is not the framebuffer right?
 
RevalSoft
Topic Author
Posts: 15
Joined: 24 Jun 2018, 15:23

Re: Texture glitch without visible reason

21 Jan 2022, 00:55

Let me understand something, what buffer is the "Color 0 buffer" in the screenshots. It is not the framebuffer right?
As i can suppose - it is Offscreen.
Image
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Texture glitch without visible reason

21 Jan 2022, 01:14

I need to understand more. How is the XAML that is rendering this part of the UI (including the text).
skull.png
skull.png (18.41 KiB) Viewed 595 times
What version of NoesisGUI are you using?
 
RevalSoft
Topic Author
Posts: 15
Joined: 24 Jun 2018, 15:23

Re: Texture glitch without visible reason

21 Jan 2022, 01:31

I need to understand more. How is the XAML that is rendering this part of the UI (including the text).

skull.png

What version of NoesisGUI are you using?
Version: 3.1.2 Indie, but got this bug and in 3.1.0

ItemsControl 'SkillsControl' -> Collection of 'SkillTree_SkillButton'

Here is part only about asked things:

Here is XAML of this View:
Here is the dependency Resources for that:

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 47 guests