TSdlEgl
For working with OpenGL in SDL.
Definition
Unit: Neslib.Sdl3.Video
Methods
Name | Description |
---|---|
GetProcAddress | Get an EGL library function by name. |
SetAttributeCallbacks | Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization. |
Method Descriptions
GetProcAddress(String)
Get an EGL library function by name.
If an EGL library is loaded, this function allows applications to get entry points for EGL functions. This is useful to provide to an EGL API and extension loader.
class function GetProcAddress(const AProc: String): Pointer; inline; static
Parameters
AProc
: String
: The name of an EGL function.
Returns
Pointer
: A pointer to the named EGL function. The returned pointer should be cast to the appropriate function signature.
See Also
Remarks
This method should only be called on the main thread.
SetAttributeCallbacks(TSdlEglAttribArrayCallback, TSdlEglIntArrayCallback, TSdlEglIntArrayCallback)
Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization.
Callbacks that aren't needed can be set to nil
.
NOTE: These callback pointers will be reset after TSdlGL.ResetAttributes.
class procedure SetAttributeCallbacks(const APlatformAttribCallback: TSdlEglAttribArrayCallback; const ASurfaceAttribCallback, AContextAttribCallback: TSdlEglIntArrayCallback); static
Parameters
APlatformAttribCallback
: TSdlEglAttribArrayCallback
: Callback for attributes to pass to eglGetPlatformDisplay. May be nil.
ASurfaceAttribCallback
: TSdlEglIntArrayCallback
: Callback for attributes to pass to eglCreateSurface. May be nil.
AContextAttribCallback
: TSdlEglIntArrayCallback
: Callback for attributes to pass to eglCreateContext. May be nil.
Remarks
This method should only be called on the main thread.