Added more OpenGL delegates, and restructured game manager.
Largely untested.
This commit is contained in:
parent
1a2ef5a109
commit
fb9bbdd123
@ -10,5 +10,8 @@ namespace SlatedGameToolkit.Framework.Graphics.OpenGL
|
||||
internal delegate void GLCompileShader(IntPtr shaderHandle);
|
||||
internal delegate void GLGetShaderLogInfo(IntPtr shaderHandle, int maxLength, out int writtenLength, out string output);
|
||||
internal delegate IntPtr GLCreateProgram();
|
||||
internal delegate IntPtr GLDeleteProgram();
|
||||
internal delegate void GLAttachShader(IntPtr program, IntPtr shader);
|
||||
internal delegate void GLDetachShader(IntPtr program, IntPtr shader);
|
||||
internal delegate void GLDeleteShader(IntPtr shader);
|
||||
}
|
@ -111,7 +111,7 @@ namespace SlatedGameToolkit.Framework.StateSystem
|
||||
if (states[name] == currentState) return false;
|
||||
IState state = states[name];
|
||||
GameEngine.Logger.Debug("Removing state: " + name);
|
||||
state.Dispose();
|
||||
state.Deinitialize();
|
||||
return states.Remove(name);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ using SlatedGameToolkit.Framework.Graphics.Window;
|
||||
|
||||
namespace SlatedGameToolkit.Framework.StateSystem.States
|
||||
{
|
||||
public interface IState : IDisposable
|
||||
public interface IState
|
||||
{
|
||||
WindowHandle CurrentWindow { get; }
|
||||
|
||||
@ -55,5 +55,11 @@ namespace SlatedGameToolkit.Framework.StateSystem.States
|
||||
/// </summary>
|
||||
/// <return>A string representing the name of this state.</return>
|
||||
string getName();
|
||||
|
||||
/// <summary>
|
||||
/// Called when this state is being removed from the manager, and likely not used again in this games life cycle.
|
||||
/// Any unmanaged resources that needs to be disposed of should be done so here.
|
||||
/// </summary>
|
||||
void Deinitialize();
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ namespace SlatedGameToolkit.Tools.Utilities.GraphicalPlayground
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
public void Deinitialize()
|
||||
{
|
||||
window.Dispose();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user