Re: Some pre beginning questions
If you are already linking against our App library, then it is just doing:
Code: Select all
// Register app components. We need a few in this example, like Display and RenderContext
NoesisApp::Launcher::RegisterAppComponents();
Re: Some pre beginning questions
Edit: haven't seen the answer from jsantos before typing this, so trying that now
Re: Some pre beginning questions
Cool thanks that worked. Really appreciate your help. I'm down to a last set of errors :)If you are already linking against our App library, then it is just doing:Code: Select all// Register app components. We need a few in this example, like Display and RenderContext NoesisApp::Launcher::RegisterAppComponents();
19:15:19:217 [D] [NOESIS] E 'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: New Game' (type 'ToggleButton')
19:15:19:221 [D] [NOESIS] E 'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: Settings' (type 'ToggleButton')
19:15:19:224 [D] [NOESIS] E 'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: Exit' (type 'ToggleButton')
19:15:19:232 [D] [NOESIS] E Binding failed: Path=Settings, Source=null(''), Target=ToggleButton('Settings'), TargetProperty=ButtonBase.Command
-
-
sfernandez
Site Admin
- Posts: 2056
- Joined:
Re: Some pre beginning questions
This binding error can happen when loading a xaml before the DataContext is set, nothing to worry about.Binding failed: Path=Settings, Source=null(''), Target=ToggleButton('Settings'), TargetProperty=ButtonBase.Command
Those are from binding IsEnabled property to a ToggleButton like in <ContentControl Content="...." IsEnabled="{Binding ElementName=Start}"/>.'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: New Game' (type 'ToggleButton')
'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: Settings' (type 'ToggleButton')
'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: Exit' (type 'ToggleButton')
What are you trying to do here? Maybe you forgot to set the binding path to IsMouseOver and use some style that hides that text when IsEnabled is false?
Code: Select all
<Style x:Key="HintStyle" TargetType="{x:Type ContentControl}">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Visibility" Value="Hidden"/>
</Trigger>
</Style.Triggers>
</Style>
...
<ContentControl Style="{StaticResource HintStyle}" Content="Dive straight into the adventure." IsEnabled="{Binding IsMouseOver, ElementName=Start}"/>
<ContentControl Style="{StaticResource HintStyle}" Content="Configure the settings for the demo." IsEnabled="{Binding IsMouseOver, ElementName=Settings}"/>
<ContentControl Style="{StaticResource HintStyle}" Content="Exit the demo." IsEnabled="{Binding IsMouseOver, ElementName=Exit}"/>
Re: Some pre beginning questions
Cool all errors gone, thanks again guys you've been great help.
If only I knew that myself. Trying to show some explanation when mouse overing buttons like in your Menu3D example. But I'm happy for now that I have the framework integrated, no more errors and it'll be just learning and expanding.What are you trying to do here?
Re: Some pre beginning questions
Glad to know you are making progress! Just a few clarifications.
I also think that our Integration sample if very simple regarding logging, the channel parameter is being ignored and all the binding messages are being sent to that channel. Those messages can be silenced by default because they are quite verbose and only useful when you are trying to debug binding issues. This is the way we are handling logs in the Launcher (also included with source code in the App Framework):
The ugly string Converter<.?AVBaseComponent@Noesis@@> in the log message is not happening in the next major version.'Converter<.?AVBaseComponent@Noesis@@>' binding converter failed to convert value 'ToggleButton: New Game' (type 'ToggleButton')
I also think that our Integration sample if very simple regarding logging, the channel parameter is being ignored and all the binding messages are being sent to that channel. Those messages can be silenced by default because they are quite verbose and only useful when you are trying to debug binding issues. This is the way we are handling logs in the Launcher (also included with source code in the App Framework):
Code: Select all
SetLogHandler([](const char*, uint32_t, uint32_t level, const char* channel, const char* msg)
{
// By default only global channel is dumped
bool filter = !StrIsNullOrEmpty(channel);
// Enable "Binding" channel by command line
if (gCommandLine.HasOption("log_binding"))
{
if (StrEquals(channel, "Binding"))
{
filter = false;
}
}
if (!filter)
{
level = level > NS_LOG_LEVEL_ERROR ? NS_LOG_LEVEL_ERROR : level;
#if defined(NS_PLATFORM_ANDROID)
const int priority[] = { ANDROID_LOG_VERBOSE, ANDROID_LOG_DEBUG, ANDROID_LOG_INFO,
ANDROID_LOG_WARN, ANDROID_LOG_ERROR};
(void)__android_log_print(priority[level], "Noesis", "%s", msg);
#elif defined(NS_PLATFORM_EMSCRIPTEN)
const int flags[] = { 0, 0, 0, EM_LOG_WARN, EM_LOG_ERROR };
const char* prefixes[] = { "T", "D", "I", "W", "E" };
emscripten_log(EM_LOG_CONSOLE | flags[level], "[NOESIS/%s] %s", prefixes[level], msg);
#else
char out[512];
const char* prefixes[] = { "T", "D", "I", "W", "E" };
snprintf(out, sizeof(out), "[NOESIS/%s] %s\n", prefixes[level], msg);
#ifdef NS_PLATFORM_WINDOWS
OutputDebugString(out);
#else
fprintf(stderr, "%s", out);
#endif
#endif
}
});
Re: Some pre beginning questions
All going well it's starting to shape up. Getting an understanding of how things work and slowly starting to build some stuff.
Now I have two problems here. First the Vertical ScrollBar never shows up. No matter how much stuff I put in the the StackPanel. Is that possibly a problem with the ViewBox scaling things?
Second, when I click into TextBox the game stops responding. I'm not passing anything else but MouseDown and MouseUp to the view yet.
Now I have two problems here. First the Vertical ScrollBar never shows up. No matter how much stuff I put in the the StackPanel. Is that possibly a problem with the ViewBox scaling things?
Second, when I click into TextBox the game stops responding. I'm not passing anything else but MouseDown and MouseUp to the view yet.
Code: Select all
<ViewBox Grid.Row="1" Grid.Column="1">
<TabControl Width="500">
<TabItem Header="World">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Kingdom name:" Margin="0,0,0,5"/>
<TextBox Grid.Column="1" x:Name="KingdomName" Content="Land of lands"/>
<Button Grid.Column="2" x:Name="RandomName" Content="Random" />
</Grid>
<...more options...>
</StackPanel>
</ScrollViewer>
</TabItem>
<...some more tabs...>
</TabControl>
</ViewBox>
Re: Some pre beginning questions
Almost for sure this is happening because you are not restoring the framebuffer after invoking RenderOffscreen. It is also explained in our Integration Guide but I think we should put more emphasis on this so I will find time to review the documentation and sample.Second, when I click into TextBox the game stops responding. I'm not passing anything else but MouseDown and MouseUp to the view yet.
Re: Some pre beginning questions
Yea that's a bit of a strange one. if I callAlmost for sure this is happening because you are not restoring the framebuffer after invoking RenderOffscreen. It is also explained in our Integration Guide but I think we should put more emphasis on this so I will find time to review the documentation and sample.Second, when I click into TextBox the game stops responding. I'm not passing anything else but MouseDown and MouseUp to the view yet.
Code: Select all
glBindFramebuffer(GL_FRAMEBUFFER, 0);
Code: Select all
// Offscreen rendering phase populates textures needed by the on-screen rendering
m_view->GetRenderer()->UpdateRenderTree();
m_view->GetRenderer()->RenderOffscreen();
// If you are going to render here with your own engine you need to restore the GPU state
// because noesis changes it. In this case only framebuffer and viewport need to be restored
//paintContent();
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, this->width(), this->height() );
glClearColor(0.0f, 0.0f, 0.25f, 0.0f);
glClearStencil(0);
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
// Rendering is done in the active framebuffer
m_view->GetRenderer()->Render();
Re: Some pre beginning questions
Are you able to repro this in our example? If not, I recommend using Renderdoc to understand what’s going on.
https://renderdoc.org/
https://renderdoc.org/
Who is online
Users browsing this forum: No registered users and 1 guest