Game Development Community

Creating a canvas

by Joost Ronkes Agerbeek · in Torque Game Engine · 07/15/2004 (11:53 pm) · 1 replies

After playing around with the Torque Demo a bit, I decided to strip the scripts as far as I could, helped by a couple of tutorials of course. :-)

At the moment I am trying to create a canvas and I have some questions about that. It seems that some of the preferences must be set in order for this to work. I reduced the preferences to this.

$pref::Video::displayDevice = "OpenGL";
$pref::Video::allowOpenGL = 1;
$pref::Video::windowedRes = "800 600";
$pref::Video::fullScreen = "0";

It works like a charm, but I'm wondering: where does the $pref object come from? Is it already created by the engine? Is it created at the time I first use it? Is it convention to use $pref for these kind of things?

Second question. The log shows that an accelerated D3D device was not detected. What version of D3D is Torque looking for? Is it better to run OpenGL instead of D3D (I'm running Windows, of course) or does that depend on the machine and should the player just experiment?

Final question. I told my graphics card to lower the contrast to make sure that colours display correctly on my LCD-monitor. However, whenever Torque starts, it sets contrast back to the default and leaves it that way even when the game exits. My guess this has something to do with OpenGL. Anyone else have this problem and maybe know how to solve it?

Thanks for helping me out.

Joost Ronkes Agerbeek

About the author

Recent Threads


#1
07/16/2004 (7:38 am)
The $pref and event the :: in global names is actually just convention and has nothing to do with an object heirarcy. It does however make it pretty clear what the variable is for.

OpenGL is usually the way to go, but feel free to experiment.

Hopefully somebody else can help on the LCD contrast issue.

Eric