Re: Device.Lights[]
From: Phil Taylor (philipt_at_private-citizen-sorta.com)
Date: 11/17/04
- Next message: Kevin Spencer: "Re: Sprite Problem"
- Previous message: The March Hare [MVP]: "Re: capture frame image with directx"
- In reply to: Bill English: "Re: Device.Lights[]"
- Next in thread: Bill English: "Re: Device.Lights[]"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Nov 2004 12:26:51 -0800
lights can either be directional or cone but not both.
its not clear your falloff and attenuation is correct, either.
have you looked at the old Lights sample and how it used the various light
types?
"Bill English" <nutsy4@comcast.net> wrote in message
news:F3394AC0-5A38-46B0-B88F-E689AE17F374@microsoft.com...
> #region Frame Move
>
> private int frame = 0;
>
> /// <summary>
> /// This callback function will be called once at the beginning of every
> frame. This is the
> /// best location for your application to handle updates to the
> scene, but is not
> /// intended to contain actual rendering calls, which should
> instead
> be placed in the
> /// OnFrameRender callback.
> /// </summary>
> public void OnFrameMove(Device device, double appTime, float
> elapsedTime)
> {
>
> // SPEED MUST = .25, .5, 1, 2, 4, 8
> AnimateLight(1, .25f, LightPaths.ConeFront);
> AnimateLight(2, .25f, LightPaths.CircleCounterClockwise);
> AnimateLight(3, .25f, LightPaths.CircleClockwise);
> AnimateLight(4, .25f, LightPaths.CircleCounterClockwise);
> AnimateLight(5, .25f, LightPaths.CircleClockwise);
> AnimateLight(6, .25f, LightPaths.CircleCounterClockwise);
> AnimateLight(7, .25f, LightPaths.CircleClockwise);
>
> // if (frame == 100)
> // {
> // frame = 0;
> // RunSignalMaster(SignalMasterModes.CenterOut, device);
> // }
> // frame++;
>
> // Update the camera's position based on user input
> camera.FrameMove(elapsedTime);
>
> device.Lights[1].Ambient = Color.White;
> device.Lights[1].Diffuse = Color.White;
> device.Lights[1].Range = 20;
> device.Lights[1].InnerConeAngle = 0.5f;
> device.Lights[1].OuterConeAngle = 1;
> device.Lights[1].Falloff = 1;
> device.Lights[1].Attenuation0 = 5;
> device.Lights[1].Type = LightType.Spot;
> device.Lights[1].XPosition = 0;
> device.Lights[1].YPosition = 0;
> device.Lights[1].ZPosition = 0;
> device.Lights[1].XDirection = xCol[1];
> device.Lights[1].YDirection = 0;
> device.Lights[1].ZDirection = zCol[1];
> device.Lights[1].Update();
>
> device.Lights[2].Ambient = Color.Red;
> device.Lights[2].Diffuse = Color.Red;
> device.Lights[2].Range = 20;
> device.Lights[2].InnerConeAngle = 0.5f;
> device.Lights[2].OuterConeAngle = 1;
> device.Lights[2].Falloff = 1;
> device.Lights[2].Attenuation0 = 5;
> device.Lights[2].Type = LightType.Spot;
> device.Lights[2].XPosition = -1;
> device.Lights[2].YPosition = 0;
> device.Lights[2].ZPosition = -1;
> device.Lights[2].XDirection = xCol[2];
> device.Lights[2].YDirection = 0;
> device.Lights[2].ZDirection = zCol[2];
> device.Lights[2].Update();
>
> device.Lights[3].Ambient = Color.Red;
> device.Lights[3].Diffuse = Color.Red;
> device.Lights[3].Range = 20;
> device.Lights[3].InnerConeAngle = 0.5f;
> device.Lights[3].OuterConeAngle = 1;
> device.Lights[3].Falloff = 1;
> device.Lights[3].Attenuation0 = 5;
> device.Lights[3].Type = LightType.Spot;
> device.Lights[3].XPosition = 1;
> device.Lights[3].YPosition = 0;
> device.Lights[3].ZPosition = -1;
> device.Lights[3].XDirection = xCol[3];
> device.Lights[3].YDirection = 0;
> device.Lights[3].ZDirection = zCol[3];
> device.Lights[3].Update();
>
> device.Lights[4].Ambient = Color.White;
> device.Lights[4].Diffuse = Color.White;
> device.Lights[4].Range = 20;
> device.Lights[4].InnerConeAngle = 0.5f;
> device.Lights[4].OuterConeAngle = 1;
> device.Lights[4].Falloff = 1;
> device.Lights[4].Attenuation0 = 5;
> device.Lights[4].Type = LightType.Spot;
> device.Lights[4].XPosition = -2;
> device.Lights[4].YPosition = 0;
> device.Lights[4].ZPosition = -2;
> device.Lights[4].XDirection = xCol[4];
> device.Lights[4].YDirection = 0;
> device.Lights[4].ZDirection = zCol[4];
> device.Lights[4].Update();
>
> device.Lights[5].Ambient = Color.White;
> device.Lights[5].Diffuse = Color.White;
> device.Lights[5].Range = 20;
> device.Lights[5].InnerConeAngle = 0.5f;
> device.Lights[5].OuterConeAngle = 1;
> device.Lights[5].Falloff = 1;
> device.Lights[5].Attenuation0 = 5;
> device.Lights[5].Type = LightType.Spot;
> device.Lights[5].XPosition = 2;
> device.Lights[5].YPosition = 0;
> device.Lights[5].ZPosition = -2;
> device.Lights[5].XDirection = xCol[5];
> device.Lights[5].YDirection = 0;
> device.Lights[5].ZDirection = zCol[5];
> device.Lights[5].Update();
>
> device.Lights[6].Ambient = Color.Red;
> device.Lights[6].Diffuse = Color.Red;
> device.Lights[6].Range = 20;
> device.Lights[6].InnerConeAngle = 0.5f;
> device.Lights[6].OuterConeAngle = 1;
> device.Lights[6].Falloff = 1;
> device.Lights[6].Attenuation0 = 5;
> device.Lights[6].Type = LightType.Spot;
> device.Lights[6].XPosition = -3;
> device.Lights[6].YPosition = 0;
> device.Lights[6].ZPosition = -3;
> device.Lights[6].XDirection = xCol[6];
> device.Lights[6].YDirection = 0;
> device.Lights[6].ZDirection = zCol[6];
> device.Lights[6].Update();
>
> device.Lights[7].Ambient = Color.Red;
> device.Lights[7].Diffuse = Color.Red;
> device.Lights[7].Range = 20;
> device.Lights[7].InnerConeAngle = 0.5f;
> device.Lights[7].OuterConeAngle = 1;
> device.Lights[7].Falloff = 1;
> device.Lights[7].Attenuation0 = 5;
> device.Lights[7].Type = LightType.Spot;
> device.Lights[7].XPosition = 3;
> device.Lights[7].YPosition = 0;
> device.Lights[7].ZPosition = -3;
> device.Lights[7].XDirection = xCol[7];
> device.Lights[7].YDirection = 0;
> device.Lights[7].ZDirection = zCol[7];
> device.Lights[7].Update();
>
>
> device.Lights[8].Ambient = Color.Orange;
> device.Lights[8].Diffuse = Color.Orange;
> device.Lights[8].Range = 20;
> device.Lights[8].InnerConeAngle = 0.5f;
> device.Lights[8].OuterConeAngle = 1;
> device.Lights[8].Falloff = 1;
> device.Lights[8].Attenuation0 = 5;
> device.Lights[8].Type = LightType.Spot;
> device.Lights[8].XPosition = -3;
> device.Lights[8].YPosition = 0;
> device.Lights[8].ZPosition = -4;
> device.Lights[8].XDirection = 0;
> device.Lights[8].YDirection = 0;
> device.Lights[8].ZDirection = -5;
> device.Lights[8].Update();
>
> device.Lights[9].Ambient = Color.Orange;
> device.Lights[9].Diffuse = Color.Orange;
> device.Lights[9].Range = 20;
> device.Lights[9].InnerConeAngle = 0.5f;
> device.Lights[9].OuterConeAngle = 1;
> device.Lights[9].Falloff = 1;
> device.Lights[9].Attenuation0 = 5;
> device.Lights[9].Type = LightType.Spot;
> device.Lights[9].XPosition = -2;
> device.Lights[9].YPosition = 0;
> device.Lights[9].ZPosition = -4;
> device.Lights[9].XDirection = 0;
> device.Lights[9].YDirection = 0;
> device.Lights[9].ZDirection = -5;
> device.Lights[9].Update();
>
> device.Lights[10].Ambient = Color.Orange;
> device.Lights[10].Diffuse = Color.Orange;
> device.Lights[10].Range = 20;
> device.Lights[10].InnerConeAngle = 0.5f;
> device.Lights[10].OuterConeAngle = 1;
> device.Lights[10].Falloff = 1;
> device.Lights[10].Attenuation0 = 5;
> device.Lights[10].Type = LightType.Spot;
> device.Lights[10].XPosition = -1;
> device.Lights[10].YPosition = 0;
> device.Lights[10].ZPosition = -4;
> device.Lights[10].XDirection = 0;
> device.Lights[10].YDirection = 0;
> device.Lights[10].ZDirection = -5;
> device.Lights[10].Update();
>
> device.Lights[11].Ambient = Color.Orange;
> device.Lights[11].Diffuse = Color.Orange;
> device.Lights[11].Range = 20;
> device.Lights[11].InnerConeAngle = 0.5f;
> device.Lights[11].OuterConeAngle = 1;
> device.Lights[11].Falloff = 1;
> device.Lights[11].Attenuation0 = 5;
> device.Lights[11].Type = LightType.Spot;
> device.Lights[11].XPosition = 0;
> device.Lights[11].YPosition = 0;
> device.Lights[11].ZPosition = -4;
> device.Lights[11].XDirection = 0;
> device.Lights[11].YDirection = 0;
> device.Lights[11].ZDirection = -5;
> device.Lights[11].Update();
>
> device.Lights[12].Ambient = Color.Orange;
> device.Lights[12].Diffuse = Color.Orange;
> device.Lights[12].Range = 20;
> device.Lights[12].InnerConeAngle = 0.5f;
> device.Lights[12].OuterConeAngle = 1;
> device.Lights[12].Falloff = 1;
> device.Lights[12].Attenuation0 = 5;
> device.Lights[12].Type = LightType.Spot;
> device.Lights[12].XPosition = 1;
> device.Lights[12].YPosition = 0;
> device.Lights[12].ZPosition = -4;
> device.Lights[12].XDirection = 1;
> device.Lights[12].YDirection = 0;
> device.Lights[12].ZDirection = -5;
> device.Lights[12].Update();
>
> device.Lights[13].Ambient = Color.Orange;
> device.Lights[13].Diffuse = Color.Orange;
> device.Lights[13].Range = 20;
> device.Lights[13].InnerConeAngle = 0.5f;
> device.Lights[13].OuterConeAngle = 1;
> device.Lights[13].Falloff = 1;
> device.Lights[13].Attenuation0 = 5;
> device.Lights[13].Type = LightType.Spot;
> device.Lights[13].XPosition = 2;
> device.Lights[13].YPosition = 0;
> device.Lights[13].ZPosition = -4;
> device.Lights[13].XDirection = 0;
> device.Lights[13].YDirection = 0;
> device.Lights[13].ZDirection = -5;
> device.Lights[13].Update();
>
> device.Lights[14].Ambient = Color.Orange;
> device.Lights[14].Diffuse = Color.Orange;
> device.Lights[14].Range = 20;
> device.Lights[14].InnerConeAngle = 0.5f;
> device.Lights[14].OuterConeAngle = 1;
> device.Lights[14].Falloff = 1;
> device.Lights[14].Attenuation0 = 5;
> device.Lights[14].Type = LightType.Spot;
> device.Lights[14].XPosition = 3;
> device.Lights[14].YPosition = 0;
> device.Lights[14].ZPosition = -4;
> device.Lights[14].XDirection = 0;
> device.Lights[14].YDirection = 0;
> device.Lights[14].ZDirection = -5;
> device.Lights[14].Update();
> }
>
> #endregion
>
>
> /// <summary>
> /// This callback function will be called at the end of every frame to
> perform all the
> /// rendering calls for the scene, and it will also be called if
> the
> window needs to be
> /// repainted. After this function has returned, the sample
> framework will call
> /// Device.Present to display the contents of the next buffer in
> the
> swap chain
> /// </summary>
> public void OnFrameRender(Device device, double appTime, float
> elapsedTime)
> {
> bool beginSceneCalled = false;
>
> // Clear the render target and the zbuffer
> device.Clear(ClearFlags.ZBuffer | ClearFlags.Target,
> 0x002D32AA,
> 1.0f, 0);
> try
> {
> device.BeginScene();
> beginSceneCalled = true;
>
> Matrix matWorld;
> Matrix matTrans;
> Matrix matRotate;
>
> device.Lights[0].Enabled = true;
> device.Lights[1].Enabled = true;
> device.Lights[2].Enabled = true;
> device.Lights[3].Enabled = true;
> device.Lights[4].Enabled = true;
> device.Lights[5].Enabled = true;
> device.Lights[6].Enabled = true;
> device.Lights[7].Enabled = true;
>
> // Draw the floor
> matTrans = Matrix.Translation(-5.0f, -5.0f, -5.0f);
> matRotate = Matrix.RotationZ(0.0f);
> matWorld = matRotate * matTrans;
> device.SetTransform(TransformType.World, matWorld);
> wallMesh.DrawSubset(0);
>
> // Draw the back wall
> matTrans = Matrix.Translation(5.0f, -5.0f, -5.0f);
> matRotate = Matrix.RotationZ((float)Math.PI / 2);
> matWorld = matRotate * matTrans;
> device.SetTransform(TransformType.World, matWorld);
> wallMesh.DrawSubset(0);
>
> // Draw the side wall
> matTrans = Matrix.Translation(-5.0f, -5.0f, 5.0f);
> matRotate = Matrix.RotationX((float)-Math.PI / 2);
> matWorld = matRotate * matTrans;
> device.SetTransform(TransformType.World, matWorld);
> wallMesh.DrawSubset(0);
>
> // Draw the side wall
> matTrans = Matrix.Translation(5.0f, -5.0f, 5.0f);
> matRotate = Matrix.RotationX((float)-Math.PI / 2);
> matWorld = matRotate * matTrans;
> device.SetTransform(TransformType.World, matWorld);
> wallMesh.DrawSubset(0);
>
> for (int i = 1; i != 15; i++)
> {
> //Position the light and point it in the light's direction
> Vector3 vecFrom = new Vector3(device.Lights[i].Position.X,
> device.Lights[i].Position.Y, device.Lights[i].Position.Z);
> Vector3 vecAt = new Vector3(device.Lights[i].Position.X +
> device.Lights[i].Direction.X,
> device.Lights[i].Position.Y + device.Lights[i].Direction.Y,
> device.Lights[i].Position.Z + device.Lights[i].Direction.Z);
> Vector3 vecUp = new Vector3(0, 1, 0);
> Matrix matWorldInv;
> matWorldInv = Matrix.LookAtLH(vecFrom, vecAt, vecUp);
> matWorld = Matrix.Invert(matWorldInv);
> device.SetTransform(TransformType.World, matWorld);
> coneMesh0.DrawSubset(0);
> }
>
>
>
>
> // Update the effect's variables. Instead of using strings, it would
> // be more efficient to cache a handle to the parameter by
> calling
> // Effect.GetParameter
> effect.SetValue("worldViewProjection", camera.WorldMatrix *
> camera.ViewMatrix * camera.ProjectionMatrix);
> effect.SetValue("worldMatrix", camera.WorldMatrix);
> effect.SetValue("appTime", (float)appTime);
>
> // Show frame rate
> RenderText();
>
> // Show UI
> sampleUi.OnRender(elapsedTime);
> }
> finally
> {
> if (beginSceneCalled)
> device.EndScene();
> }
> }
>
> /// <summary>
> /// Render the help and statistics text. This function uses the
> Font
> object for
> /// efficient text rendering.
> /// </summary>
> private void RenderText()
> {
> TextHelper txtHelper = new TextHelper(statsFont, textSprite,
> 15);
>
> // Output statistics
> txtHelper.Begin();
> txtHelper.SetInsertionPoint(5,5);
> txtHelper.SetForegroundColor(System.Drawing.Color.Yellow);
> txtHelper.DrawTextLine(sampleFramework.FrameStats);
> txtHelper.DrawTextLine(sampleFramework.DeviceStats);
>
> txtHelper.SetForegroundColor(System.Drawing.Color.White);
> txtHelper.DrawTextLine("Put some status text here.");
>
> // Draw help
> if (isHelpShowing)
> {
> txtHelper.SetInsertionPoint(10,
> sampleFramework.BackBufferSurfaceDescription.Height-15*6);
>
> txtHelper.SetForegroundColor(System.Drawing.Color.DarkOrange);
> txtHelper.DrawTextLine("Controls (F1 to hide):");
>
> txtHelper.SetInsertionPoint(40,
> sampleFramework.BackBufferSurfaceDescription.Height-15*5);
> txtHelper.DrawTextLine("Help Item Misc: X");
> txtHelper.DrawTextLine("Quit: Esc");
> txtHelper.DrawTextLine("Hide help: F1");
> }
> else
> {
> txtHelper.SetInsertionPoint(10,
> sampleFramework.BackBufferSurfaceDescription.Height-15*2);
> txtHelper.SetForegroundColor(System.Drawing.Color.White);
> txtHelper.DrawTextLine("Press F1 for help");
> }
>
> txtHelper.End();
> }
>
> /// <summary>
> /// As a convenience, the sample framework inspects the incoming
> windows messages for
> /// keystroke messages and decodes the message parameters to pass
> relevant keyboard
> /// messages to the application. The framework does not remove the
> underlying keystroke
> /// messages, which are still passed to the application's MsgProc
> callback.
> /// </summary>
> private void OnKeyEvent(System.Windows.Forms.Keys key, bool
> isKeyDown, bool isKeyUp)
> {
> if (isKeyDown)
> {
> switch(key)
> {
> case System.Windows.Forms.Keys.F1:
> isHelpShowing = !isHelpShowing;
> break;
> }
> }
> }
>
> /// <summary>
> /// Before handling window messages, the sample framework passes
> incoming windows
> /// messages to the application through this callback function. If
> the application sets
> /// noFurtherProcessing to true, the sample framework will not
> process the message
> /// </summary>
> public IntPtr OnMsgProc(IntPtr hWnd, NativeMethods.WindowMessage
> msg, IntPtr wParam, IntPtr lParam, ref bool noFurtherProcessing)
> {
>
> noFurtherProcessing = sampleUi.MessageProc(hWnd, msg, wParam,
> lParam);
> if (noFurtherProcessing)
> return IntPtr.Zero;
>
> // Pass all remaining windows messages to camera so it can
> respond to user input
> camera.HandleMessages(hWnd, msg, wParam, lParam);
>
> return IntPtr.Zero;
> }
>
> /// <summary>
> /// Initializes the application
> /// </summary>
> public void InitializeApplication()
> {
> int y = 10;
>
> Checkbox cbLight1 = sampleUi.AddCheckBox(1, "Light 1", 35, y, 60, 22,
> true);
> Checkbox cbLight2 = sampleUi.AddCheckBox(2, "Light 2", 35, y += 24, 60,
> 22, true);
> Checkbox cbLight3 = sampleUi.AddCheckBox(3, "Light 3", 35, y += 24, 60,
> 22, true);
> Checkbox cbLight4 = sampleUi.AddCheckBox(4, "Light 4", 35, y += 24, 60,
> 22, true);
> Checkbox cbLight5 = sampleUi.AddCheckBox(5, "Light 5", 35, y += 24, 60,
> 22, true);
> Checkbox cbLight6 = sampleUi.AddCheckBox(6, "Light 6", 35, y += 24, 60,
> 22, true);
> Checkbox cbLight7 = sampleUi.AddCheckBox(7, "Light 7", 35, y += 24, 60,
> 22, true);
>
> cbLight1.Changed +=new EventHandler(cbLight1_Changed);
> cbLight2.Changed +=new EventHandler(cbLight2_Changed);
> cbLight3.Changed +=new EventHandler(cbLight3_Changed);
> cbLight4.Changed +=new EventHandler(cbLight4_Changed);
> cbLight5.Changed +=new EventHandler(cbLight5_Changed);
> cbLight6.Changed +=new EventHandler(cbLight6_Changed);
> cbLight7.Changed +=new EventHandler(cbLight7_Changed);
> }
>
> /// <summary>Called when the change device button is
> clicked</summary>
> private void OnChangeDevicClicked(object sender, EventArgs e)
> {
>
> sampleFramework.ShowSettingsDialog(!sampleFramework.IsD3DSettingsDialogShowing);
> }
>
> /// <summary>Called when the full screen button is
> clicked</summary>
> private void OnFullscreenClicked(object sender, EventArgs e)
> {
> sampleFramework.ToggleFullscreen();
> }
>
> /// <summary>Called when the ref button is clicked</summary>
> private void OnRefClicked(object sender, EventArgs e)
> {
> sampleFramework.ToggleReference();
> }
>
> /// <summary>
> /// Entry point to the program. Initializes everything and goes
> into
> a message processing
> /// loop. Idle time is used to render the scene.
> /// </summary>
> static int Main()
> {
> using(Framework sampleFramework = new Framework())
> {
> EmergencyLights sample = new
> EmergencyLights(sampleFramework);
> // Set the callback functions. These functions allow the
> sample framework to notify
> // the application about device changes, user input, and
> windows messages. The
> // callbacks are optional so you need only set callbacks
> for
> events you're interested
> // in. However, if you don't handle the device reset/lost
> callbacks then the sample
> // framework won't be able to reset your device since the
> application must first
> // release all device resources before resetting.
> Likewise,
> if you don't handle the
> // device created/destroyed callbacks then the sample
> framework won't be able to
> // recreate your device resources.
> sampleFramework.Disposing += new
> EventHandler(sample.OnDestroyDevice);
> sampleFramework.DeviceLost += new
> EventHandler(sample.OnLostDevice);
> sampleFramework.DeviceCreated += new
> DeviceEventHandler(sample.OnCreateDevice);
> sampleFramework.DeviceReset += new
> DeviceEventHandler(sample.OnResetDevice);
>
> sampleFramework.SetKeyboardCallback(new
> KeyboardCallback(sample.OnKeyEvent));
> sampleFramework.SetWndProcCallback(new
> WndProcCallback(sample.OnMsgProc));
>
> sampleFramework.SetCallbackInterface(sample);
> try
> {
>
> // Show the cursor and clip it when in full screen
> sampleFramework.SetCursorSettings(true, true);
>
> // Initialize
> sample.InitializeApplication();
>
> // Initialize the sample framework and create the
> desired window and Direct3D
> // device for the application. Calling each of these
> functions is optional, but they
> // allow you to set several options which control the
> behavior of the sampleFramework.
> sampleFramework.Initialize( true, true, true ); //
> Parse
> the command line, handle the default hotkeys, and show msgboxes
> sampleFramework.CreateWindow("EmergencyLights");
> sampleFramework.CreateDevice( 0, true,
> Framework.DefaultSizeWidth, Framework.DefaultSizeHeight,
> sample);
>
> // Pass control to the sample framework for handling
> the
> message pump and
> // dispatching render calls. The sample framework will
> call your FrameMove
> // and FrameRender callback when there is idle time
> between handling window messages.
> sampleFramework.MainLoop();
>
> }
> #if(DEBUG)
> catch (Exception e)
> {
> // In debug mode show this error (maybe - depending on
> settings)
> sampleFramework.DisplayErrorMessage(e);
> #else
> catch
> {
> // In release mode fail silently
> #endif
> // Ignore any exceptions here, they would have been
> handled by other areas
> return (sampleFramework.ExitCode == 0) ? 1 :
> sampleFramework.ExitCode; // Return an error code here
> }
>
> // Perform any application-level cleanup here. Direct3D
> device resources are released within the
> // appropriate callback functions and therefore don't
> require any cleanup code here.
> return sampleFramework.ExitCode;
> }
> }
>
> void cbLight1_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[1].Enabled = cb.IsChecked;
> }
>
> void cbLight2_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[2].Enabled = cb.IsChecked;
> }
>
> void cbLight3_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[3].Enabled = cb.IsChecked;
> }
>
> void cbLight4_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[4].Enabled = cb.IsChecked;
> }
>
> void cbLight5_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[5].Enabled = cb.IsChecked;
> }
>
> void cbLight6_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[6].Enabled = cb.IsChecked;
> }
>
> void cbLight7_Changed(object sender, EventArgs e)
> {
> Checkbox cb = (Checkbox)sender;
> sampleFramework.Device.Lights[7].Enabled = cb.IsChecked;
> }
> }
> }
>
>
>
>
>
>
> ////////////////////\\\\\\\\\\\\\\\
> END OF FILE
> \\\\\\\\\\\\\\\\\\\\///////////////
- Next message: Kevin Spencer: "Re: Sprite Problem"
- Previous message: The March Hare [MVP]: "Re: capture frame image with directx"
- In reply to: Bill English: "Re: Device.Lights[]"
- Next in thread: Bill English: "Re: Device.Lights[]"
- Messages sorted by: [ date ] [ thread ]