Final touches before release.
This commit is contained in:
parent
815eb7ef55
commit
fe1d12d037
3 changed files with 10 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue