QuickGui && Shoggoth

rewb0rn

28-03-2008 00:37:39

Hey,

I am currently trying to build QuickGui in order to replace RBGui with it. Now I added this line to the library

createManual("RttTex", "Default", TEX_TYPE_2D, 512, 512, 0, PF_R8G8B8, TU_RENDERTARGET)

and it compiles, though I get these warnings (havn't been there with eihort):


1>c:\program files\microsoft visual studio 8\vc\include\xutility(2949) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
1> c:\program files\microsoft visual studio 8\vc\include\xutility(2977) : see reference to function template instantiation 'void std::_Fill<unsigned int*,_Ty>(_FwdIt,_FwdIt,const _Ty &)' being compiled
1> with
1> [
1> _Ty=size_t,
1> _FwdIt=unsigned int *
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\vector(1187) : see reference to function template instantiation 'void std::fill<unsigned int*,_Ty>(_FwdIt,_FwdIt,const _Ty &)' being compiled
1> with
1> [
1> _Ty=size_t,
1> _FwdIt=unsigned int *
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\vector(1117) : while compiling class template member function 'void std::vector<_Ty>::_Insert_n(std::_Vector_iterator<_Ty,_Alloc>,__w64 unsigned int,const _Ty &)'
1> with
1> [
1> _Ty=size_t,
1> _Alloc=std::allocator<unsigned int>
1> ]
1> f:\projekte\softwareentwicklung\zensen\ogresdk\include\ogreribbontrail.h(178) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1> with
1> [
1> _Ty=size_t
1> ]
1>c:\program files\microsoft visual studio 8\vc\include\xutility(2988) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
1> c:\program files\microsoft visual studio 8\vc\include\xutility(3044) : see reference to function template instantiation 'void std::_Fill_n<unsigned int*,_Diff,_Ty>(_OutIt,_Diff,const _Ty &,std::_Range_checked_iterator_tag)' being compiled
1> with
1> [
1> _Diff=__w64 unsigned int,
1> _Ty=size_t,
1> _OutIt=unsigned int *
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\xutility(3524) : see reference to function template instantiation 'void std::_Fill_n<_OutIt,_Diff,_Ty>(_OutIt,_Diff,const _Ty &,std::random_access_iterator_tag,std::_Range_checked_iterator_tag)' being compiled
1> with
1> [
1> _OutIt=unsigned int *,
1> _Diff=__w64 unsigned int,
1> _Ty=size_t
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\memory(416) : see reference to function template instantiation 'void stdext::unchecked_fill_n<_FwdIt,_Diff,_Tval>(_OutIt,_Diff,const _Ty &)' being compiled
1> with
1> [
1> _FwdIt=unsigned int *,
1> _Diff=__w64 unsigned int,
1> _Tval=size_t,
1> _OutIt=unsigned int *,
1> _Ty=size_t
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\memory(916) : see reference to function template instantiation 'void std::_Uninit_fill_n<_FwdIt,_Diff,_Tval,_Alloc>(_FwdIt,_Diff,const _Tval &,_Alloc &,std::_Scalar_ptr_iterator_tag,std::_Range_checked_iterator_tag)' being compiled
1> with
1> [
1> _FwdIt=unsigned int *,
1> _Diff=__w64 unsigned int,
1> _Tval=size_t,
1> _Alloc=std::allocator<unsigned int>
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\vector(1208) : see reference to function template instantiation 'void stdext::unchecked_uninitialized_fill_n<unsigned int*,__w64 unsigned int,_Ty,std::allocator<_Ty>>(_FwdIt,_Diff,const _Tval &,_Alloc &)' being compiled
1> with
1> [
1> _Ty=size_t,
1> _FwdIt=unsigned int *,
1> _Diff=__w64 unsigned int,
1> _Tval=size_t,
1> _Alloc=std::allocator<unsigned int>
1> ]
1> c:\program files\microsoft visual studio 8\vc\include\vector(1207) : while compiling class template member function 'unsigned int *std::vector<_Ty>::_Ufill(unsigned int *,__w64 unsigned int,const _Ty &)'
1> with
1> [
1> _Ty=size_t
1> ]


And a runtime assertion fails in ogresharedprt.h, expression pRep.

The program breaks in xutility.h at the end of this function

void __CLR_OR_THIS_CALL _Adopt(const _Container_base *_Parent)
{ // adopt this iterator by parent
if (_Mycont != _Parent)
{ // change parentage
_Lockit _Lock(_LOCK_DEBUG);
_Orphan_me();
if (_Parent != 0 && _Parent->_Myfirstiter != _IGNORE_MYITERLIST)
{ // switch to new parent
_Mynextiter = _Parent->_Myfirstiter;
((_Container_base *)_Parent)->_Myfirstiter = this;
}
_Mycont = _Parent;
}
}


What do I have to do in order to make QuickGui work with Shoggoth?

kungfoomasta

28-03-2008 06:23:41

I remember another thread about the same issue, I think it will have the answer:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5824

rewb0rn

28-03-2008 12:03:45

Unfortunately not. I read the thread before and did whats described there, but the assertion fails somewhere else I think. Does the SVN version of the gui compile against eihort or shoggoth?

kungfoomasta

28-03-2008 16:49:36

It works with 1.4.7, thats what I'm currently using. It looks like all your warning are not qgui related, ie vector/memory/xutility.

What is the purpose of the _Lockit object, and what does _Orphan_me do? Which line throws the exception?

Also, this is trivial, but is there really a need to make a cast here?

((_Container_base *)_Parent)->_Myfirstiter = this;

What is "this"? What type of object. What is a _Container_base and who is trying to adopt it?

rewb0rn

28-03-2008 17:48:21

The code is from xutility.h, I can't tell you anything about it, but I know the warnings are generated within QuickGUIQuadContainer.cpp. I commented out some lines and the warnings disappeared. I will have a look where the exception is thrown in ogre, til now I only know its after the scene has been loaded and startRendering() has been called.

Btw, I forgot to mention: The warnings appear when compiling the library, the assertion fails when running the demo.

kungfoomasta

28-03-2008 18:50:37

I'm assuming from the silence in the thread I linked to, that some people have gotten quickgui working with Shoggoth.

In any case, I'm working on a new render system that follows RBGUI style rendering (texture cache), and QuickGUIQuadContainer.cpp will be removed when its finished.

rewb0rn

29-03-2008 20:16:06

K, since I have other things to do I'm just gonna wait this one out ;)
Thx for your time.

akem321

31-03-2008 02:38:13

Hi,

I' m using QuickGUI with Shoggoth, cvs(few weeks max...), no pblm.
maybe the demo itself is broken, not sure, but the lib works fine.

Chaster

01-04-2008 06:11:38

I'm also using QuickGUI with Shoggoth (CVS from a week or two ago) without problems (other than the inability to hide scrollbars - but that's probably a universal problem with all version of Ogre)...

Chaster

rewb0rn

01-04-2008 11:04:09

Actually I tried the version that was said to be stable in the wiki, maybe I should try the svn version.

rewb0rn

04-04-2008 15:32:18

Yup, works fine with SVN version :)
One strange bug though, I get this view every time I hover over a textbox:



Seems like there is a special mouse pointer for text boxes but instead of that one it displays the whole quickgui texture.

kungfoomasta

04-04-2008 18:15:37

You need to rebuild your skinset and its texture. Delete qgui.skinset and SkinSet.qgui.png and re-run the app.