Re: [osg-users] CEGUI

2007-07-05 Thread BOURDIN Pierre

Le mardi 03 juillet 2007 à 10:14 +0200, [EMAIL PROTECTED] a écrit :
 Hi,
  I tried to run the osgcegui example, and no GUI was rendered.
  
 All the GUI creation code was taken from CEGUI example (which works).
 I didn't get any errors from CEGUI or OSG.
  
 I also tried to set the renderGUI function as post callback of the
 camera with no better results.
  
 any ideas?
  
 is it something with the Zbuffer? or Z position of the GUI?
  
 thanks,
  Guy.
 
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


Hi,
if you want to see an example of CEGUI integration on top of OSG, you
can probably have look in delta3d, at least in the dtGUI component:
http://www.delta3d.org/api/namespacedt_g_u_i.html

Pierre.


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90449
66004 PERPIGNAN
tél: 04 68 56 80 18
fax: 04 68 55 03 86
email: [EMAIL PROTECTED]

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] CEGUI

2007-07-03 Thread [EMAIL PROTECTED]
Hi,
 I tried to run the osgcegui example, and no GUI was rendered.

All the GUI creation code was taken from CEGUI example (which works).
I didn't get any errors from CEGUI or OSG.

I also tried to set the renderGUI function as post callback of the camera with 
no better results.

any ideas?

is it something with the Zbuffer? or Z position of the GUI?

thanks,
 Guy.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] CEGUI

2007-07-03 Thread Robert Osfield

Hi Guy,

The osgcegui example was my abortive attempt at getting CEGUI to work
in a well that integrates well with the OSG.  I say abortive because
CEGUI really is a bit brain dead when it comes to managing multiple
graphics contexts and multi-threading, its can't do it at all and
doesn't look like it'll ever do it without a major rewrite.

Some OSG users have got CEGUI to work with the OSG, and there are some
suggestions in the osg-users archives about this.

Personally I was unimpressed with CEGUI, its just not well designed or
implemented library, its makes too many assumptions and restrictions
on its usage to make it particularly useful beyond single window,
single threaded games.  I certainly wouldn't recommend it.

Robert.

On 7/3/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



Hi,
 I tried to run the osgcegui example, and no GUI was rendered.

All the GUI creation code was taken from CEGUI example (which works).
I didn't get any errors from CEGUI or OSG.

I also tried to set the renderGUI function as post callback of the camera
with no better results.

any ideas?

is it something with the Zbuffer? or Z position of the GUI?

thanks,
 Guy.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CEGUI

2007-07-03 Thread Emmanuel Roche

By the way, sure CEGUI is not recommendable but is there another good
possibility you would recommend to build GUIs in OSG ?

Manu.


2007/7/3, Robert Osfield [EMAIL PROTECTED]:


Hi Guy,

The osgcegui example was my abortive attempt at getting CEGUI to work
in a well that integrates well with the OSG.  I say abortive because
CEGUI really is a bit brain dead when it comes to managing multiple
graphics contexts and multi-threading, its can't do it at all and
doesn't look like it'll ever do it without a major rewrite.

Some OSG users have got CEGUI to work with the OSG, and there are some
suggestions in the osg-users archives about this.

Personally I was unimpressed with CEGUI, its just not well designed or
implemented library, its makes too many assumptions and restrictions
on its usage to make it particularly useful beyond single window,
single threaded games.  I certainly wouldn't recommend it.

Robert.

On 7/3/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Hi,
  I tried to run the osgcegui example, and no GUI was rendered.

 All the GUI creation code was taken from CEGUI example (which works).
 I didn't get any errors from CEGUI or OSG.

 I also tried to set the renderGUI function as post callback of the
camera
 with no better results.

 any ideas?

 is it something with the Zbuffer? or Z position of the GUI?

 thanks,
  Guy.
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] CEGUI

2007-07-03 Thread Jeremy L. Moles
On Tue, 2007-07-03 at 12:43 +0200, Emmanuel Roche wrote:
 By the way, sure CEGUI is not recommendable but is there another good
 possibility you would recommend to build GUIs in OSG ?

I'm working on one myself. :) Just need time... time... who ever has
enough? At any rate, if you don't use CEGUI there really isn't much
else. Hopefully I can have the osgHUD NodeKit working in the coming
months.

 Manu.
 
 
 2007/7/3, Robert Osfield [EMAIL PROTECTED]:
 Hi Guy,
 
 The osgcegui example was my abortive attempt at getting CEGUI
 to work 
 in a well that integrates well with the OSG.  I say abortive
 because
 CEGUI really is a bit brain dead when it comes to managing
 multiple
 graphics contexts and multi-threading, its can't do it at all
 and
 doesn't look like it'll ever do it without a major rewrite. 
 
 Some OSG users have got CEGUI to work with the OSG, and there
 are some
 suggestions in the osg-users archives about this.
 
 Personally I was unimpressed with CEGUI, its just not well
 designed or
 implemented library, its makes too many assumptions and
 restrictions 
 on its usage to make it particularly useful beyond single
 window,
 single threaded games.  I certainly wouldn't recommend it.
 
 Robert.
 
 On 7/3/07, [EMAIL PROTECTED]  [EMAIL PROTECTED] wrote:
 
 
  Hi,
   I tried to run the osgcegui example, and no GUI was
 rendered.
 
  All the GUI creation code was taken from CEGUI example
 (which works). 
  I didn't get any errors from CEGUI or OSG.
 
  I also tried to set the renderGUI function as post callback
 of the camera
  with no better results.
 
  any ideas?
 
  is it something with the Zbuffer? or Z position of the GUI? 
 
  thanks,
   Guy.
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/
 
 ___ 
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/
 
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CEGUI

2007-07-03 Thread Himar Carmona

 Hi,  Jeremy:

 i don't know if this can be of interest to you, but if it can help you...

 The book DirectX 9 User Interfaces: Design and Implementation is the only
reference i have found that explain how to do a GUI with DirectX from ground
up. You can avoid the directX things, the book has some (short) comments
about the pitfalls to avoid when designing a GUI. The GUI developed in the
book seems quite similar than the one that ships with DirectX
(coincidence?), but there will not be many issues doing that with OSG.

Of course, i have nothing to do with the author or the publisher. This is
not 'propaganda', just knowledge interchange. :)

 I haven't found any other reference about the topic of designing GUIs.
Have you?

Cheers.

2007/7/3, Jeremy L. Moles [EMAIL PROTECTED]:


On Tue, 2007-07-03 at 12:43 +0200, Emmanuel Roche wrote:
 By the way, sure CEGUI is not recommendable but is there another good
 possibility you would recommend to build GUIs in OSG ?

I'm working on one myself. :) Just need time... time... who ever has
enough? At any rate, if you don't use CEGUI there really isn't much
else. Hopefully I can have the osgHUD NodeKit working in the coming
months.

 Manu.


 2007/7/3, Robert Osfield [EMAIL PROTECTED]:
 Hi Guy,

 The osgcegui example was my abortive attempt at getting CEGUI
 to work
 in a well that integrates well with the OSG.  I say abortive
 because
 CEGUI really is a bit brain dead when it comes to managing
 multiple
 graphics contexts and multi-threading, its can't do it at all
 and
 doesn't look like it'll ever do it without a major rewrite.

 Some OSG users have got CEGUI to work with the OSG, and there
 are some
 suggestions in the osg-users archives about this.

 Personally I was unimpressed with CEGUI, its just not well
 designed or
 implemented library, its makes too many assumptions and
 restrictions
 on its usage to make it particularly useful beyond single
 window,
 single threaded games.  I certainly wouldn't recommend it.

 Robert.

 On 7/3/07, [EMAIL PROTECTED]  [EMAIL PROTECTED] wrote:
 
 
  Hi,
   I tried to run the osgcegui example, and no GUI was
 rendered.
 
  All the GUI creation code was taken from CEGUI example
 (which works).
  I didn't get any errors from CEGUI or OSG.
 
  I also tried to set the renderGUI function as post callback
 of the camera
  with no better results.
 
  any ideas?
 
  is it something with the Zbuffer? or Z position of the GUI?
 
  thanks,
   Guy.
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/
 
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] CEGUI shows up when rendering text

2007-06-15 Thread Anders Backman

Hi all (again).

Now to another issue.

I have an implementation of a CEGUI integration into OSG.
It has been working just fine, up until where I have a multitextured
Spider (rendered using ReplicantBody) in the scene.
As far as I know and can see, ReplicantBody does not set any states
explicitly outside a StateSet.

The same
Now Im not blaiming the spider for the problem, its just something
with it that messes up the CE gui drawing.

It disappear from the screen, until there is something rendered using
osgText, then it pops back into the display!

It seems that something in the state is leaking? from osgText that
makes it possible to render the CEgui drawable

This is what happens:

1. Render CEGUI only - ok
2. Render spider, cegui disappears, if spider is culled, cegui does
not come back!
3. add text to scene -cegui comes back
4 remove text - cegui disappears



CEGUI is rendered with the stateset:

osg::StateSet* stateset = geode-getOrCreateStateSet();
stateset-setMode(GL_DEPTH_TEST,osg::StateAttribute::OVERRIDE |
osg::StateAttribute::OFF);

stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
stateset-setRenderBinDetails(100,RenderBin);
stateset-setMode(GL_BLEND,osg::StateAttribute::OVERRIDE
|osg::StateAttribute::ON);


stateset-setTextureMode(0, GL_TEXTURE_2D,
osg::StateAttribute::OVERRIDE |osg::StateAttribute::ON);

stateset-setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE
|osg::StateAttribute::OFF);

And in CEGUI:drawable() Im using the same state settings as in the
osgcegui example:

renderInfo.getState()-setActiveTextureUnit(0);

renderInfo.getState()-disableAllVertexArrays();

  m_ui-getSingletonPtr()-renderGUI();



Replicantbody (the spider) is using the state:

submesh_state_set-setTextureAttribute(map_id, texture);
submesh_state_set-setTextureMode(map_id, GL_TEXTURE_2D,
osg::StateAttribute::ON);
submesh_state_set-setMode(GL_TEXTURE_COORD_ARRAY, osg::StateAttribute::ON);


Im guessing that one of the drawables (ReplicantBody, CEGUI) is
leaking/missing a StateSet setting.

But whats puzzling me is that osgText seems to leave something behind
that enables the drawing of CEGUI again...
So with osgText everything works.

Before digging into the dirt, Is there something here that ring a bell?

--



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CEGUI shows up when rendering text

2007-06-15 Thread Serge Lages

Hi Anders,

I remenber having such a problem with CEGUI and multitexturing, here is my
drawImplementation which works fine now :

void CEGUIDrawable::drawImplementation(osg::RenderInfo renderInfo) const
{
   osg::State*state = renderInfo.getState();

   if (state-getContextID() != _activeContextID)
   {
   return;
   }

   state-setActiveTextureUnit(0);
   state-setClientActiveTextureUnit(0);
   CEGUI::System::getSingleton().renderGUI();

   state-checkGLErrors(CEGUIDrawable::drawImplementation);
}

But my problem was just CEGUI textures going all white when looking to a
multitextured object, so maybe you have a new one. :)

Good luck !

On 6/15/07, Anders Backman [EMAIL PROTECTED] wrote:


Hi all (again).

Now to another issue.

I have an implementation of a CEGUI integration into OSG.
It has been working just fine, up until where I have a multitextured
Spider (rendered using ReplicantBody) in the scene.
As far as I know and can see, ReplicantBody does not set any states
explicitly outside a StateSet.

The same
Now Im not blaiming the spider for the problem, its just something
with it that messes up the CE gui drawing.

It disappear from the screen, until there is something rendered using
osgText, then it pops back into the display!

It seems that something in the state is leaking? from osgText that
makes it possible to render the CEgui drawable

This is what happens:

1. Render CEGUI only - ok
2. Render spider, cegui disappears, if spider is culled, cegui does
not come back!
3. add text to scene -cegui comes back
4 remove text - cegui disappears



CEGUI is rendered with the stateset:

osg::StateSet* stateset = geode-getOrCreateStateSet();
stateset-setMode(GL_DEPTH_TEST,osg::StateAttribute::OVERRIDE |
osg::StateAttribute::OFF);

stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
stateset-setRenderBinDetails(100,RenderBin);
stateset-setMode(GL_BLEND,osg::StateAttribute::OVERRIDE
|osg::StateAttribute::ON);


stateset-setTextureMode(0, GL_TEXTURE_2D,
osg::StateAttribute::OVERRIDE |osg::StateAttribute::ON);

stateset-setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE
|osg::StateAttribute::OFF);

And in CEGUI:drawable() Im using the same state settings as in the
osgcegui example:

renderInfo.getState()-setActiveTextureUnit(0);

renderInfo.getState()-disableAllVertexArrays();

   m_ui-getSingletonPtr()-renderGUI();



Replicantbody (the spider) is using the state:

submesh_state_set-setTextureAttribute(map_id, texture);
submesh_state_set-setTextureMode(map_id, GL_TEXTURE_2D,
osg::StateAttribute::ON);
submesh_state_set-setMode(GL_TEXTURE_COORD_ARRAY,
osg::StateAttribute::ON);


Im guessing that one of the drawables (ReplicantBody, CEGUI) is
leaking/missing a StateSet setting.

But whats puzzling me is that osgText seems to leave something behind
that enables the drawing of CEGUI again...
So with osgText everything works.

Before digging into the dirt, Is there something here that ring a bell?

--



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
   http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/





--
Serge Lages
http://www.magrathea-engine.org
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] CEGUI shows up when rendering text

2007-06-15 Thread Anders Backman

So at what point did you store the _activeContextID member attribute?
as it is only valid during a current Draw phase.



On 6/15/07, Serge Lages [EMAIL PROTECTED] wrote:

Hi Anders,




I remenber having such a problem with CEGUI and multitexturing, here is my
drawImplementation which works fine now :

void CEGUIDrawable::drawImplementation(osg::RenderInfo
renderInfo) const
 {
osg::State*state = renderInfo.getState();

if (state-getContextID() != _activeContextID)
{
return;
}

state-setActiveTextureUnit(0);
state-setClientActiveTextureUnit(0);
CEGUI::System::getSingleton().renderGUI();


state-checkGLErrors(CEGUIDrawable::drawImplementation);
}

But my problem was just CEGUI textures going all white when looking to a
multitextured object, so maybe you have a new one. :)

Good luck !


On 6/15/07, Anders Backman [EMAIL PROTECTED] wrote:

 Hi all (again).

 Now to another issue.

 I have an implementation of a CEGUI integration into OSG.
 It has been working just fine, up until where I have a multitextured
 Spider (rendered using ReplicantBody) in the scene.
 As far as I know and can see, ReplicantBody does not set any states
 explicitly outside a StateSet.

 The same
 Now Im not blaiming the spider for the problem, its just something
 with it that messes up the CE gui drawing.

 It disappear from the screen, until there is something rendered using
 osgText, then it pops back into the display!

 It seems that something in the state is leaking? from osgText that
 makes it possible to render the CEgui drawable

 This is what happens:

 1. Render CEGUI only - ok
 2. Render spider, cegui disappears, if spider is culled, cegui does
 not come back!
 3. add text to scene -cegui comes back
 4 remove text - cegui disappears



 CEGUI is rendered with the stateset:

 osg::StateSet* stateset = geode-getOrCreateStateSet();

stateset-setMode(GL_DEPTH_TEST,osg::StateAttribute::OVERRIDE
|
 osg::StateAttribute::OFF);


stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
 stateset-setRenderBinDetails(100,RenderBin);
 stateset-setMode(GL_BLEND,osg::StateAttribute::OVERRIDE
 |osg::StateAttribute::ON);


 stateset-setTextureMode(0, GL_TEXTURE_2D,
 osg::StateAttribute::OVERRIDE |osg::StateAttribute::ON);


stateset-setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE
 |osg::StateAttribute::OFF);

 And in CEGUI:drawable() Im using the same state settings as in the
 osgcegui example:

 renderInfo.getState()-setActiveTextureUnit(0);

 renderInfo.getState()-disableAllVertexArrays();

m_ui-getSingletonPtr()-renderGUI();



 Replicantbody (the spider) is using the state:

 submesh_state_set-setTextureAttribute(map_id, texture);
 submesh_state_set-setTextureMode(map_id, GL_TEXTURE_2D,
 osg::StateAttribute::ON);
 submesh_state_set-setMode(GL_TEXTURE_COORD_ARRAY,
osg::StateAttribute::ON);


 Im guessing that one of the drawables (ReplicantBody, CEGUI) is
 leaking/missing a StateSet setting.

 But whats puzzling me is that osgText seems to leave something behind
 that enables the drawing of CEGUI again...
 So with osgText everything works.

 Before digging into the dirt, Is there something here that ring a bell?

 --




 Anders Backman   Email:[EMAIL PROTECTED]
 HPC2N/VRlab  Phone:+46 (0)90-786 9936
 Umea university  Cellular: +46 (0)70-392 64
67
 S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
http://www.cs.umu.se/~andersb
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/




--
Serge Lages
 http://www.magrathea-engine.org
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/




--



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CEGUI shows up when rendering text

2007-06-15 Thread Anders Backman

Works now, it was the setClientActiveTextureUnit that did the trick!

Thanks.

/Anders

On 6/15/07, Anders Backman [EMAIL PROTECTED] wrote:

So at what point did you store the _activeContextID member attribute?
as it is only valid during a current Draw phase.



On 6/15/07, Serge Lages [EMAIL PROTECTED] wrote:
 Hi Anders,


 I remenber having such a problem with CEGUI and multitexturing, here is my
 drawImplementation which works fine now :

 void CEGUIDrawable::drawImplementation(osg::RenderInfo
 renderInfo) const
  {
 osg::State*state = renderInfo.getState();

 if (state-getContextID() != _activeContextID)
 {
 return;
 }

 state-setActiveTextureUnit(0);
 state-setClientActiveTextureUnit(0);
 CEGUI::System::getSingleton().renderGUI();


 state-checkGLErrors(CEGUIDrawable::drawImplementation);
 }

 But my problem was just CEGUI textures going all white when looking to a
 multitextured object, so maybe you have a new one. :)

 Good luck !


 On 6/15/07, Anders Backman [EMAIL PROTECTED] wrote:
 
  Hi all (again).
 
  Now to another issue.
 
  I have an implementation of a CEGUI integration into OSG.
  It has been working just fine, up until where I have a multitextured
  Spider (rendered using ReplicantBody) in the scene.
  As far as I know and can see, ReplicantBody does not set any states
  explicitly outside a StateSet.
 
  The same
  Now Im not blaiming the spider for the problem, its just something
  with it that messes up the CE gui drawing.
 
  It disappear from the screen, until there is something rendered using
  osgText, then it pops back into the display!
 
  It seems that something in the state is leaking? from osgText that
  makes it possible to render the CEgui drawable
 
  This is what happens:
 
  1. Render CEGUI only - ok
  2. Render spider, cegui disappears, if spider is culled, cegui does
  not come back!
  3. add text to scene -cegui comes back
  4 remove text - cegui disappears
 
 
 
  CEGUI is rendered with the stateset:
 
  osg::StateSet* stateset = geode-getOrCreateStateSet();
 
 stateset-setMode(GL_DEPTH_TEST,osg::StateAttribute::OVERRIDE
 |
  osg::StateAttribute::OFF);
 
 
 stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
  stateset-setRenderBinDetails(100,RenderBin);
  stateset-setMode(GL_BLEND,osg::StateAttribute::OVERRIDE
  |osg::StateAttribute::ON);
 
 
  stateset-setTextureMode(0, GL_TEXTURE_2D,
  osg::StateAttribute::OVERRIDE |osg::StateAttribute::ON);
 
 
 stateset-setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE
  |osg::StateAttribute::OFF);
 
  And in CEGUI:drawable() Im using the same state settings as in the
  osgcegui example:
 
  renderInfo.getState()-setActiveTextureUnit(0);
 
  renderInfo.getState()-disableAllVertexArrays();
 
 m_ui-getSingletonPtr()-renderGUI();
 
 
 
  Replicantbody (the spider) is using the state:
 
  submesh_state_set-setTextureAttribute(map_id, texture);
  submesh_state_set-setTextureMode(map_id, GL_TEXTURE_2D,
  osg::StateAttribute::ON);
  submesh_state_set-setMode(GL_TEXTURE_COORD_ARRAY,
 osg::StateAttribute::ON);
 
 
  Im guessing that one of the drawables (ReplicantBody, CEGUI) is
  leaking/missing a StateSet setting.
 
  But whats puzzling me is that osgText seems to leave something behind
  that enables the drawing of CEGUI again...
  So with osgText everything works.
 
  Before digging into the dirt, Is there something here that ring a bell?
 
  --
 
 
 
 
  Anders Backman   Email:[EMAIL PROTECTED]
  HPC2N/VRlab  Phone:+46 (0)90-786 9936
  Umea university  Cellular: +46 (0)70-392 64
 67
  S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
 http://www.cs.umu.se/~andersb
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/
 



 --
 Serge Lages
  http://www.magrathea-engine.org
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



--



 Anders Backman   Email:[EMAIL PROTECTED]
 HPC2N/VRlab  Phone:+46 (0)90-786 9936
 Umea university  Cellular: +46 (0)70-392 64 67
 S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
   http://www.cs.umu.se/~andersb




--



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb

Re: [osg-users] CEGUI CompositeViewer

2007-06-07 Thread Rafael Martinez
Hi Robert

Nothing happens, behaviour is the same in any threading model. I include two 
screenshots, in order than you can see what I mean with the texture problem.

Thanks for your unvaluable help,
Rafa

El Wednesday 06 June 2007 18:46:27 Robert Osfield escribió:
 HI Rafael,

 I would have thought a CompositeViewer with one view/one window will
 behave the same as Viewer with one window.  Viewer supports a wide
 range of threading models, so I guess there is chance this might be a
 deviation.  Try setting both to SingleThreaded and see what happens.

 Robert.

 On 6/6/07, Rafael Martinez [EMAIL PROTECTED] wrote:
  Hi all,
 
  I have been trying to get CEGUI working in windows during the last days.
  The results are that, after many tests  Serge help,  it works in my
  multiple monitor display when:
 
  I set an osgViewer,
  I make ,before creating the CEGUIDrawable,
 
viewer.setUpViewOnSingleScreen(0);
viewer.realize();
viewer.renderingTraversals();
 
  I remove in the original osgcegui example
 
  glPushAttrib and glPopAttrib functions
 
  This works, but however, when I use a CompositeViewer, the CEGUI window
  texture is lost (This also happens in a single display machine). Can
  someone explain the differences between an osgViewer and an
  osgMultipleViewer with just one view ???
 
  I Include the main() of my CEGUI application in order than you can see
  what I mean. In the code below, when undefining COMPLEX it works, in the
  other case don't.
 
  Thanks in advance,
  Rafa.
 
  - The code ---
 
  int main( int argc, char **argv )
  {
  #define COMPLEX
 
  osg::setNotifyLevel (osg::INFO);
 
  #ifdef COMPLEX
  osgViewer::CompositeViewer viewer;
  osgViewer::View* view = new osgViewer::View;
  view-setUpViewOnSingleScreen(0);
  viewer.addView(view);
  #else
  osgViewer::Viewer viewer;
  viewer.setUpViewOnSingleScreen(0);
  #endif
  viewer.realize();
  viewer.renderingTraversals();
 
  osg::ref_ptrosg::Node loadedModel =
  osgDB::readNodeFile(../data/cow.osg);
  osg::ref_ptrosg::Group group = new osg::Group;
  group-addChild(loadedModel.get());
 
  osg::ref_ptrosg::Geode geode = new osg::Geode;
  osg::ref_ptrCEGUIDrawable cd = new CEGUIDrawable();
  geode-addDrawable(cd.get());
  geode-setCullingActive(false);
  group-addChild(geode.get());
 
  cd-loadScheme(../data/CEGUI/schemes/TaharezLookSkin.scheme);
  cd-loadLayout(../data/CEGUI/layouts/TabControlDemo.layout);
 
  #ifdef COMPLEX
  view-setSceneData(group.get());
  view-setCameraManipulator(new osgGA::TrackballManipulator());
  #else
  viewer.setSceneData(group.get());
  viewer.setCameraManipulator(new osgGA::TrackballManipulator());
  #endif
  while( !viewer.done() ) viewer.frame();
  }
  -
 
 
  --
  Rafael J. Martinez
  Instituto de Robotica
  Universitat de Valencia
  Apdo. Correos 2085
  Valencia 46071
 
  http://www.uv.es/~rmtnez
  Tel: (+34) 96 354 3564
  Fax: (+34) 96 354 3550
 
  Id. GnuPG: 0xBCFC8F5F
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



-- 
Rafael J. Martinez
Instituto de Robotica
Universitat de Valencia
Apdo. Correos 2085
Valencia 46071

http://www.uv.es/~rmtnez
Tel: (+34) 96 354 3564
Fax: (+34) 96 354 3550

Id. GnuPG: 0xBCFC8F5F
attachment: CEGUI-single.jpgattachment: CEGUI-Multiple.jpg___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] CEGUI CompositeViewer

2007-06-07 Thread Robert Osfield

Hi Rafael,

I'm afraid I can't think of what might be up.  Perhaps the
implementation of the CEGUI is a bit sensitive to where its set up.

In past I have dabbled with CEGUI, but came away thinking that it
really wasn't ready for handling the needs of graphics toolkit like
the OSG, it doesn't have a concept of multiple graphics context, nor
multi-threading, the constructor order with its setup is really
awkward for the types of set up the OSG uses too - i.e. allow you to
construct your scene, then the viewer then create and destroy graphics
context throughout the life of the app.  CEGUI when I looked at it
fell along way short of being able to support this flexibility and
scalability.

If you only ever want one window and run single threaded then CEGUI
might come back on as possibility, but other look elsewhere.


Robert.



On 6/7/07, Rafael Martinez [EMAIL PROTECTED] wrote:

Hi Robert

Nothing happens, behaviour is the same in any threading model. I include two
screenshots, in order than you can see what I mean with the texture problem.

Thanks for your unvaluable help,
Rafa

El Wednesday 06 June 2007 18:46:27 Robert Osfield escribió:
 HI Rafael,

 I would have thought a CompositeViewer with one view/one window will
 behave the same as Viewer with one window.  Viewer supports a wide
 range of threading models, so I guess there is chance this might be a
 deviation.  Try setting both to SingleThreaded and see what happens.

 Robert.

 On 6/6/07, Rafael Martinez [EMAIL PROTECTED] wrote:
  Hi all,
 
  I have been trying to get CEGUI working in windows during the last days.
  The results are that, after many tests  Serge help,  it works in my
  multiple monitor display when:
 
  I set an osgViewer,
  I make ,before creating the CEGUIDrawable,
 
viewer.setUpViewOnSingleScreen(0);
viewer.realize();
viewer.renderingTraversals();
 
  I remove in the original osgcegui example
 
  glPushAttrib and glPopAttrib functions
 
  This works, but however, when I use a CompositeViewer, the CEGUI window
  texture is lost (This also happens in a single display machine). Can
  someone explain the differences between an osgViewer and an
  osgMultipleViewer with just one view ???
 
  I Include the main() of my CEGUI application in order than you can see
  what I mean. In the code below, when undefining COMPLEX it works, in the
  other case don't.
 
  Thanks in advance,
  Rafa.
 
  - The code ---
 
  int main( int argc, char **argv )
  {
  #define COMPLEX
 
  osg::setNotifyLevel (osg::INFO);
 
  #ifdef COMPLEX
  osgViewer::CompositeViewer viewer;
  osgViewer::View* view = new osgViewer::View;
  view-setUpViewOnSingleScreen(0);
  viewer.addView(view);
  #else
  osgViewer::Viewer viewer;
  viewer.setUpViewOnSingleScreen(0);
  #endif
  viewer.realize();
  viewer.renderingTraversals();
 
  osg::ref_ptrosg::Node loadedModel =
  osgDB::readNodeFile(../data/cow.osg);
  osg::ref_ptrosg::Group group = new osg::Group;
  group-addChild(loadedModel.get());
 
  osg::ref_ptrosg::Geode geode = new osg::Geode;
  osg::ref_ptrCEGUIDrawable cd = new CEGUIDrawable();
  geode-addDrawable(cd.get());
  geode-setCullingActive(false);
  group-addChild(geode.get());
 
  cd-loadScheme(../data/CEGUI/schemes/TaharezLookSkin.scheme);
  cd-loadLayout(../data/CEGUI/layouts/TabControlDemo.layout);
 
  #ifdef COMPLEX
  view-setSceneData(group.get());
  view-setCameraManipulator(new osgGA::TrackballManipulator());
  #else
  viewer.setSceneData(group.get());
  viewer.setCameraManipulator(new osgGA::TrackballManipulator());
  #endif
  while( !viewer.done() ) viewer.frame();
  }
  -
 
 
  --
  Rafael J. Martinez
  Instituto de Robotica
  Universitat de Valencia
  Apdo. Correos 2085
  Valencia 46071
 
  http://www.uv.es/~rmtnez
  Tel: (+34) 96 354 3564
  Fax: (+34) 96 354 3550
 
  Id. GnuPG: 0xBCFC8F5F
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



--
Rafael J. Martinez
Instituto de Robotica
Universitat de Valencia
Apdo. Correos 2085
Valencia 46071

http://www.uv.es/~rmtnez
Tel: (+34) 96 354 3564
Fax: (+34) 96 354 3550

Id. GnuPG: 0xBCFC8F5F

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net

Re: [osg-users] CEGUI CompositeViewer

2007-06-07 Thread Rafael Martinez
Yes, I agree with you Robert. 
Do you have any suggestion in order to replace CEGUI ??

Regards,
Rafa.

El Thursday 07 June 2007 10:37:09 Robert Osfield escribió:
 Hi Rafael,

 I'm afraid I can't think of what might be up.  Perhaps the
 implementation of the CEGUI is a bit sensitive to where its set up.

 In past I have dabbled with CEGUI, but came away thinking that it
 really wasn't ready for handling the needs of graphics toolkit like
 the OSG, it doesn't have a concept of multiple graphics context, nor
 multi-threading, the constructor order with its setup is really
 awkward for the types of set up the OSG uses too - i.e. allow you to
 construct your scene, then the viewer then create and destroy graphics
 context throughout the life of the app.  CEGUI when I looked at it
 fell along way short of being able to support this flexibility and
 scalability.

 If you only ever want one window and run single threaded then CEGUI
 might come back on as possibility, but other look elsewhere.


 Robert.

 On 6/7/07, Rafael Martinez [EMAIL PROTECTED] wrote:
  Hi Robert
 
  Nothing happens, behaviour is the same in any threading model. I include
  two screenshots, in order than you can see what I mean with the texture
  problem.
 
  Thanks for your unvaluable help,
  Rafa
 
  El Wednesday 06 June 2007 18:46:27 Robert Osfield escribió:
   HI Rafael,
  
   I would have thought a CompositeViewer with one view/one window will
   behave the same as Viewer with one window.  Viewer supports a wide
   range of threading models, so I guess there is chance this might be a
   deviation.  Try setting both to SingleThreaded and see what happens.
  
   Robert.
  
   On 6/6/07, Rafael Martinez [EMAIL PROTECTED] wrote:
Hi all,
   
I have been trying to get CEGUI working in windows during the last
days. The results are that, after many tests  Serge help,  it works
in my multiple monitor display when:
   
I set an osgViewer,
I make ,before creating the CEGUIDrawable,
   
  viewer.setUpViewOnSingleScreen(0);
  viewer.realize();
  viewer.renderingTraversals();
   
I remove in the original osgcegui example
   
glPushAttrib and glPopAttrib functions
   
This works, but however, when I use a CompositeViewer, the CEGUI
window texture is lost (This also happens in a single display
machine). Can someone explain the differences between an osgViewer
and an
osgMultipleViewer with just one view ???
   
I Include the main() of my CEGUI application in order than you can
see what I mean. In the code below, when undefining COMPLEX it works,
in the other case don't.
   
Thanks in advance,
Rafa.
   
- The code ---
   
int main( int argc, char **argv )
{
#define COMPLEX
   
osg::setNotifyLevel (osg::INFO);
   
#ifdef COMPLEX
osgViewer::CompositeViewer viewer;
osgViewer::View* view = new osgViewer::View;
view-setUpViewOnSingleScreen(0);
viewer.addView(view);
#else
osgViewer::Viewer viewer;
viewer.setUpViewOnSingleScreen(0);
#endif
viewer.realize();
viewer.renderingTraversals();
   
osg::ref_ptrosg::Node loadedModel =
osgDB::readNodeFile(../data/cow.osg);
osg::ref_ptrosg::Group group = new osg::Group;
group-addChild(loadedModel.get());
   
osg::ref_ptrosg::Geode geode = new osg::Geode;
osg::ref_ptrCEGUIDrawable cd = new CEGUIDrawable();
geode-addDrawable(cd.get());
geode-setCullingActive(false);
group-addChild(geode.get());
   
   
cd-loadScheme(../data/CEGUI/schemes/TaharezLookSkin.scheme);
cd-loadLayout(../data/CEGUI/layouts/TabControlDemo.layout);
   
#ifdef COMPLEX
view-setSceneData(group.get());
view-setCameraManipulator(new
osgGA::TrackballManipulator()); #else
viewer.setSceneData(group.get());
viewer.setCameraManipulator(new
osgGA::TrackballManipulator()); #endif
while( !viewer.done() ) viewer.frame();
}
-
   
   
--
Rafael J. Martinez
Instituto de Robotica
Universitat de Valencia
Apdo. Correos 2085
Valencia 46071
   
http://www.uv.es/~rmtnez
Tel: (+34) 96 354 3564
Fax: (+34) 96 354 3550
   
Id. GnuPG: 0xBCFC8F5F
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
  
   ___
   osg-users mailing list
   osg-users@openscenegraph.net
   http://openscenegraph.net/mailman/listinfo/osg-users
   http://www.openscenegraph.org/
 
  --
  Rafael J. Martinez
  Instituto de Robotica
  Universitat de Valencia
  Apdo. Correos 2085
  Valencia 46071
 
 

Re: [osg-users] CEGUI CompositeViewer

2007-06-07 Thread Robert Osfield

On 6/7/07, Rafael Martinez [EMAIL PROTECTED] wrote:

Yes, I agree with you Robert.
Do you have any suggestion in order to replace CEGUI ??


The answer to that is more difficult :-)

I haven't played with any better alternative.  There has been
discussion about integrating other tools like Cario.

Also last year Marco Jez talked about an osgWidgets library that he
was developing, and this would a native implementation, but last Marco
has been overwhelmed by project work and unable to complete this work
and get it out as open source.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CEGUI CompositeViewer

2007-06-07 Thread Serge Lages

An OSG native UI library should be great yes. I also work with CEGUI and I
am clearly not satisfied with it, even more when you are used to work with
OSG. CEGUI really lacks of flexibility.

On 6/7/07, Robert Osfield [EMAIL PROTECTED] wrote:


On 6/7/07, Rafael Martinez [EMAIL PROTECTED] wrote:
 Yes, I agree with you Robert.
 Do you have any suggestion in order to replace CEGUI ??

The answer to that is more difficult :-)

I haven't played with any better alternative.  There has been
discussion about integrating other tools like Cario.

Also last year Marco Jez talked about an osgWidgets library that he
was developing, and this would a native implementation, but last Marco
has been overwhelmed by project work and unable to complete this work
and get it out as open source.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/





--
Serge Lages
http://www.magrathea-engine.org
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] CEGUI CompositeViewer

2007-06-06 Thread Rafael Martinez
Hi all,

I have been trying to get CEGUI working in windows during the last days.
The results are that, after many tests  Serge help,  it works in my multiple 
monitor display when:

I set an osgViewer,
I make ,before creating the CEGUIDrawable,

        viewer.setUpViewOnSingleScreen(0);
        viewer.realize();
        viewer.renderingTraversals();

I remove in the original osgcegui example

glPushAttrib and glPopAttrib functions

This works, but however, when I use a CompositeViewer, the CEGUI window 
texture is lost (This also happens in a single display machine). Can someone 
explain the differences between an osgViewer and an osgMultipleViewer with 
just one view ???

I Include the main() of my CEGUI application in order than you can see what I 
mean. In the code below, when undefining COMPLEX it works, in the other case 
don't.

Thanks in advance,
Rafa.

- The code ---

int main( int argc, char **argv )
{
#define COMPLEX 

osg::setNotifyLevel (osg::INFO);

#ifdef COMPLEX
osgViewer::CompositeViewer viewer;
osgViewer::View* view = new osgViewer::View;
view-setUpViewOnSingleScreen(0);
viewer.addView(view);
#else
osgViewer::Viewer viewer;
viewer.setUpViewOnSingleScreen(0);
#endif
viewer.realize();
viewer.renderingTraversals();

osg::ref_ptrosg::Node loadedModel = 
osgDB::readNodeFile(../data/cow.osg);
osg::ref_ptrosg::Group group = new osg::Group;
group-addChild(loadedModel.get());

osg::ref_ptrosg::Geode geode = new osg::Geode;
osg::ref_ptrCEGUIDrawable cd = new CEGUIDrawable();
geode-addDrawable(cd.get());
geode-setCullingActive(false);
group-addChild(geode.get());

cd-loadScheme(../data/CEGUI/schemes/TaharezLookSkin.scheme);
cd-loadLayout(../data/CEGUI/layouts/TabControlDemo.layout);

#ifdef COMPLEX
view-setSceneData(group.get());
view-setCameraManipulator(new osgGA::TrackballManipulator());
#else
viewer.setSceneData(group.get());
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
#endif
while( !viewer.done() ) viewer.frame();
}
-


-- 
Rafael J. Martinez
Instituto de Robotica
Universitat de Valencia
Apdo. Correos 2085
Valencia 46071

http://www.uv.es/~rmtnez
Tel: (+34) 96 354 3564
Fax: (+34) 96 354 3550

Id. GnuPG: 0xBCFC8F5F
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] CEGUI CompositeViewer

2007-06-06 Thread Robert Osfield

HI Rafael,

I would have thought a CompositeViewer with one view/one window will
behave the same as Viewer with one window.  Viewer supports a wide
range of threading models, so I guess there is chance this might be a
deviation.  Try setting both to SingleThreaded and see what happens.

Robert.

On 6/6/07, Rafael Martinez [EMAIL PROTECTED] wrote:

Hi all,

I have been trying to get CEGUI working in windows during the last days.
The results are that, after many tests  Serge help,  it works in my multiple
monitor display when:

I set an osgViewer,
I make ,before creating the CEGUIDrawable,

  viewer.setUpViewOnSingleScreen(0);
  viewer.realize();
  viewer.renderingTraversals();

I remove in the original osgcegui example

glPushAttrib and glPopAttrib functions

This works, but however, when I use a CompositeViewer, the CEGUI window
texture is lost (This also happens in a single display machine). Can someone
explain the differences between an osgViewer and an osgMultipleViewer with
just one view ???

I Include the main() of my CEGUI application in order than you can see what I
mean. In the code below, when undefining COMPLEX it works, in the other case
don't.

Thanks in advance,
Rafa.

- The code ---

int main( int argc, char **argv )
{
#define COMPLEX

osg::setNotifyLevel (osg::INFO);

#ifdef COMPLEX
osgViewer::CompositeViewer viewer;
osgViewer::View* view = new osgViewer::View;
view-setUpViewOnSingleScreen(0);
viewer.addView(view);
#else
osgViewer::Viewer viewer;
viewer.setUpViewOnSingleScreen(0);
#endif
viewer.realize();
viewer.renderingTraversals();

osg::ref_ptrosg::Node loadedModel =
osgDB::readNodeFile(../data/cow.osg);
osg::ref_ptrosg::Group group = new osg::Group;
group-addChild(loadedModel.get());

osg::ref_ptrosg::Geode geode = new osg::Geode;
osg::ref_ptrCEGUIDrawable cd = new CEGUIDrawable();
geode-addDrawable(cd.get());
geode-setCullingActive(false);
group-addChild(geode.get());

cd-loadScheme(../data/CEGUI/schemes/TaharezLookSkin.scheme);
cd-loadLayout(../data/CEGUI/layouts/TabControlDemo.layout);

#ifdef COMPLEX
view-setSceneData(group.get());
view-setCameraManipulator(new osgGA::TrackballManipulator());
#else
viewer.setSceneData(group.get());
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
#endif
while( !viewer.done() ) viewer.frame();
}
-


--
Rafael J. Martinez
Instituto de Robotica
Universitat de Valencia
Apdo. Correos 2085
Valencia 46071

http://www.uv.es/~rmtnez
Tel: (+34) 96 354 3564
Fax: (+34) 96 354 3550

Id. GnuPG: 0xBCFC8F5F
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/