summaryrefslogtreecommitdiff
path: root/TestApp/RenderWindow.cs
diff options
context:
space:
mode:
Diffstat (limited to 'TestApp/RenderWindow.cs')
-rw-r--r--TestApp/RenderWindow.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/TestApp/RenderWindow.cs b/TestApp/RenderWindow.cs
index 2f29d0f..6013724 100644
--- a/TestApp/RenderWindow.cs
+++ b/TestApp/RenderWindow.cs
@@ -27,6 +27,22 @@ namespace TestApp {
GL.Enable(EnableCap.Blend);
GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
+ GL.Disable(EnableCap.CullFace);
+
+ GL.Enable(EnableCap.Lighting);
+
+ GL.ShadeModel(ShadingModel.Smooth);
+
+ GL.Light(LightName.Light0, LightParameter.Position, new Vector4(0, 500, 1000, 0));
+ GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Specular, new Color4(1, 1, 1, 1));
+ GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Shininess, 50);
+ GL.Enable(EnableCap.Light0);
+
+ GL.Light(LightName.Light1, LightParameter.Position, new Vector4(1000, 500, 0, 0));
+ GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Specular, new Color4(1, 1, 1, 1));
+ GL.Material(MaterialFace.FrontAndBack, MaterialParameter.Shininess, 50);
+ GL.Enable(EnableCap.Light1);
+
m_glModel.Prepare(Context);
}
@@ -45,8 +61,8 @@ namespace TestApp {
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
- //Matrix4 modelview = Matrix4.LookAt(new Vector3(1000, 600, 1000), new Vector3(1000, 0, 0), Vector3.UnitY);
- Matrix4 modelview = Matrix4.LookAt(new Vector3(0, 2, 4), new Vector3(0, 0, 0), Vector3.UnitY);
+ Matrix4 modelview = Matrix4.LookAt(new Vector3(1000, 400, 1000), new Vector3(1000, 0, 0), Vector3.UnitY);
+ //Matrix4 modelview = Matrix4.LookAt(new Vector3(-3, 2, 3), new Vector3(0, 0, 0), Vector3.UnitY);
GL.MatrixMode(MatrixMode.Modelview);
GL.LoadMatrix(ref modelview);