linux just queries libGL directly

This commit is contained in:
Matthew Leibowitz 2017-02-17 05:59:07 +04:00
Родитель 79c2d2041e
Коммит a9f97d405b
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -54,16 +54,12 @@ namespace SkiaSharp.Tests
WindowsDynamicLibraries.FreeLibrary(lib);
} else if (IsLinux) {
var lib = LinuxDynamicLibraries.dlopen("libGL.so.1", 1);
var glInterface = GRGlInterface.AssembleGlInterface((context, name) => {
return LinuxDynamicLibraries.dlsym(lib, name);
return glXGetProcAddress(name);
});
Assert.NotNull(glInterface);
Assert.True(glInterface.Validate());
LinuxDynamicLibraries.dlclose(lib);
} else {
// more platforms !!!
throw new Exception("Some strange platform that is not Windows, macOS nor Linux...");
@ -73,5 +69,8 @@ namespace SkiaSharp.Tests
[DllImport("opengl32.dll", CallingConvention = CallingConvention.Winapi)]
public static extern IntPtr wglGetProcAddress([MarshalAs(UnmanagedType.LPStr)] string lpszProc);
[DllImport("libGL.so.1")]
public static extern IntPtr glXGetProcAddress([MarshalAs(UnmanagedType.LPStr)] string lpszProc);
}
}