Questions about CEGUI.

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Darkness
Greenskin
Posts: 121
Joined: Sat Mar 19, 2005 3:32 am
Location: Austin, Texas

Questions about CEGUI.

Post by Darkness »

I'm finally making a bit of progress on my "little" project, but I have some questions about how to do the next part.

Right now, I'm setting it up so that there will be some different screens where the person can select some options from various menus. The thing is, these are not normal menus. I've disabled ALL mouse functions, so there's no mouse support. All of the menus are either keyboard or joystick driven. The thing I'm wondering is what would be the best way to set this up? The CEGUI stuff seems to be mainly for mouse over windows that are treated the same as regular windows in a GUI. I do want to have a window where the user can type in, but I'm not sure if the CEGUI way is the best way.

Anyone have any suggestions? I've been toying with it a bit, but I'm kind of lost.


-Darkness
User avatar
Raven
Goblin
Posts: 203
Joined: Wed Mar 23, 2005 1:07 pm
Location: Melbourne, Australia
Contact:

Post by Raven »

I think the CEGUI would be perfect for this job :)
I used up all my sick days, so I'm calling in dead.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

@Darkness:
You could probably gain some insight by reading this CEGUI-thread:
http://www.cegui.org.uk/modules/newbb/v ... SC&start=0 :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Darkness
Greenskin
Posts: 121
Joined: Sat Mar 19, 2005 3:32 am
Location: Austin, Texas

Post by Darkness »

Now I'm really lost. So Crazy Eddie's GUI is what CEGUI is? Oh man...

I thought this was a function of Ogre. I've been having a problem with the CEGUI demos working properly in OpenGL on my machine. This is another reason I'm kind of wary about using it. Though, it seems that using a third party GUI program might not be a good way to go. Maybe I just don't understand it, but it seems to not be that flexible and it's made mainly for mouse usage.

Also, it has it's own key entering routines? So how could I integrate that into my SDL keyboard reading functions? Or am I stuck using their stuff?


-Darkness
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

Darkness, cegui has no input reading at all. You inject input events into cegui. So you can savely use SDL and just use the inject functions to notify cegui about these events. Imho cegui is the single best solution for interactive in-game GUIs, so you better get used to it. It might look a bit scary at first, but it is all handable.
team-pantheon programmer
creators of Rastullahs Lockenpracht
Darkness
Greenskin
Posts: 121
Joined: Sat Mar 19, 2005 3:32 am
Location: Austin, Texas

Post by Darkness »

haffax wrote:Darkness, cegui has no input reading at all. You inject input events into cegui. So you can savely use SDL and just use the inject functions to notify cegui about these events. Imho cegui is the single best solution for interactive in-game GUIs, so you better get used to it. It might look a bit scary at first, but it is all handable.
Hmmm...I think I need to get more information about it. I looked at the demos on the Wiki, but it's all for mouse input and I don't have any of that. I'm also lost about how I would go about moving window via my program. Like for example, the user hits a key and a text window slides up from the bottome of the screen. After they're done, it will go back down. Everything I've read about it so far only seems to cover moving windows via mouse. Are there any other tutorials or anything that might be worth looking at?

Also, the CEGUI stuff won't work on my computer in OpenGL. Neither the precompiled demos or the demos with the source. The DirectX stuff seems to work okay, though. Is there some reason for this?


-Darkness
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

Someone correct me if I'm wrong...

I wouldn't personally worry too much about how the "DirectX or OpenGL" renderer work on their demos in CEGUI if you're planning on making an OGRE program. Your CEGUI usage will be going thru the "OGRE" CEGUI renderer.

I built CEGUI last night on VS 2005 beta 2, and had some small problems with both DirectX 8.1 and OpenGL (really just the background colors), but I haven't got the OGRE renderer working yet (shouldn't be too hard, it was just late ;)).
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Darkness wrote:.. it's all for mouse input and I don't have any of that.
..
Also, the CEGUI stuff won't work on my computer in OpenGL.
Please, take a look at the thread - Crazy Eddie is explaining the provided example framework, which contains wrappers for win32_input, etc.
Also, the thread is about keyboard input. :wink:
Why doesn't it work in OpenGL?
My best guess: you need to update your graphics driver. The DirectX funtionality is provided via DirectX (duh!) - but the OpenGL is provided via your graphics card vendor, in their driver.
If it works in DirectX and not in OpenGL, most of the time it is driver-related. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Darkness
Greenskin
Posts: 121
Joined: Sat Mar 19, 2005 3:32 am
Location: Austin, Texas

Post by Darkness »

I looked at the thread and read a bit of it, but I haven't seen anything in that appeared to apply to me. Maybe I missed something.

I just updated my drivers the other day, so not sure what the problem is. But in both the precompiled demos and the demos you build, they have some serious graphical glitches. I don't want to use D3D, so I hope there's a fix for it.

I'll look at that thread again, but I really didn't see what the point of posting it was.


-Darkness
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

Darkness wrote:I'll look at that thread again, but I really didn't see what the point of posting it was.
I briefly scanned it, but I think the thread involved someone using a library to get input and forward them to CEGUI, which is what you're planning to do (with SDL or whatever).

As far as the OpenGL not working, like I said, I think it's more important to get the OGRE CEGUI renderer working and see how it does (which will use OpenGL or DirectX on its own) assuming you're writing a program in OGRE.

Someone please correct me on that if I'm wrong, that just seems to be how it will actually work. It doesn't seem too important to get the other CEGUI renderers running.
Darkness
Greenskin
Posts: 121
Joined: Sat Mar 19, 2005 3:32 am
Location: Austin, Texas

Post by Darkness »

Hmmmmm...I don't think I looked at it at that angle. It appeared to me that they were using some precompiled keyboard routines that came with CEGUI and needed help with how to get it working properly.

Well, the Ogre framework seems to work well with most things, but the CEGUI stuff in OpenGL is tricky at best on my machine. Now, I'm using Window 98SE so that might be an issue. I downloaded the latest NVidia drivers the other day hoping that would fix the issue, but still no luck. So in the case I can't get it fixed, I'll need to find an alternative to the CEGUI stuff which gives me a headache whenever I start researching it.


-Darkness
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

Let me try this one more time...(again, someone correct me if I'm wrong, but I can't imagine how else it would be from an architectural standpoint)

You're trying out precompiled CEGUI demos and having problems with OpenGL. You're writing an OGRE game right?

CEGUI has several "rendering engines". When running a CEGUI program, you pick which one you want to use. Choices include things like:

A. OpenGL
B. DirectX 8.1
C. DirectX 9
D. Irrlicht
E. OGRE

(there's probably a few more).

The precompiled demos you are probably having issues with are choosing choice A. If you're writing an OGRE program, you'll be using choice E. Choice E will make all of its own calls to DirectX 7, 9, or OpenGL, and might not have the OpenGL issues A has. If everything else in OGRE works fine on your machine in OpenGL, I think choice E should potentially work fine for you, but it's worth investigating in any event.

So to test how well it works, I think you should really try getting choice E going, as opposed to worrying about glitches in A.

Just my opinion (and I could still be wrong about all of this, but I can't imagine for instance the OGRE CEGUI renderer calling back into CEGUI to have it draw things in OpenGL, the OGRECEGUI renderer should be rendering using the existing OGRE code).
Post Reply