public Form3DView() : base(ID) { base.IsOpenReflectsVisiblity = true; InitializeComponent(); LoadOpenGLControl(); imuModel = LoadModel("PCB", this.imuHousingToolStripMenuItem.Checked ? housingModelPath : pcbModelPath, true); axisModel = LoadModel("Axis", "~/3DView/Arrow.obj", false); floorTileModel = LoadModel("Floor Tile", floorTileModelPath, false); material = new SimpleTexturedMaterial(false); effects.Effects.Add(material.Name, material); tileMaterial = new SimpleTexturedMaterial(true); effects.Effects.Add(tileMaterial.Name, tileMaterial); effects.Effects.Add(SimpleTexturedQuad.GetName(BoxMode.Color), new SimpleTexturedQuad(BoxMode.Color)); effects.Effects.Add(SimpleTexturedQuad.GetName(BoxMode.Textured), new SimpleTexturedQuad(BoxMode.Textured)); effects.Effects.Add(SimpleTexturedQuad.GetName(BoxMode.TexturedColor), new SimpleTexturedQuad(BoxMode.TexturedColor)); textRenderer = new TextRenderer(10, 10); texturedQuad = new TextureQuad(effects); texturedQuad.Texture = textRenderer.Texture; view = new View3D(glControl1.Bounds, glControl1.Bounds.Width, glControl1.Bounds.Height, (float)Math.PI / 4f); int lightCount = 1; //lightBuffer = new UniformBuffer("Lights", new UniformBufferInfo(ModelLightInstance.Format, 1, OpenTK.Graphics.OpenGL.BufferUsageHint.DynamicDraw)); lights = new ModelLightInstance[lightCount]; sceneLights = new ModelSceneLight[lightCount]; sceneLights[0] = new ModelSceneLight() { Center = new OpenTK.Vector3(30, 80, 60) * 8000f, Color = Color4.White, SpecularPower = 1.2f, Radius = float.PositiveInfinity, AttenuatuionTermA = 0f, Intensity = 0.8f, Directional = true, }; lightingArguments = new LightingArguments(); Quaternion = NgimuApi.Maths.Quaternion.Identity; formUpdateTimer = new Timer(); formUpdateTimer.Interval = 20; formUpdateTimer.Tick += new EventHandler(formUpdateTimer_Tick); tileTexture = new BitmapTexture2D("Tile Texture", "~/3DView/Compass.png", Texture2DInfo.Bitmap32_LinearClampToEdgeMipAnisotropicFilteringX4(new Size(32, 32))); }