protected override void OnSetContext() { GraphicsInterface.gCheckErrors = true; //fViewer = new SketchViewer(GI, 620, 440); // Sections of the wall fSection0 = new CylinderSection(GI, 14.0f, 12.0f, 72, 10, 10, new RectangleF(4.0f/5,1, 1.0f/5, 1)); fSection72 = new CylinderSection(GI, 14.0f, 12.0f, 72, 10, 10, new RectangleF(3.0f/5, 1, 1.0f / 5, 1)); fSection144 = new CylinderSection(GI, 14.0f, 12.0f, 72, 10, 10, new RectangleF(2.0f / 5, 1, 1.0f / 5, 1)); fSection216 = new CylinderSection(GI, 14.0f, 12.0f, 72, 10, 10, new RectangleF(1.0f / 5, 1, 1.0f / 5, 1)); fSection288 = new CylinderSection(GI, 14.0f, 12.0f, 72, 10, 10, new RectangleF(0.0f / 5, 1, 1.0f / 5, 1)); // Sections displaying current speaker fSpeakerSection0 = new CylinderSection(GI, 4.0f, 4.0f, 45, 10, 10); fSpeakerSection90 = new CylinderSection(GI, 4.0f, 4.0f, 45, 10, 10); fSpeakerSection180 = new CylinderSection(GI, 4.0f, 4.0f, 45, 10, 10); fSpeakerSection270 = new CylinderSection(GI, 4.0f, 4.0f, 45, 10, 10); GI.Features.DepthTest.Enable(); // Medium Cyan background GI.Buffers.ColorBuffer.Color = ColorRGBA.MediumCyan; // Cull backs of polygons //GI.CullFace(GLFace.Back); GI.FrontFace(FrontFaceDirection.Ccw); //GI.Enable(GLOption.CullFace); GI.Features.DepthTest.Enable(); // Setup light parameters //GI.LightModel(LightModelParameter.LightModelAmbient, fNoLight); GI.LightModel(LightModelParameter.LightModelAmbient, fBrightLight); GI.Features.Lighting.Light0.Ambient = new ColorRGBA(fLowLight); GI.Features.Lighting.Light0.Diffuse = new ColorRGBA(fBrightLight); GI.Features.Lighting.Light0.Specular = new ColorRGBA(fBrightLight); GI.Features.Lighting.Enable(); GI.Features.Lighting.Light0.Enable(); // Mostly use material tracking GI.Features.ColorMaterial.Enable(); GI.ColorMaterial(GLFace.FrontAndBack, ColorMaterialParameter.AmbientAndDiffuse); GI.Material(GLFace.FrontAndBack, MaterialParameter.Shininess, 128); string PanoramicName = "Microsoft RoundTable Panoramic Video"; string SpeakerName = "Microsoft RoundTable Active Speaker Video"; //fWallTexture = TextureHelper.CreateCheckerboardTexture(GI, 512, 512); //fWallTexture = VideoTexture.CreateVideoDeviceTexture(GI, PanoramicName); fWallVideo = VideoTexture.CreateFromDeviceIndex(GI, 0); fWallTexture = fWallVideo; //fSpeakerTexture = TextureHelper.CreateCheckerboardTexture(GI, 512, 512); //fSpeakerTexture = VideoTexture.CreateVideoDeviceTexture(GI, SpeakerName); //fSpeakerTexture = VideoTexture.CreateFromDeviceIndex(GI, 1); fSpeakerVideo = VideoTexture.CreateFromDeviceIndex(GI, 1); fSpeakerTexture = fSpeakerVideo; fDesktopTexture = TextureHelper.CreateCheckerboardTexture(GI, 512, 512); }