Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void checkBox2_CheckedChanged(object sender, EventArgs e)
- {
- if (checkBox2.Checked)
- {
- if (checkBox1.Checked)
- {
- GL.Enable(EnableCap.Light1);
- GL.Light(LightName.Light1, LightParameter.Diffuse, Color.Blue);
- GL.Light(LightName.Light1, LightParameter.Position, vLight2);
- }
- else
- {
- GL.Enable(EnableCap.Lighting);
- GL.Enable(EnableCap.Light1);
- GL.Light(LightName.Light1, LightParameter.Diffuse, Color.Blue);
- GL.Light(LightName.Light1, LightParameter.Position, vLight2);
- }
- }
- else
- {
- GL.Disable(EnableCap.Lighting);
- GL.Disable(EnableCap.Light1);
- }
- MainViewport.Invalidate();
- }
- private void trackBar1_Scroll(object sender, EventArgs e)
- {
- blue = Color.FromArgb(0, 0, trackBar1.Value);
- GL.Light(LightName.Light1, LightParameter.Diffuse, blue);
- MainViewport.Invalidate();
- }
- //linie
- //bool vizLinie= false;
- private void button3_Click(object sender, EventArgs e)
- {
- if (vizLinie==true)
- {
- vizLinie = false;
- }
- else
- {
- vizLinie = true;
- }
- MainViewport.Invalidate();
- }
- //IN VIEWPOINT_PAINT
- if (vizLinie==true)
- {
- GL.Color3(Color.Aquamarine);
- GL.Begin(PrimitiveType.Lines);
- GL.Vertex4(vLight1);
- GL.Vertex4(vLight2);
- GL.End();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement