From fe1d12d03730c0a1976a5a0a3d7260770638b790 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 11 Nov 2007 21:48:00 +0000 Subject: [PATCH] Final touches before release. --- Source/Examples/Tutorial/T07_Display_Lists_Flower.cs | 11 +++++------ Source/Examples/Tutorial/Textures.cs | 8 ++++---- Source/Examples/WinForms/W02_Immediate_Mode_Cube.cs | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Source/Examples/Tutorial/T07_Display_Lists_Flower.cs b/Source/Examples/Tutorial/T07_Display_Lists_Flower.cs index 4380ee05..c49343ff 100644 --- a/Source/Examples/Tutorial/T07_Display_Lists_Flower.cs +++ b/Source/Examples/Tutorial/T07_Display_Lists_Flower.cs @@ -28,12 +28,12 @@ namespace Examples.Tutorial { #region --- Fields --- - const int num_lists = 9; + const int num_lists = 13; int[] lists = new int[num_lists]; #endregion - #region --- Constructors --- + #region --- Constructor --- public T07_Display_Lists_Flower() : base(new DisplayMode(800, 600)) @@ -46,7 +46,7 @@ namespace Examples.Tutorial public override void OnLoad(EventArgs e) { - GL.ClearColor(0.1f, 0.1f, 0.5f, 0.0f); + GL.ClearColor(Color.SteelBlue); GL.Enable(EnableCap.DepthTest); GL.MatrixMode(MatrixMode.Modelview); @@ -60,7 +60,8 @@ namespace Examples.Tutorial lists[i] = first_list + i; GL.NewList(first_list + i, ListMode.Compile); - GL.Color3(1.0, c, 1 - c); + GL.Color3(0.3 + 0.7 * c * c, 0.3 + 1.4 * c * c, 0.7 - 0.7 * c * c); + c += 1 / (float)num_lists; GL.PushMatrix(); @@ -79,8 +80,6 @@ namespace Examples.Tutorial GL.PopMatrix(); GL.EndList(); - - c += 1 / (float)num_lists; } } diff --git a/Source/Examples/Tutorial/Textures.cs b/Source/Examples/Tutorial/Textures.cs index d28e1200..5bb992df 100644 --- a/Source/Examples/Tutorial/Textures.cs +++ b/Source/Examples/Tutorial/Textures.cs @@ -26,7 +26,7 @@ namespace Examples.Tutorial [Example("Texture mapping", ExampleCategory.Tutorial, 5)] public class Textures : GameWindow { - Bitmap bitmap = new Bitmap("Data/logo-dark.jpg"); + Bitmap bitmap = new Bitmap("Data/logo.jpg"); int texture; public Textures() : base(new DisplayMode(800, 600)) { } @@ -48,10 +48,10 @@ namespace Examples.Tutorial GL.BindTexture(TextureTarget.Texture2d, texture); BitmapData data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), - ImageLockMode.ReadOnly, bitmap.PixelFormat); + ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); - GL.TexImage2D(TextureTarget.Texture2d, 0, PixelInternalFormat.Three, bitmap.Width, bitmap.Height, 0, - OpenTK.OpenGL.Enums.PixelFormat.Bgr, PixelType.UnsignedByte, data.Scan0); + GL.TexImage2D(TextureTarget.Texture2d, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0, + OpenTK.OpenGL.Enums.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0); bitmap.UnlockBits(data); diff --git a/Source/Examples/WinForms/W02_Immediate_Mode_Cube.cs b/Source/Examples/WinForms/W02_Immediate_Mode_Cube.cs index fba07ac3..17aa8784 100644 --- a/Source/Examples/WinForms/W02_Immediate_Mode_Cube.cs +++ b/Source/Examples/WinForms/W02_Immediate_Mode_Cube.cs @@ -54,7 +54,7 @@ namespace Examples.WinForms GL.GetString(StringName.Renderer) + " " + GL.GetString(StringName.Version); - GL.ClearColor(Color.MidnightBlue); + GL.ClearColor(Color.SteelBlue); GL.Enable(EnableCap.DepthTest); Application.Idle += Application_Idle;