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.
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
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
Torque Owner Eric Jergensen
OpenGL is usually the way to go, but feel free to experiment.
Hopefully somebody else can help on the LCD contrast issue.
Eric