jack.barkov
Topic Author
Posts: 9
Joined: 10 Jan 2022, 17:04

ComboBox - GL Render Blink/Freeze

10 Jan 2022, 17:22

Hi!

I'm trying to implement a simple example with NoesisGUI.
But I have a little bug that I can't fix.

I made a small example for the noesis team to be able to reproduce the bug.

I'm using glfw 3.2.1, glew 2.1.0, glm and noesisgui 3.1.2 for the example (but I tested it with 3.0.9 and the same bug happened).

Link to source code (and release binaries for simple checks):
https://drive.google.com/file/d/19gMZmBJ-T8PP59yZwyMMuyTQr6taPDjx/view
I also made a little video showing what's going on:


Notice that the triangle starts to blink or lock indefinitely when you interact with the ComboBox.

I haven't figured out how I can fix this.
Is it a bug in my code?

Thanks.
Jack.
 
jack.barkov
Topic Author
Posts: 9
Joined: 10 Jan 2022, 17:04

Re: ComboBox - GL Render Blink/Freeze

10 Jan 2022, 17:25

I believe it is something related to this topic?

viewtopic.php?f=3&t=2489
 
jack.barkov
Topic Author
Posts: 9
Joined: 10 Jan 2022, 17:04

Re: ComboBox - GL Render Blink/Freeze

10 Jan 2022, 17:34

I've already managed to make this same bug using a Label with a content larger than the element's area.

Test with this code:
	Noesis::Ptr<Noesis::Grid> xaml(Noesis::GUI::ParseXaml<Noesis::Grid>(R"(
    <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
        <Grid Width="1024" Height="768">
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
			</Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Width="15" Height="20" Content="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" />
        </Grid>
    </Grid>
)"));
Video:
 
User avatar
jsantos
Site Admin
Posts: 3456
Joined: 20 Jan 2012, 17:18
Contact:

Re: ComboBox - GL Render Blink/Freeze

10 Jan 2022, 18:20

This is an integration issue with the offscreen phase.

Make sure you are rendering the offscreen before binding the main buffer. And also make sure to restore GL state, any call to RenderOffscreen or Render will modify it. For example, RenderOffscreen sometimes changes the active framebuffer (I think this is what is happening in your case).

https://github.com/Noesis/Tutorials/blo ... n.cpp#L115

This is explained in the render part of the Integration Guide.
 
jack.barkov
Topic Author
Posts: 9
Joined: 10 Jan 2022, 17:04

Re: ComboBox - GL Render Blink/Freeze

11 Jan 2022, 14:49

Solved!

Thank you.
Jack.
 
User avatar
jsantos
Site Admin
Posts: 3456
Joined: 20 Jan 2012, 17:18
Contact:

Re: ComboBox - GL Render Blink/Freeze

11 Jan 2022, 16:22

Great! Marking as solved

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest