PixelArtDragon
Topic Author
Posts: 4
Joined: 23 Jun 2020, 13:22

Integration breaks existing rendering but renders Noesis elements just fine

14 Jul 2020, 19:58

I have a rendering loop working just fine for my game, but after following the steps in the integration guide, I end up with a couple of interesting problems:
  1. If I merely initialize the Noesis view's renderer, all of my renders stop working, whether or not actually update and render any of the frame-by-frame UI commands.
  2. The Noesis elements are rendering just fine.
  3. In RenderDoc, the first frame I render looks somewhat normal, but the call to SwapBuffers doesn't reflect that (and it's only the first frame).
I know I'm supposed to reset the OpenGL state to a "sane state" after any Noesis rendering call, and I thought I do that (I can provide a list of all the flags and settings I restore each frame), but it looks like what I'm resetting isn't enough. What could be the issue? And what information would help?

In case it matters, I'm using GLFW for window handling.
 
User avatar
jsantos
Site Admin
Posts: 3918
Joined: 20 Jan 2012, 17:18
Contact:

Re: Integration breaks existing rendering but renders Noesis elements just fine

15 Jul 2020, 18:55

Effectively you need to restore all GL states after invoking RenderOffscreen or Render. You have the sources of our GL renderer to analyze all potential state changes. I also recommend using RenderDoc to help with this.
 
PixelArtDragon
Topic Author
Posts: 4
Joined: 23 Jun 2020, 13:22

Re: Integration breaks existing rendering but renders Noesis elements just fine

15 Jul 2020, 22:08

Well, upon closer fiddling with specific OpenGL parameters, I've come to the conclusion that the issue is that Noesis is drawing to the whole screen (which is causing the depth everywhere to be zero). This means that if I don't disable GL_DEPTH_TEST, it's the only thing that's rendered, and if I do disable it, I still end up with a weird blending of the clear color and what I'm tring to render (unless I also disable GL_BLEND).

Since I've seen that this can be a problem with the view I'm trying to use, I figured I'd provide it here:
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
	<Button Content="Button" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="75"/>
</Grid>
 
PixelArtDragon
Topic Author
Posts: 4
Joined: 23 Jun 2020, 13:22

Re: Integration breaks existing rendering but renders Noesis elements just fine

16 Jul 2020, 07:04

Well, nevermind. It looks like the "depth everywhere is zero" is a result of the depth mask not being re-enabled somewhere in my code after it gets disabled by the Noesis calls. It works now.
 
User avatar
jsantos
Site Admin
Posts: 3918
Joined: 20 Jan 2012, 17:18
Contact:

Re: Integration breaks existing rendering but renders Noesis elements just fine

17 Jul 2020, 12:40

Great! Marking this as solved.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 30 guests