Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: fishigon

26. May 2012, 04:10:39 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Proper overlay method?
Pages: [1]
Print
Author Topic: Proper overlay method?  (Read 468 times)
ChrisE
Becoming dependent
**
Offline Offline

Posts: 104


View Profile
« on: 08. December 2010, 10:29:13 pm »

So, I'm about to the point where I'd like to start having debug information overlayed onto my screen. This information is likely to be extended into a full-blown context-menu system eventually.

Anyways, the three options seem to be using the HUD, using the UIWindow to stuff Swing components into poor old Xith, or using AWT heavyweight components directly onto my Canvas3DPanel.

Which of these is going to be easiest? I'd personally prefer to use AWT or Swing, but searching around on the forums here has lead me to believe that Swing integration is a major performance hit.

Any advice?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 09. December 2010, 12:11:15 am »

Only one advice: Use the HUD. It is fastest and very easy to use.

Marvin
Logged
ChrisE
Becoming dependent
**
Offline Offline

Posts: 104


View Profile
« Reply #2 on: 17. December 2010, 05:35:05 pm »

I'm using the HUD, but was wondering...

What's the function of the UIWindow class? The impression I get from the docs is that it lets me embed Swing stuff in Xith, and also lets me interoperate with other Swing components that might be external.

As I've got Xith running in a pane among other things in my application, it would be cool if I could use the documented drag-and-drop functionality to deal with the rest of my app. Thoughts?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 19. December 2010, 12:54:16 pm »

Yes, The Swing integration is working. But I would only advice you to use it, if you really need the interoperability with other Swing components. Normally you will want your application/game to atually look like a game, which will not be possible with Swing in an easy way.

Swing integration is comparably slow. The HUD is easy to use and fast. And it interates with your game nicely.

Well, it's your choice.

Marvin
Logged
ahealingman
Just dropped in

Offline Offline

Posts: 14


View Profile Email
« Reply #4 on: 19. December 2010, 04:16:16 pm »

I believe I read somewhere a month or so ago the major performance issues with swing were resolved. Not suggesting it should be used but just that performance shouldn't be as much of a consideration as it was before
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #5 on: 19. December 2010, 06:27:36 pm »

Hmm.. I don't remember that. But the Swing integration cannot be as fast as the HUD, since it includes a lot of full pixel buffer copies. The HUD does that very efficiently.

In the end it's just a matter of what you need. If you definitely need to Swing interaction, go with it. But if you'r making a game, you won't need that and you should get as much performance out of the engine as you can. Than the HUD is, what you need.

Marvin
Logged
ChrisE
Becoming dependent
**
Offline Offline

Posts: 104


View Profile
« Reply #6 on: 20. December 2010, 04:04:51 pm »

Regrettably, my project isn't much of a game--perhaps I'll add something as an Easter Egg. I'll try and get cleared to post some shots. Thanks!
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic