* EglWindowInfo.cs: Corrected error checking for
CreateWindowSurface. Fixes issue [#2248]: "EGL CreateWindowSurface function is incorrect".
This commit is contained in:
parent
a964d3a9de
commit
d22c7312d9
1 changed files with 5 additions and 3 deletions
|
@ -73,9 +73,11 @@ namespace OpenTK.Platform.Egl
|
|||
public void CreateWindowSurface(IntPtr config)
|
||||
{
|
||||
Surface = Egl.CreateWindowSurface(Display, config, Handle, null);
|
||||
int error = Egl.GetError();
|
||||
if (error != Egl.SUCCESS)
|
||||
throw new GraphicsContextException(String.Format("[Error] Failed to create EGL window surface, error {0}.", error));
|
||||
if (Surface==IntPtr.Zero)
|
||||
{
|
||||
throw new GraphicsContextException(String.Format(
|
||||
"[Error] Failed to create EGL window surface, error {0}.", Egl.GetError()));
|
||||
}
|
||||
}
|
||||
|
||||
//public void CreatePixmapSurface(EGLConfig config)
|
||||
|
|
Loading…
Reference in a new issue