- igorsegalla
- Posts: 9
- Joined:
Using an existent device (OpenGL)
Hello,
I am trying to integrate NoesisGUI with Urho3D game engine, but I dont understand how I can get the renderer device already created by Urho3D, into NoesisGUI.
I need to implement by myself the Noesis::RenderDevice, Noesis::Texture, Noesis::RenderTarget interface? Or I can simply set a OpenGL device (I am using OpenGL on Urho3D) at some NoesisGUI part and it's done?
Im really confused about it, consdering I will not use the NsApp on my implementation source.
Thanks.
I am trying to integrate NoesisGUI with Urho3D game engine, but I dont understand how I can get the renderer device already created by Urho3D, into NoesisGUI.
I need to implement by myself the Noesis::RenderDevice, Noesis::Texture, Noesis::RenderTarget interface? Or I can simply set a OpenGL device (I am using OpenGL on Urho3D) at some NoesisGUI part and it's done?
Im really confused about it, consdering I will not use the NsApp on my implementation source.
Thanks.
Re: Using an existent device (OpenGL)
This is a minimal sample without App library and using an external context created by GLUT:
https://github.com/Noesis/Tutorials/tre ... rationGLUT
It is using our reference GLRenderDevice implementation.
https://github.com/Noesis/Tutorials/tre ... rationGLUT
It is using our reference GLRenderDevice implementation.
- igorsegalla
- Posts: 9
- Joined:
Re: Using an existent device (OpenGL)
Cool. I managed to implement into my game, but the background is always black.
Should be rendered on top of this screen, but isn't:
Do you know why? Im calling view->render at Graphics::EndFrame (Urho3D), I tried to use glPushAttrib( GL_ALL_ATTRIB_BITS ); too, but doesnt work.
Thanks.
Should be rendered on top of this screen, but isn't:
Do you know why? Im calling view->render at Graphics::EndFrame (Urho3D), I tried to use glPushAttrib( GL_ALL_ATTRIB_BITS ); too, but doesnt work.
Thanks.
Re: Using an existent device (OpenGL)
That XAML is probably setting the background to black. Could you please paste it here?
- igorsegalla
- Posts: 9
- Joined:
Re: Using an existent device (OpenGL)
Code: Select all
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Viewbox>
<StackPanel Margin="50">
<Button Content="Hello World!" Margin="0,30,0,0"/>
<Rectangle Height="5" Margin="-10,20,-10,0">
<Rectangle.Fill>
<RadialGradientBrush>
<GradientStop Offset="0" Color="#40000000"/>
<GradientStop Offset="1" Color="#00000000"/>
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
</StackPanel>
</Viewbox>
</Grid>
Re: Using an existent device (OpenGL)
Could you use RenderDoc to analyze API calls? There must be a clear to black somewhere and I am quite confident it is not Noesis. 😀
- igorsegalla
- Posts: 9
- Joined:
Re: Using an existent device (OpenGL)
Hmm its weird cuz removing view->Render is normal, so must have some Clear into view->Render.
The order of RenderOfScreen matters?
ll debug with RenderDoc.
The order of RenderOfScreen matters?
ll debug with RenderDoc.
Re: Using an existent device (OpenGL)
Yes, order of offscreen is very important. It must be done before binding the main render target. The offscreen phase may also bind an internal framebuffer, make sure to rebind your main buffer again.
- igorsegalla
- Posts: 9
- Joined:
Re: Using an existent device (OpenGL)
When I call _view->GetRenderer()->UpdateRenderTree();, is bugging the Vertex Shader input. For this nothing is being drawn on screen...
Re: Using an existent device (OpenGL)
Render and RenderOffscreen do change GL state, you need to restore it accordingly to your needs.
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests