mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
100
Brutal.Glfw/Generated/Libraries/Glfw.Native.Egl.gen.cs
Normal file
100
Brutal.Glfw/Generated/Libraries/Glfw.Native.Egl.gen.cs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Glfw.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.GlfwApi.Egl
|
||||
{
|
||||
/// <summary>
|
||||
/// Native handle accessors for the EGL context backend (cross-platform). Add <c>using Brutal.GlfwApi.Egl;</c> to
|
||||
/// call these extension methods on <see cref="GlfwWindow"/>.
|
||||
/// </summary>
|
||||
public static class EglExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the <c>EGLDisplay</c> used by GLFW.
|
||||
/// </summary>
|
||||
/// <returns>The <c>EGLDisplay</c> used by GLFW, or <c>EGL_NO_DISPLAY</c> (0) if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available when GLFW was built with EGL context support. Calling it otherwise will
|
||||
/// result in an <see cref="EntryPointNotFoundException"/>.
|
||||
/// <para>
|
||||
/// Because EGL is initialized on demand, this method will return <c>EGL_NO_DISPLAY</c> (0) until the first
|
||||
/// context has been created via EGL.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <possibleErrors>
|
||||
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
||||
/// </possibleErrors>
|
||||
/// <threadSafety>
|
||||
/// This function may be called from any thread. Access is not synchronized.
|
||||
/// </threadSafety>
|
||||
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetEGLDisplay</seealso>
|
||||
public static nint GetEGLDisplay() => Glfw.PInvoke.GetEGLDisplay();
|
||||
|
||||
extension(GlfwWindow window)
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the <c>EGLContext</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>EGLContext</c> of the specified window, or <c>EGL_NO_CONTEXT</c> (0) if an
|
||||
/// error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available when GLFW was built with EGL context support. Calling it otherwise
|
||||
/// will result in an <see cref="EntryPointNotFoundException"/>.
|
||||
/// </remarks>
|
||||
/// <possibleErrors>
|
||||
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.NoWindowContext"/>
|
||||
/// </possibleErrors>
|
||||
/// <threadSafety>
|
||||
/// This function may be called from any thread. Access is not synchronized.
|
||||
/// </threadSafety>
|
||||
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetEGLContext</seealso>
|
||||
public nint GetEGLContext() => Glfw.PInvoke.GetEGLContext(window);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <c>EGLSurface</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>EGLSurface</c> of the specified window, or <c>EGL_NO_SURFACE</c> (0) if an
|
||||
/// error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available when GLFW was built with EGL context support. Calling it otherwise
|
||||
/// will result in an <see cref="EntryPointNotFoundException"/>.
|
||||
/// </remarks>
|
||||
/// <possibleErrors>
|
||||
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.NoWindowContext"/>
|
||||
/// </possibleErrors>
|
||||
/// <threadSafety>
|
||||
/// This function may be called from any thread. Access is not synchronized.
|
||||
/// </threadSafety>
|
||||
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetEGLSurface</seealso>
|
||||
public nint GetEGLSurface() => Glfw.PInvoke.GetEGLSurface(window);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the <c>EGLConfig</c> of the specified window's <c>EGLSurface</c>.
|
||||
/// </summary>
|
||||
/// <param name="config">Receives the <c>EGLConfig</c> of the window's <c>EGLSurface</c>, if
|
||||
/// available.</param>
|
||||
/// <returns><c>true</c> if successful, or <c>false</c> if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available when GLFW was built with EGL context support. Calling it otherwise
|
||||
/// will result in an <see cref="EntryPointNotFoundException"/>.
|
||||
/// <para>
|
||||
/// <c>EGLConfig</c> is an opaque handle. GLFW leaves it unwritten on error, as core EGL defines no
|
||||
/// invalid value, so <c>config</c> is set to 0 before the call.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <possibleErrors>
|
||||
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.NoWindowContext"/>
|
||||
/// </possibleErrors>
|
||||
/// <threadSafety>
|
||||
/// This function may be called from any thread. Access is not synchronized.
|
||||
/// </threadSafety>
|
||||
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetEGLConfig</seealso>
|
||||
public bool GetEGLConfig(out nint config)
|
||||
{
|
||||
config = default;
|
||||
return Glfw.PInvoke.GetEGLConfig(window, out config) == GLFW_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue