public TokGLRenderer() { KeyboardLayout = GetKeyboardLayout(0); KeyStates = new byte[0x100]; _charMap.Add(82, '0'); _charMap.Add(79, '1'); _charMap.Add(80, '2'); _charMap.Add(81, '3'); _charMap.Add(75, '4'); _charMap.Add(76, '5'); _charMap.Add(77, '6'); _charMap.Add(71, '7'); _charMap.Add(72, '8'); _charMap.Add(73, '9'); _charMap.Add(83, '.'); _manager = new RenderManager(); _manager.Camera = new Camera(); _manager.Camera.CameraType = CameraType.HUD; _batch = new SpriteBatch(); _font[0] = new TokGL.Font(Plugins.LoadResourceStream("ArialBlack.png"),Plugins.LoadResourceStream("ArialBlack.info")); _font[1] = new TokGL.Font(Plugins.LoadResourceStream("ArialWhite.png"), Plugins.LoadResourceStream("ArialWhite.info")); //Load all UI textures: var textures = Plugins.GetKeys<UITexture>(); foreach (var texture in textures) { Plugins.Container.ResolveNamed<UITexture>(texture); } _whiteID = UITexture.GetID("white"); }
public Editor() { _tools = new Tools(this); _manager = new RenderManager(); if (_editorCamera == null) { _editorCamera = new Camera(); _editorCamera.CameraType = CameraType.Orthogonal; _editorCamera.Position = new Vector3(0, 0, 200); _editorCamera.LookAt = new Vector3(0, 0, 0); _editorCamera.ZNear = 0; _editorCamera.ZFar = 10000; _editorCamera.Up = new Vector3(0, 1, 0); _editorCamera.Fov = 1.0f; } if (_guiCamera == null) { _guiCamera = new Camera(); _guiCamera.CameraType = CameraType.HUD; _guiCamera.Position = new Vector3(0, 0, 200); _guiCamera.LookAt = new Vector3(0, 0, 0); _guiCamera.ZNear = 0; _guiCamera.ZFar = 10000; _guiCamera.Up = new Vector3(0, 1, 0); } _guiFont = new TokGL.Font(Plugins.LoadResourceStream("ArialWhite.png"), Plugins.LoadResourceStream("ArialWhite.info")); _spriteBatch = new SpriteBatch(); _lineBatch = new LineBatch(); }