Editbox control skipping some input characters at low FPS
Moderators: CEGUI MVP, CEGUI Team
Editbox control skipping some input characters at low FPS
When my application is running in Debug mode I am seeing about 15-20 fps frame rate. Typing into a CEGUI::Editbox control often skips some characters here and there. It also happens at higher frame rates, but the problem is much worse at lower frame rates.
I've pursued this with OIS but that doesn't seem to be the issue.
If I create a text input control using a different GUI system (Navi Library), I get no skipped characters, even at low frame rates such as 15 fps.
Has anyone else seen the Editbox control skip input characters like this? Is there anything I can do to eliminate the problem, or troubleshoot it further?
Thanks in advance.
I've pursued this with OIS but that doesn't seem to be the issue.
If I create a text input control using a different GUI system (Navi Library), I get no skipped characters, even at low frame rates such as 15 fps.
Has anyone else seen the Editbox control skip input characters like this? Is there anything I can do to eliminate the problem, or troubleshoot it further?
Thanks in advance.
Arcanoria - a SMORPG project - http://www.arcanoria.com
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I am not aware of any issues that would cause such behaviour. It definitely does sound like it is the injection that is getting missed as opposed to CEGUI discarding the input afterwards.
I will try to investigate, though am not certain as to how to recreate the required conditions. I am assuming this is on Windows? I do have a laptop that is not particularly powerful, though is running linux - which I think may affect the results of any tests I do.
I'll report back once I have done some testing (which will not be today, since today is CE's birthday ). In the mean time, if you get any other pertinent information, please add it to aid in testing.
And if anyone else can do any testing, that would be good too.
CE.
I am not aware of any issues that would cause such behaviour. It definitely does sound like it is the injection that is getting missed as opposed to CEGUI discarding the input afterwards.
I will try to investigate, though am not certain as to how to recreate the required conditions. I am assuming this is on Windows? I do have a laptop that is not particularly powerful, though is running linux - which I think may affect the results of any tests I do.
I'll report back once I have done some testing (which will not be today, since today is CE's birthday ). In the mean time, if you get any other pertinent information, please add it to aid in testing.
And if anyone else can do any testing, that would be good too.
CE.
Happy Birthday CE!
I'm on Windows XP Media Center Edition 2005, using stock CEGUI 0.5.0b. I have a pretty powerful PC system with dual core cpu and 2.5gb RAM, and a Radeon X1950 Pro video card.
I'm attempting to do some code profiling with AMD CodeAnalyst. I will post some sort of results ASAP.
Here are some possibly relevant code snippets. First, the places that keystrokes are being injected into CEGUI:
Next, part of my GUI layout file that creates the window which I'm typing into, which is "ChatInput":
Finally, I want to mention that each frame I'm doing the following:
Thanks for any insights! I will be looking hard at this as well and report back if/when I find anything interesting.
I'm on Windows XP Media Center Edition 2005, using stock CEGUI 0.5.0b. I have a pretty powerful PC system with dual core cpu and 2.5gb RAM, and a Radeon X1950 Pro video card.
I'm attempting to do some code profiling with AMD CodeAnalyst. I will post some sort of results ASAP.
Here are some possibly relevant code snippets. First, the places that keystrokes are being injected into CEGUI:
Code: Select all
bool ArcInputMgr::keyPressed(const OIS::KeyEvent& e)
{
//mReporter->Report("keyPressed [" + Ogre::StringConverter::toString(e.key) + "] " + (char)e.text, REPORT_INFO);
static CEGUI::System* guiSystem = CEGUI::System::getSingletonPtr();
if (e.key == OIS::KC_LSHIFT ||
e.key == OIS::KC_RSHIFT ||
e.key == OIS::KC_LCONTROL ||
e.key == OIS::KC_RCONTROL ||
e.key == OIS::KC_LMENU ||
e.key == OIS::KC_RMENU)
return false;
bool bCtrl = mKeyboard->isModifierDown(OIS::Keyboard::Ctrl);
bool bShift = mKeyboard->isModifierDown(OIS::Keyboard::Shift);
bool bAlt = mKeyboard->isModifierDown(OIS::Keyboard::Alt);
if (e.key == OIS::KC_ESCAPE)
{
mReporter->Report("Escape Pressed. Exiting.", REPORT_EXIT);
return true;
}
if (guiSystem->injectChar(e.text))
{
//mReporter->Report("keyPressed() injectChar", REPORT_INFO);
return true;
}
if (guiSystem->injectKeyDown(e.key))
{
//mReporter->Report("keyPressed() injectKeyDown", REPORT_INFO);
return true;
}
if (!bShift && !bCtrl && !bAlt && mInputMapN[e.key])
{
mInputMapN[e.key]("keyPressed");
return true;
}
if (bShift && !bCtrl && !bAlt && mInputMapS[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Shift);
mInputMapS[e.key]("keyPressed");
return true;
}
if (!bShift && bCtrl && !bAlt && mInputMapC[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Ctrl);
mInputMapC[e.key]("keyPressed");
return true;
}
if (bShift && bCtrl && !bAlt && mInputMapSC[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Shift | OIS::Keyboard::Ctrl);
mInputMapSC[e.key]("keyPressed");
return true;
}
if (!bShift && !bCtrl && bAlt && mInputMapA[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Alt);
mInputMapA[e.key]("keyPressed");
return true;
}
if (bShift && !bCtrl && bAlt && mInputMapSA[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Shift | OIS::Keyboard::Alt);
mInputMapSA[e.key]("keyPressed");
return true;
}
if (!bShift && bCtrl && bAlt && mInputMapCA[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Ctrl | OIS::Keyboard::Alt);
mInputMapCA[e.key]("keyPressed");
return true;
}
if (bShift && bCtrl && bAlt && mInputMapSCA[e.key])
{
SetModifiedInput(e.key, OIS::Keyboard::Shift | OIS::Keyboard::Ctrl | OIS::Keyboard::Alt);
mInputMapSCA[e.key]("keyPressed");
return true;
}
//mInputMapN[OIS::KC_UNASSIGNED](Ogre::StringConverter().toString(e.key));
return false;
}
bool ArcInputMgr::keyReleased(const OIS::KeyEvent& e)
{
static CEGUI::System* guiSystem = CEGUI::System::getSingletonPtr();
if (e.key == OIS::KC_LSHIFT ||
e.key == OIS::KC_RSHIFT ||
e.key == OIS::KC_LCONTROL ||
e.key == OIS::KC_RCONTROL ||
e.key == OIS::KC_LMENU ||
e.key == OIS::KC_RMENU)
return false;
bool bShift = mKeyboard->isModifierDown(OIS::Keyboard::Shift);
bool bCtrl = mKeyboard->isModifierDown(OIS::Keyboard::Ctrl);
bool bAlt = mKeyboard->isModifierDown(OIS::Keyboard::Alt);
if (guiSystem->injectKeyUp(e.key))
{
mReporter->Report("keyReleased() injectKeyUp", REPORT_INFO);
return true;
}
size_t oldmod = ReleaseModifiedInput(e.key);
if (oldmod)
{
// when this key was pressed, it had a modifier, so restore it here:
bShift = (oldmod & OIS::Keyboard::Shift) == OIS::Keyboard::Shift;
bCtrl = (oldmod & OIS::Keyboard::Ctrl) == OIS::Keyboard::Ctrl;
bAlt = (oldmod & OIS::Keyboard::Alt) == OIS::Keyboard::Alt;
}
if (!bShift && !bCtrl && !bAlt && mInputMapN[e.key])
{
mInputMapN[e.key]("keyReleased");
return true;
}
if (bShift && !bCtrl && !bAlt && mInputMapS[e.key])
{
mInputMapS[e.key]("keyReleased");
return true;
}
if (!bShift && bCtrl && !bAlt && mInputMapC[e.key])
{
mInputMapC[e.key]("keyReleased");
return true;
}
if (bShift && bCtrl && !bAlt && mInputMapSC[e.key])
{
mInputMapSC[e.key]("keyReleased");
return true;
}
if (!bShift && !bCtrl && bAlt && mInputMapA[e.key])
{
mInputMapA[e.key]("keyReleased");
return true;
}
if (bShift && !bCtrl && bAlt && mInputMapSA[e.key])
{
mInputMapSA[e.key]("keyReleased");
return true;
}
if (!bShift && bCtrl && bAlt && mInputMapCA[e.key])
{
mInputMapCA[e.key]("keyReleased");
return true;
}
if (bShift && bCtrl && bAlt && mInputMapSCA[e.key])
{
mInputMapSCA[e.key]("keyReleased");
return true;
}
return false;
}
Next, part of my GUI layout file that creates the window which I'm typing into, which is "ChatInput":
Code: Select all
<Window Type = "ArcanoriaLook/FrameWindow" Name="ChatFrame">
<Property Name="UnifiedPosition" Value="{{0.0,0},{0,0}}" />
<Property Name="UnifiedSize" Value="{{0.3,0},{0.2,0}}" />
<Property Name="CloseButtonEnabled" Value="False" />
<Property Name="Text" Value="Chat Window" />
<Window Type = "ArcanoriaLook/StaticImage" Name="ChatPane">
<Property Name="UnifiedPosition" Value="{{0.0,0},{0,13}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{1.0,-13}}" />
<Property Name="VertFormatting" Value="Stretched" />
<Property Name="HorzFormatting" Value="Stretched" />
<Property Name="FrameEnabled" Value="False" />
<Window Type="ArcanoriaLook/StaticImage" Name="ChatPaneBGImage">
<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
<Property Name="UnifiedSize" Value="{{1,0},{1,-25}}" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="VertFormatting" Value="Stretched" />
<Property Name="HorzFormatting" Value="Stretched" />
<Property Name="Disabled" Value="False" />
<Property Name="Image" Value="set:ArcanoriaLook image:GreenSwatch" />
<Property Name="Alpha" Value="0.2" />
<Property Name="FrameEnabled" Value="false" />
</Window>
<Window Type = "ArcanoriaLook/Listbox" Name="ChatOutput">
<Property Name="UnifiedPosition" Value="{{0,3},{0,3}}" />
<Property Name="UnifiedSize" Value="{{1.0,-6},{1.0,-25}}" />
<Property Name="Alpha" Value="1" />
<Property Name="ReadOnly" Value="True" />
<!--
<Property Name="Text" Value="Enter your chat text into the box below..." />
-->
</Window>
<Window Type="ArcanoriaLook/StaticImage" Name="ChatInputBGImage">
<Property Name="UnifiedPosition" Value="{{0,0},{1,-25}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.0,25}}" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="VertFormatting" Value="Stretched" />
<Property Name="HorzFormatting" Value="Stretched" />
<Property Name="Disabled" Value="False" />
<Property Name="Image" Value="set:ArcanoriaLook image:WhiteSwatch" />
<Property Name="Alpha" Value="0.6" />
<Property Name="FrameEnabled" Value="false" />
<Window Type = "ArcanoriaLook/Editbox" Name="ChatInput">
<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
<Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
<Property Name="MaxTextLength" Value="160" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="Alpha" Value="1" />
<Property Name="Text" Value="Click here to enter chat text." />
<Property Name="NormalTextColour" Value="ff000000" />
<Property Name="SelectedTextColour" Value="ffff0000" />
</Window>
</Window>
</Window>
</Window>
Finally, I want to mention that each frame I'm doing the following:
Code: Select all
mGUISystem->injectTimePulse(MicroSecElapsed * 0.000001f);
Thanks for any insights! I will be looking hard at this as well and report back if/when I find anything interesting.
Arcanoria - a SMORPG project - http://www.arcanoria.com
Here is some potentially interesting profiling information from CodeAnalyst, although I'm still trying to figure out how to interpret it. I did a "Time-base profile" while running my application and typing lots of characters very quickly into the CEGUI::Editbox for 30 seconds. Incidentally, I noticed that several characters were being skipped as I was typing, but that was expected of course.
First, a list of the number of time slices used by the various modules loaded on the system. Here is the first several:
Here's what OgreMain_d.dll shows:
Here's OgreGUIRenderer_d.dll:
And here's CEGUIBase_d.dll:
I'm not sure how to tell if something is wrong with these results. I'll be thinking about that...
First, a list of the number of time slices used by the various modules loaded on the system. Here is the first several:
Code: Select all
Module Name 64-bit Timer samples
processr.sys - PID 0 22301
OgreMain_d.dll - PID 4720 6855
OgreGUIRenderer_d.dll - PID 4720 5996
CEGUIBase_d.dll - PID 4720 5333
ntdll.dll - PID 4720 1442
RenderSystem_Direct3D9_d.dll - PID 4720 956
hal.dll - PID 4720 889
msvcp80d.dll - PID 4720 836
ALCXWDM.SYS - PID 4720 745
ArcClient_Debug.exe - PID 4720 704
ntkrnlpa.exe - PID 4720 651
msvcr80d.dll - PID 4720 506
ati3duag.dll - PID 4 385
Plugin_OctreeSceneManager_d.dll - PID 4720 337
d3d9.dll - PID 4720 250
win32k.sys - PID 724 168
hal.dll - PID 984 152
PhysXCore.dll - PID 4720 146
NxOgre_d.dll - PID 4720 123
hal.dll - PID 0 115
Acrobat.dll - PID 2924 112
msenv.dll - PID 596 106
ntkrnlpa.exe - PID 984 101
mscorwks.dll - PID 596 83
ntkrnlpa.exe - PID 4 78
win32k.sys - PID 1892 76
hal.dll - PID 4 75
ntkrnlpa.exe - PID 4444 68
MFC80U.DLL - PID 1892 67
ntkrnlpa.exe - PID 724 66
ntkrnlpa.exe - PID 2924 66
hal.dll - PID 1892 66
fmodex.dll - PID 4720 65
ati3duag.dll - PID 4720 63
34 modules, Total: 49982 samples, 94.17% of total session samples
Here's what OgreMain_d.dll shows:
Code: Select all
CS:EIP Symbol + Offset 64-bit Timer samples
0xb71c20 std::_Iterator_base::_Orphan_me 496
0x168a250 _RTC_CheckStackVars 328
0xb723b0 std::_Iterator_base::_Adopt 277
0xdd7f60 Ogre::ColourValue::getAsARGB 205
0xb71b20 std::_Iterator_base::~_Iterator_base 183
0x168a220 _RTC_CheckEsp 150
0xee13d0 Ogre::Matrix4::operator[] 122
0x10b4d10 Ogre::SoftwareVertexSkinning_SSE_PosNorm_Shared_Packed<1,1>::apply 110
0xb72280 std::_Iterator_base::operator= 101
0xb72950 std::_Iterator_base::_Iterator_base 92
0xb6e420 Ogre::ColourValue::ColourValue 71
0xc926a0 Ogre::SharedPtr<Ogre::Texture>::get 67
0xb72200 std::_Iterator_base::_Iterator_base 64
0xb4b85c ILT+145495(__RTC_CheckEsp) 64
0xc92a60 Ogre::SharedPtr<Ogre::Texture>::release 63
0x11f10c0 Ogre::RenderSystem::convertColourValue 63
0xc92540 Ogre::SharedPtr<Ogre::Texture>::~SharedPtr<Ogre::Texture> 56
0xc75d60 Ogre::TexturePtr::~TexturePtr 56
0xf63210 Ogre::VertexElement::convertColourValue 51
0xc92360 Ogre::SharedPtr<Ogre::Texture>::SharedPtr<Ogre::Texture> 45
0xe8c290 fabs 41
0xc3fb40 Ogre::Vector3::Vector3 41
0x10b9540 Ogre::SSEMemoryAccessor<1>::store 39
0xe8c2f0 fabsf 34
0xb8a810 Ogre::Vector3::operator= 34
0xc75ad0 Ogre::TexturePtr::TexturePtr 33
0xe8c230 Ogre::Math::Abs 32
0xc92410 Ogre::SharedPtr<Ogre::Texture>::operator= 31
0xbf1f50 std::_Vector_const_iterator<Ogre::KeyFrame *,std::allocator<Ogre::KeyFrame *> >::_Vector_const_iterator<Ogre::KeyFrame *,std::allocator<Ogre::KeyFrame *> > 30
0xb90910 std::_Vector_const_iterator<Ogre::KeyFrame *,std::allocator<Ogre::KeyFrame *> >::~_Vector_const_iterator<Ogre::KeyFrame *,std::allocator<Ogre::KeyFrame *> > 29
0x10b9500 Ogre::SSEMemoryAccessor<1>::load 25
0xb92370 std::_Ranit<Ogre::KeyFrame *,int,Ogre::KeyFrame * const *,Ogre::KeyFrame * const &>::~_Ranit<Ogre::KeyFrame *,int,Ogre::KeyFrame * const *,Ogre::KeyFrame * const &> 23
0x1172400 Ogre::Plane::getSide 23
0xd14fd0 std::_Bidit<std::pair<Ogre::Pass * const,std::vector<Ogre::Renderable *,std::allocator<Ogre::Renderable *> > *>,int,std::pair<Ogre::Pass * const,std::vector<Ogre::Renderable *,std::allocator<Ogre::Renderable *> > *> const *,std::pair<Ogre::Pass * const,std::v 22
34 functions, 586 instructions, Total: 3101 samples, 45.24% of samples in the module, 5.84% of total session samples
Here's OgreGUIRenderer_d.dll:
Code: Select all
CS:EIP Symbol + Offset 64-bit Timer samples
0x26aa830 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Parent 378
0x26ac3f0 std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1>::_Kfn 346
0x26aa750 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Isnil 317
0x26aa870 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Right 298
0x26af370 CEGUI::OgreCEGUIRenderer::QuadInfo::operator< 247
0x26a40f0 std::_Iterator_base::_Orphan_me 246
0x26b35e0 _RTC_CheckStackVars 222
0x26acfe0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::const_iterator::_Inc 206
0x26aa8b0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Myval 183
0x26aa7f0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Left 181
0x26af310 std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>::operator() 180
0x26a89f0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::insert 178
0x26aa790 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Key 176
0x26aea60 std::_Debug_lt_pred<std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,CEGUI::OgreCEGUIRenderer::QuadInfo,CEGUI::OgreCEGUIRenderer::QuadInfo> 152
0x26a8580 std::_Iterator_base::_Adopt 136
0x26ad720 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Color 132
0x26ac0a0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Min 128
0x26ab550 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Insert 116
0x26a3ff0 std::_Iterator_base::~_Iterator_base 110
0x26a3f00 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::iterator::~iterator 89
0x26acf20 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::const_iterator::const_iterator 87
0x26a61e0 CEGUI::OgreCEGUIRenderer::colourToOgre 85
0x26a3f50 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::const_iterator::~const_iterator 84
0x26a3fa0 std::_Bidit<CEGUI::OgreCEGUIRenderer::QuadInfo,int,CEGUI::OgreCEGUIRenderer::QuadInfo const *,CEGUI::OgreCEGUIRenderer::QuadInfo const &>::~_Bidit<CEGUI::OgreCEGUIRenderer::QuadInfo,int,CEGUI::OgreCEGUIRenderer::QuadInfo const *,CEGUI::OgreCEGUIRenderer::Quad 75
0x26b35b0 _RTC_CheckEsp 74
0x26a1767 ILT+1890(__RTC_CheckEsp) 72
0x26a7460 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::end 70
0x26a41d0 CEGUI::OgreCEGUIRenderer::doRender 70
0x26ad610 std::_Bidit<CEGUI::OgreCEGUIRenderer::QuadInfo,int,CEGUI::OgreCEGUIRenderer::QuadInfo const *,CEGUI::OgreCEGUIRenderer::QuadInfo const &>::_Bidit<CEGUI::OgreCEGUIRenderer::QuadInfo,int,CEGUI::OgreCEGUIRenderer::QuadInfo const *,CEGUI::OgreCEGUIRenderer::QuadI 68
0x26a3960 CEGUI::OgreCEGUIRenderer::addQuad 67
0x26aa3f0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::const_iterator::operator== 63
0x26aa220 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::iterator::iterator 63
0x26ad670 std::_Iterator_base::_Iterator_base 52
0x26a92f0 std::_Tree<std::_Tset_traits<CEGUI::OgreCEGUIRenderer::QuadInfo,std::less<CEGUI::OgreCEGUIRenderer::QuadInfo>,std::allocator<CEGUI::OgreCEGUIRenderer::QuadInfo>,1> >::_Erase 51
34 functions, 656 instructions, Total: 5002 samples, 83.42% of samples in the module, 9.42% of total session samples
And here's CEGUIBase_d.dll:
Code: Select all
CS:EIP Symbol + Offset Thread ID 64-bit Timer samples
0x225c120 std::_Iterator_base::_Orphan_me 337
0x229e670 std::less<unsigned int>::operator() 232
0x2508cc0 _RTC_CheckStackVars 230
0x2280250 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::_Key 197
0x229a6a0 std::_Debug_lt_pred<std::less<unsigned int>,unsigned int,unsigned int> 184
0x2287c80 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::_Myval 181
0x225c640 std::_Iterator_base::_Adopt 165
0x2287b80 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::_Isnil 150
0x2289010 std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0>::_Kfn 149
0x225c020 std::_Iterator_base::~_Iterator_base 113
0x225d230 CEGUI::Rect::getHeight 109
0x2288a20 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::_Lbound 107
0x2287bc0 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::_Left 90
0x22653f0 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::const_iterator::~const_iterator 84
0x225d1d0 CEGUI::Rect::getWidth 80
0x2265550 std::_Bidit<std::pair<unsigned int const ,CEGUI::FontGlyph>,int,std::pair<unsigned int const ,CEGUI::FontGlyph> const *,std::pair<unsigned int const ,CEGUI::FontGlyph> const &>::~_Bidit<std::pair<unsigned int const ,CEGUI::FontGlyph>,int,std::pair<unsigned in 77
0x225e8d0 CEGUI::colour::getAlpha 77
0x227dea0 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::iterator::~iterator 76
0x23f7b20 CEGUI::Rect::offset 73
0x23e4b40 CEGUI::Imageset::draw 73
0x225bec0 std::_Iterator_base::_Iterator_base 73
0x2280c20 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::const_iterator::const_iterator 70
0x225e950 CEGUI::colour::getGreen 62
0x225e910 CEGUI::colour::getRed 61
0x225c510 std::_Iterator_base::operator= 57
0x2508c90 _RTC_CheckEsp 55
0x228e0a0 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::iterator::iterator 55
0x225e990 CEGUI::colour::getBlue 52
0x23c9b20 CEGUI::Font::getGlyphData 49
0x23f78b0 CEGUI::Rect::getIntersection 48
0x224267b ILT+46710(__RTC_CheckEsp) 48
0x23f8250 CEGUI::RenderCache::render 45
0x2280ce0 std::_Tree<std::_Tmap_traits<unsigned int,CEGUI::FontGlyph,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,CEGUI::FontGlyph> >,0> >::const_iterator::operator== 45
0x23f77d0 CEGUI::Rect::Rect 44
34 functions, 576 instructions, Total: 3548 samples, 66.53% of samples in the module, 6.68% of total session samples
I'm not sure how to tell if something is wrong with these results. I'll be thinking about that...
Arcanoria - a SMORPG project - http://www.arcanoria.com
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Arcanor wrote:Happy Birthday CE!
Thanks!
Thanks also for posting the extra information. I do not immediately know what to make of the profile data - except perhaps that we spend a lot of time iterating over collections, although there's no surprise there!
I shall get a debug build running on Windows later and see if I can reproduce anything similar to the issue you're having - until I can do that suggesting a possible cause is kind of like just grabbing at straws and guessing, which is not the best way to proceed.
Watch this space, as they say...
CE.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
I've done some testing with the Gui demo in the Ogre SDK on Windows - this was the only way I could think of testing this without having to make a real app of some kind.
I struggled terribly, but eventually managed to get it running slowly, at about 18 FPS - but was not able to reproduce the issue at all
If you have any concrete steps or minimal example that could be used to reproduce the issue reliably that would be great!
CE.
I struggled terribly, but eventually managed to get it running slowly, at about 18 FPS - but was not able to reproduce the issue at all
If you have any concrete steps or minimal example that could be used to reproduce the issue reliably that would be great!
CE.
Thanks CE, I'm going to be out most of the day today but I will work on it tonight.
I've been thinking about this problem and I'm now concerned that my initial comparison with the Navi GUI library is not a valid comparison since Navi doesn't require me to inject keystrokes each frame into that GUI. I guess Navi must be creating another thread and doing the keyboard input processing separately from my program's main loop. So it's not surprising that Navi was able to process the keystrokes smoothly even when the application was at low frame rate.
So for now I am going to focus on trying to see if this is really a CEGUI issue at all. My plan is to implement a different GUI system (possibly betagui, for simplicity) that requires keyboard injections, making those inputs synchronous with my main program. Then I'll be able to see if the problem is related to CEGUI or my application's code.
I'll check back in here after I determine if the problem happens under betagui as well.
I've been thinking about this problem and I'm now concerned that my initial comparison with the Navi GUI library is not a valid comparison since Navi doesn't require me to inject keystrokes each frame into that GUI. I guess Navi must be creating another thread and doing the keyboard input processing separately from my program's main loop. So it's not surprising that Navi was able to process the keystrokes smoothly even when the application was at low frame rate.
So for now I am going to focus on trying to see if this is really a CEGUI issue at all. My plan is to implement a different GUI system (possibly betagui, for simplicity) that requires keyboard injections, making those inputs synchronous with my main program. Then I'll be able to see if the problem is related to CEGUI or my application's code.
I'll check back in here after I determine if the problem happens under betagui as well.
Arcanoria - a SMORPG project - http://www.arcanoria.com
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
I looked through some code relating to the input injection, and can not see any way the issue is within CEGUI. Providing the injection call is made, the code to add the character to the editbox is eventually executed- and directly executed from the injection call; for inputs nothing is queued for later, all events are fully processed there and then.
I am of course very eager to discover where this issue originates, as it's bound to come up again at some point
CE.
I am of course very eager to discover where this issue originates, as it's bound to come up again at some point
CE.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Where does your 'bool ArcInputMgr::keyPressed(const OIS::KeyEvent& e)' get triggered? Is it called by an Ogre Framelistener? You are probably using unbuffered input, which might indeed cause input to get lost when typing quickly on lower framerates. Is there a way that you can try buffered input? That's why i ask where your events are being triggered.
Btw i think (haven't checked though) that Navi used buffered input too, cause that's more practical when it comes to GUIs i guess.
Btw i think (haven't checked though) that Navi used buffered input too, cause that's more practical when it comes to GUIs i guess.
Check out my released snake game using Cegui!
My current status is that I'm still working on implementing BetaGUI. It's not as simple as it seems to implement into a working application that doesn't resemble the Ogre demo apps as the "documentation" (in the form of anecdotes here and there) covers many different versions of BetaGUI and most of it is out of date. It's also made more difficult by the fact that the code is purposely obscured and cryptical. Betajaen has a cruel sense of humor. Almost there though... I'll report back soon.
@Scriptkid:
Thanks for your followup, but I'm already using buffered keyboard inputs. I create my OIS::Keyboard from inside the ArcInputMgr::init() function as follows:
The ArcInputMgr class inherits the following base classes:
I don't actually use the Ogre frame listener method because I have my own main program loop, which updates each of my manager classes (including ArcInputMgr) manually each frame.
@Scriptkid:
Thanks for your followup, but I'm already using buffered keyboard inputs. I create my OIS::Keyboard from inside the ArcInputMgr::init() function as follows:
Code: Select all
mKeyboard = static_cast<Keyboard*>(mOISInputManager->createInputObject(OISKeyboard, true));
mKeyboard->setEventCallback(this);
The ArcInputMgr class inherits the following base classes:
Code: Select all
class ArcInputMgr :
public Ogre::Singleton<ArcInputMgr>,
public Ogre::WindowEventListener,
public OIS::KeyListener,
public OIS::MouseListener,
public BetaGUI::BetaGUIListener,
ArcActionMap
I don't actually use the Ogre frame listener method because I have my own main program loop, which updates each of my manager classes (including ArcInputMgr) manually each frame.
Arcanoria - a SMORPG project - http://www.arcanoria.com
After a very frustrating time of integrating betagui into my application I've finally got a basic text input window working.
Unfortunately (for me), I've determined that the problem is probably not with CEGUI. I still don't know what the real problem is, but it must be within my application code, since I'm also dropping characters when doing text input into a betagui window.
Sorry to trouble you folks, and thanks for your prompt responses! Great to see you back in action CE.
Unfortunately (for me), I've determined that the problem is probably not with CEGUI. I still don't know what the real problem is, but it must be within my application code, since I'm also dropping characters when doing text input into a betagui window.
Sorry to trouble you folks, and thanks for your prompt responses! Great to see you back in action CE.
Arcanoria - a SMORPG project - http://www.arcanoria.com
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
If anyone's interested, I've fixed the problem. The culprit was my input handler functions returning false sometimes instead of always true, which is apparently what OIS requires, otherwise OIS throws out the remaining contents of the input buffer.
Here's a link to the relevant thread over at the OIS support forums, in case anyone's interested: http://www.wreckedgames.com/forum/index.php/topic,988.0.html
Here's a link to the relevant thread over at the OIS support forums, in case anyone's interested: http://www.wreckedgames.com/forum/index.php/topic,988.0.html
Arcanoria - a SMORPG project - http://www.arcanoria.com
Who is online
Users browsing this forum: No registered users and 24 guests