using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpGL.Version;
namespace SharpGL.RenderContextProviders
{
///
/// Defines the contract for a type that can provide an OpenGL render context.
///
public interface IRenderContextProvider : IDisposable
{
///
/// Creates the render context provider. Must also create the OpenGL extensions.
///
/// The desired OpenGL version.
/// The OpenGL context.
/// The width.
/// The height.
/// The bit depth.
/// The extra parameter.
///
bool Create(OpenGLVersion openGLVersion, OpenGL gl, int width, int height, int bitDepth, object parameter);
///
/// Destroys the render context provider instance.
///
void Destroy();
///
/// Sets the dimensions of the render context provider.
///
/// Width.
/// Height.
void SetDimensions(int width, int height);
///
/// Makes the render context current.
///
void MakeCurrent();
///
/// Blit the rendered data to the supplied device context.
///
/// The HDC.
void Blit(IntPtr hdc);
///
/// Gets the render context handle.
///
IntPtr RenderContextHandle
{
get;
}
///
/// Gets the device context handle.
///
IntPtr DeviceContextHandle
{
get;
}
///
/// Gets or sets the width.
///
/// The width.
int Width
{
get;
}
///
/// Gets or sets the height.
///
/// The height.
int Height
{
get;
}
///
/// Gets or sets the bit depth.
///
/// The bit depth.
int BitDepth
{
get;
}
///
/// Gets a value indicating whether GDI drawing is enabled for this type of render context.
///
/// true if GDI drawing is enabled; otherwise, false.
bool GDIDrawingEnabled
{
get;
}
};
}