OnLoad/OnUnload should be protected, not public, to conform with the class library design guidelines. This issue was supposed to be fixed in 0.9.9-2, but was apparently overlooked.

This commit is contained in:
the_fiddler 2009-10-21 13:33:00 +00:00
parent b92198bccc
commit 15cad88758
20 changed files with 21 additions and 21 deletions

View file

@ -64,7 +64,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.ClearColor(Color.MidnightBlue);
GL.Enable(EnableCap.DepthTest);

View file

@ -44,7 +44,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

View file

@ -36,7 +36,7 @@ namespace Examples.Tutorial
/// Setup OpenGL and load resources here.
/// </summary>
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.ClearColor(Color.MidnightBlue);
GL.Enable(EnableCap.Texture2D);

View file

@ -59,7 +59,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.Enable(EnableCap.Texture2D);

View file

@ -34,7 +34,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

View file

@ -46,7 +46,7 @@ namespace Examples.Tutorial
#region OnLoad override
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

View file

@ -120,7 +120,7 @@ void main(void)
GraphicsContextFlags.ForwardCompatible | GraphicsContextFlags.Debug)
{ }
public override void OnLoad (System.EventArgs e)
protected override void OnLoad (System.EventArgs e)
{
// Create shaders
vertexShaderHandle = GL.CreateShader(ShaderType.VertexShader);

View file

@ -52,7 +52,7 @@ namespace Examples.Tutorial
#endregion Randoms
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
if (!GL.GetString(StringName.Extensions).Contains("EXT_framebuffer_object"))
{

View file

@ -46,7 +46,7 @@ namespace Examples.Tutorial
int shaderProgram = 0;
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
if (!GL.GetString(StringName.Extensions).Contains("EXT_geometry_shader4"))
{

View file

@ -839,7 +839,7 @@ namespace Examples.Tutorial
#region overrides
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
if (!GL.GetString(StringName.Extensions).Contains("EXT_geometry_shader4"))
{

View file

@ -63,7 +63,7 @@ namespace Examples.Tutorial
/// Setup OpenGL and load resources here.
/// </summary>
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
// Check for necessary capabilities:
string version = GL.GetString(StringName.Version);

View file

@ -58,7 +58,7 @@ namespace Examples.Tutorial
/// check for GLSL support, and load the shaders.
/// </summary>
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
// Check for necessary capabilities:
string version = GL.GetString(StringName.Version);

View file

@ -61,7 +61,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

View file

@ -54,7 +54,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

View file

@ -42,7 +42,7 @@ namespace Examples.Tutorial
#region OnLoad
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.ClearColor(Color.MidnightBlue);

View file

@ -83,7 +83,7 @@ namespace Examples
/// Setup OpenGL and load resources here.
/// </summary>
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.ClearColor(Color.MidnightBlue);
}

View file

@ -54,7 +54,7 @@ namespace Examples.Tutorial
/// Setup OpenGL and load resources here.
/// </summary>
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.ClearColor(Color.MidnightBlue);
}

View file

@ -70,7 +70,7 @@ namespace Examples.Tests
TextBitmap.UnlockBits(data);
}
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
GL.ClearColor(Color.MidnightBlue);

View file

@ -293,7 +293,7 @@ namespace OpenTK
/// Called after an OpenGL context has been established, but before entering the main loop.
/// </summary>
/// <param name="e">Not used.</param>
public virtual void OnLoad(EventArgs e)
protected virtual void OnLoad(EventArgs e)
{
if (Load != null) Load(this, e);
}
@ -306,7 +306,7 @@ namespace OpenTK
/// Called after GameWindow.Exit was called, but before destroying the OpenGL context.
/// </summary>
/// <param name="e">Not used.</param>
public virtual void OnUnload(EventArgs e)
protected virtual void OnUnload(EventArgs e)
{
if (Unload != null) Unload(this, e);
}

View file

@ -21,7 +21,7 @@ namespace StarterKit
/// <summary>Load resources here.</summary>
/// <param name="e">Not used.</param>
public override void OnLoad(EventArgs e)
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);