Game Development Community

How to display 3D Object in a GUI Control

by Frank Bignone · in Torque Game Engine · 08/23/2001 (9:42 am) · 6 replies

Hello,

I would like to have in my main GUI a control to display some .DTS object (selection of player shape, for example).

I thought I should use the 'ShowTSCtrl' object, but I do seem to make it work properly. Only thinks I have is a messed black flickering screen.

Thanks for any help;

Frank

About the author

Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.


#1
08/23/2001 (9:52 am)
Look at game/guiPlayerView.cc

It's a bit broken right now with hard coded paths, hardcoded weapon references and a couple other things.

But that should be what you want.
#2
08/23/2001 (10:00 am)
Tribes 2 has a 3D player displayed in the gui and used a special GuiPlayerView control to do so. The code is located in the game dir (guiPlyerView.cc). I haven't tried it though.
#3
08/23/2001 (10:06 am)
Thanks, I will look at it and maybe I will create something like an objectView object which can be helpful to select 3D Object (for inventory, ...)

Frank
#4
08/23/2001 (11:11 am)
Great !!! It works.
I have make a class named GuiObjectView by looking at GuiPlayerView. I need to clarify two points regarding ResourecMgr and skins, then I will put sources on web if someone need it.

Here is a screenshot showing the selection of an airplane :
perso.wanadoo.fr/hysteria/contribs/images/fly-startup.jpg
#5
08/25/2001 (12:56 pm)
Frank, what path did you use for the for the playerview stuff? its diving off into the resource manager and I havent got the urge to go and see what that looks at right now (maybe I should, seems pretty important to know how to name resources so they work :))

seems if you stick a / as the first char is does some silly string stuff too :))

Phil.
#6
08/25/2001 (1:31 pm)
Concerning the path, I put all player planes in the data/shapes/plane and use a particular name xxx_plane.dts. Then, I have a script routine that scans the dir (in fact all) to get all the files.

From the little experience I have with the resourceMgr, I notice that you should not put a / at the beginning of a resource. If you do so, you will be able to add it to the resourceMgr, but when it will try to open the stream you will get a bad error : stream size error popup (in fact, the error is much simpler, you get a bad path file error but it is not caught, so when the engine try to find the size of the file the last error popups).

I hope I answered your questions and sorry for my english, but my native language is french.