- TasmanianNoob
- Posts: 5
- Joined:
BGFX Noesis Implementation not working
Hello, hopefully this isn't the wrong place to put this thread.
I've been working on implementing bgfx with noesisgui. I think I'm pretty close and (hopefully) just facing the last few problems.
When I use how does the render context get that information? None of the render target functions seem to get called, createTexture width and height are unrelated to the _view->SetSize so I'm a bit lost.
The more important issue I'm facing is that the button isn't rendering. I've tried converting this https://github.com/Noesis/Tutorials/tre ... rationGLUT to use bgfx (& glfw).
The clicking mouse artifacts are just from the GIF and aren't actually there.
The intended outcome is this:
But my project produces this outcome:
Maybe a helpful note. When I was playing around with SetSize I had to manually change the view size (e.g. from to I got this outcome:
This version has most of the text and it looks like the button is there just extremely stretched (not sure if you can see it)
Here is my github project where I'm just trying to get it to work: https://github.com/TasmanianNoob/Noesis ... ree/master
I've been working on implementing bgfx with noesisgui. I think I'm pretty close and (hopefully) just facing the last few problems.
When I use
Code: Select all
_view->SetSize(width, height)
The more important issue I'm facing is that the button isn't rendering. I've tried converting this https://github.com/Noesis/Tutorials/tre ... rationGLUT to use bgfx (& glfw).
The clicking mouse artifacts are just from the GIF and aren't actually there.
The intended outcome is this:
But my project produces this outcome:
Maybe a helpful note. When I was playing around with SetSize I had to manually change the view size (e.g. from
Code: Select all
BeginOnscreenRender()
{
bgfx::setViewRect(this->viewId, 0, 0, this->width, this->height)
}
Code: Select all
bgfx::setViewRect(this->viewId, 0, 0, this->width, this->height / 4)
This version has most of the text and it looks like the button is there just extremely stretched (not sure if you can see it)
Here is my github project where I'm just trying to get it to work: https://github.com/TasmanianNoob/Noesis ... ree/master
Re: BGFX Noesis Implementation not working
It works the other way around. You must create and bind a render target with specific dimensions, and inform about those dimensions to the view by calling SetSize.how does the render context get that information? None of the render target functions seem to get called, createTexture width and height are unrelated to the _view->SetSize so I'm a bit lost.
My advice is that you use RenderDoc to compare our GLUT example with your implementation to understand where the differences are.
- TasmanianNoob
- Posts: 5
- Joined:
Re: BGFX Noesis Implementation not working
I've been looking through RenderDoc but I've gotten stuck. It looks like the state is roughly the same but the opengl version renders the elements in a different order to bgfx. BGFX draws the button first before it is overwritten by the other details. The last step is drawing the text but it doesn't appear; not sure why. OpenGL draws the button after the background so it isn't overwritten.It works the other way around. You must create and bind a render target with specific dimensions, and inform about those dimensions to the view by calling SetSize.how does the render context get that information? None of the render target functions seem to get called, createTexture width and height are unrelated to the _view->SetSize so I'm a bit lost.
My advice is that you use RenderDoc to compare our GLUT example with your implementation to understand where the differences are.
I'm unsure about changing the render order. Do you know what should be affecting that or how I can change the order?
I've included images and the actual renderdoc captures.
OpenGL draw order:
BGFX draw order:
OpenGL state changes:
BGFX state changes (only missing the actual draw command because the list is long):
OpenGL capture: https://1drv.ms/u/s!ArbdWsCd5o0O1wiYrUb ... u?e=wZpe92
BGFX capture: https://1drv.ms/u/s!ArbdWsCd5o0O1wkO1N6 ... i?e=pk7YTQ
- TasmanianNoob
- Posts: 5
- Joined:
Re: BGFX Noesis Implementation not working
Oops looks like that was from bgfx::reset resetting the call to bgfx::setViewMode.I've been looking through RenderDoc but I've gotten stuck. It looks like the state is roughly the same but the opengl version renders the elements in a different order to bgfx. BGFX draws the button first before it is overwritten by the other details. The last step is drawing the text but it doesn't appear; not sure why. OpenGL draws the button after the background so it isn't overwritten.It works the other way around. You must create and bind a render target with specific dimensions, and inform about those dimensions to the view by calling SetSize.how does the render context get that information? None of the render target functions seem to get called, createTexture width and height are unrelated to the _view->SetSize so I'm a bit lost.
My advice is that you use RenderDoc to compare our GLUT example with your implementation to understand where the differences are.
I'm unsure about changing the render order. Do you know what should be affecting that or how I can change the order?
I've included images and the actual renderdoc captures.
OpenGL draw order:
BGFX draw order:
OpenGL state changes:
BGFX state changes (only missing the actual draw command because the list is long):
OpenGL capture: https://1drv.ms/u/s!ArbdWsCd5o0O1wiYrUb ... u?e=wZpe92
BGFX capture: https://1drv.ms/u/s!ArbdWsCd5o0O1wkO1N6 ... i?e=pk7YTQ
BeginOnscreenRender now includes
Code: Select all
bgfx::setViewMode(viewId, bgfx::ViewMode::Sequential);
Re: BGFX Noesis Implementation not working
Great, so problem solved?
- TasmanianNoob
- Posts: 5
- Joined:
Re: BGFX Noesis Implementation not working
Just fixed everything up. If someone comes across this thread in the future I would probably recommend learning from https://github.com/kuncarous/nextmu/tree/main instead, though my implementation should probably work. I just found kuncarous' yesterday, so my code is based on the older bgfx implementations and is probably lacking in functionality.Great, so problem solved?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 0 guests