Can't get GraphicsDeviceManager
by Matthew Shapiro · in Torque X 2D · 03/19/2008 (4:40 pm) · 2 replies
Ok I am feeling retarded right now, but I can't figure out how to get the GraphicsDeviceManager from the TX engine. The GarageGames.Torque.GameUtil.TorqueGame class has a public get property to retrieve the graphics manager (among others that also aren't available), however when I try to access this method Game studio gives me the error:
Error 6 An object reference is required for the nonstatic field, method, or property 'GarageGames.Torque.GameUtil.TorqueGame.GraphicsDeviceManager.get' D:\Projects\xWinForm Torque Test\xWinForm Torque Test\Game\Game.cs 73 24 Game
I'm at a loss on how to get the GraphicsDeviceManager that TX is currently using. Intellisence doesn't show it (among engine and a few others) while coding even though I can plainly see that the properties are public (both in code and in the references).
Any idea what I"m doing wrong? I'm just doing:
Microsoft.Xna.Framework.GraphicsDeviceManager graphics = GarageGames.Torque.GameUtil.TorqueGame.GraphicsDeviceManager;
Error 6 An object reference is required for the nonstatic field, method, or property 'GarageGames.Torque.GameUtil.TorqueGame.GraphicsDeviceManager.get' D:\Projects\xWinForm Torque Test\xWinForm Torque Test\Game\Game.cs 73 24 Game
I'm at a loss on how to get the GraphicsDeviceManager that TX is currently using. Intellisence doesn't show it (among engine and a few others) while coding even though I can plainly see that the properties are public (both in code and in the references).
Any idea what I"m doing wrong? I'm just doing:
Microsoft.Xna.Framework.GraphicsDeviceManager graphics = GarageGames.Torque.GameUtil.TorqueGame.GraphicsDeviceManager;
Associate John Kanalakis
EnvyGames
GraphicsDevice myDevice = GarageGames.Torque.GFX.GFXDevice.Instance.Device;
John K.