Torque Questions

Started by
2 comments, last by Windryder 14 years, 12 months ago
I am having some trouble learning Torque, I am originally a C++ programmer. 1. How do you declare a class with variables and such in Torque? 2. How do you use OpenGL to draw in Torque?
Advertisement
First of all, it would help if you could clarify what Torque technology you are using (TGE, TGEA, TGB, ...?). Second, I am not very experienced with Torque, but to my knowledge it is not possible to declare new classes from TorqueScript. Rather, you should create new classes in C++ and expose them to TorqueScript using the macros provided. Read the code and you will see how it is done.

As for drawing with OpenGL, you will again need to clarify -- what exactly do you intend to draw, and, more importantly, why are you so sure that you will need to access GL directly? Torque itself can do pretty much anything you can imagine.

EDIT: The following links might help you: (LOGIN REQUIRED)
http://tdn.garagegames.com/wiki/TorqueScript
http://tdn.garagegames.com/wiki/Code/How_do_I_make_a_scriptable_object%3F
I am using TGB and I need to draw gauges with pie piece sections that are not always the same and it needs a rotating needle.
I haven't really used TGB, but you'll want to do that in C++, probably by writing a custom GUI control.

This topic is closed to new replies.

Advertisement