OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Rendering into cegui element


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [3rdparty]
View previous topic :: View next topic  
Author Message
amigoface
User


Joined: 01 Apr 2010
Posts: 88
Location: Algeria

PostPosted: Thu Dec 09, 2010 8:11 am    Post subject:
Rendering into cegui element
Reply with quote

Hi,

i have an "options" dialogs in my application using CEGUI

wich allow the user to select an airplane using a cegui listbox

in the right side i want to render the loaded ive airplane with an animation callback that rotate the selected airplane for example

what is the best approch to load node and rendering them into cegui elements ?


any help is welcome

thanks and good day

ps : i am using osg via Delta3d
Back to top
View user's profile Send private message Send e-mail
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12215

PostPosted: Thu Dec 09, 2010 9:38 am    Post subject:
Rendering into cegui element
Reply with quote

Hi Issam,

Last time I looked at CEGUI I found it to be rather a mess for
integrating with multi-thread, multi-context supports API's like the
OSG. So what you are after might not be possible, or if it is might
be rather awkward.

On the OSG it should be just a case of creating a slave Render To
Texture (RTT) Camera, or a RTT Camera in the scene graph that is
rendered prior to the main scene graph, then you'd need to worry about
how to pass the texture the OSG created to CEGUI to past onto quad.

You might just find it much easier to skip CEGUI though...

Robert.

On Thu, Dec 9, 2010 at 8:11 AM, issam boughanmi <> wrote:
Quote:
Hi,

i have an "options" dialogs in my application using CEGUI

wich allow the user to select an airplane  using a cegui listbox

in the right side i want to render the loaded ive airplane with an animation callback that rotate the selected airplane for example

what is the best approch to load node and rendering them into cegui elements ?


any help is welcome

thanks and good day

ps : i am using osg via Delta3d

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34652#34652









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
amigoface
User


Joined: 01 Apr 2010
Posts: 88
Location: Algeria

PostPosted: Thu Dec 09, 2010 2:24 pm    Post subject:
Reply with quote

hi robert,

thanks for the suggestion

but what the most suitable gui framework other than CEGUI that can i use with the rtt camera
osgwidget, osgsdl, ... etc

in my CEGui option dialogs i have a tabcontrol with differents controls, (listbox, textboxes, sliders ... etc)

what is the best replacement that can work easily with the rtt camera ?
Back to top
View user's profile Send private message Send e-mail
amigoface
User


Joined: 01 Apr 2010
Posts: 88
Location: Algeria

PostPosted: Sat Dec 18, 2010 1:48 pm    Post subject:
Reply with quote

well


i solved my problem to render into cegui elmement but i am facing another one

plesae see the attached image



please note the cegui listbox in the left



here my code to create the textitems dynamically
Code:

 AvionsListBox = m_pHUD->GetWidget("AvionsListBox");
  static_cast<CEGUI::Listbox*>(AvionsListBox)->setMultiselectEnabled(false);
   
  ListboxTextItem * listBoxItem = new ListboxTextItem("Cessna 172-p", 1);
  listBoxItem->setSelectionBrushImage("WindowsLook", "MultiListSelectionBrush");
  static_cast<CEGUI::Listbox*>(AvionsListBox)->addItem(listBoxItem);

  listBoxItem = new ListboxTextItem("L39 - Albatros." ,2);
  listBoxItem->setSelectionBrushImage("WindowsLook", "MultiListSelectionBrush");
  static_cast<CEGUI::Listbox*>(AvionsListBox)->addItem(listBoxItem);


this is something related to cegui definitivelly but since i got no support on their forum i ask here
Back to top
View user's profile Send private message Send e-mail
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12215

PostPosted: Sun Dec 19, 2010 12:14 pm    Post subject:
Rendering into cegui element
Reply with quote

Hi Issam,

My guess is that the state that the OSG is applying is affecting
Cegui. You could try applying a osg::StateSet that contains the state
that Cegui is assuming prior to calling Cegui.

Robert.

On Sat, Dec 18, 2010 at 1:48 PM, issam boughanmi <> wrote:
Quote:
well


i solved my problem to render into cegui elmement but i am facing another one

plesae see the attached image

[Image: http://img811.imageshack.us/img811/7510/screenah.jpg ]

please note the cegui listbox in the left



here my code to create the textitems dynamically

Code:

 AvionsListBox = m_pHUD->GetWidget("AvionsListBox");
 static_cast<CEGUI::Listbox*>(AvionsListBox)->setMultiselectEnabled(false);

 ListboxTextItem * listBoxItem = new ListboxTextItem("Cessna 172-p", 1);
 listBoxItem->setSelectionBrushImage("WindowsLook", "MultiListSelectionBrush");
 static_cast<CEGUI::Listbox*>(AvionsListBox)->addItem(listBoxItem);

 listBoxItem = new ListboxTextItem("L39 - Albatros." ,2);
 listBoxItem->setSelectionBrushImage("WindowsLook", "MultiListSelectionBrush");
 static_cast<CEGUI::Listbox*>(AvionsListBox)->addItem(listBoxItem);




this is something related to cegui definitivelly but since i got no support on their forum i ask here

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34958#34958









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
amigoface
User


Joined: 01 Apr 2010
Posts: 88
Location: Algeria

PostPosted: Wed Dec 22, 2010 1:34 pm    Post subject:
Reply with quote

thanks to th3Dei from the delta3d forum

i post the solution here if someone is in the same situation

the problem is on :
Code:
listBoxItem->setSelectionBrushImage("WindowsLook", "MultiListSelectionBrush");


referring to wrong image
try this one, maybe work:
Code:

listBoxItem->setTextColours(CEGUI::colour(0.f, 0.f, 0.f));
listBoxItem->setSelectionColours(CEGUI::colour(50.f, 100.f, 180.f));
listBoxItem->setSelectionBrushImage("WindowsLook", "Background");



and thanks robert for your support !
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [3rdparty] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Large scale point clouds rendering wi... saedrna1 General 1 Fri Mar 08, 2019 8:01 am View latest post
No new posts Completely offscreen rendering using ... Waaayoff General 0 Mon Jan 28, 2019 10:06 am View latest post
No new posts Rendering stats crash on FreeBSD with... Michael Danilov General 0 Sat Dec 22, 2018 2:15 am View latest post
No new posts Rendering multiple screens njr3 General 1 Wed Oct 31, 2018 8:46 pm View latest post
No new posts Resizing FBO camera while rendering romulogcerqueira General 9 Tue Oct 02, 2018 3:34 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP