Stay organized with collections
Save and categorize content based on your preferences.
EGLWindowSurfaceFactory
interface EGLWindowSurfaceFactory
An interface for customizing the eglCreateWindowSurface and eglDestroySurface calls.
This interface must be implemented by clients wishing to call GLSurfaceView.setEGLWindowSurfaceFactory(EGLWindowSurfaceFactory)
Summary
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# GLSurfaceView.EGLWindowSurfaceFactory\n\nAdded in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nEGLWindowSurfaceFactory\n=======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/opengl/GLSurfaceView.EGLWindowSurfaceFactory \"View this page in Java\") \n\n```\ninterface EGLWindowSurfaceFactory\n```\n\n|-----------------------------------------------------------|\n| [android.opengl.GLSurfaceView.EGLWindowSurfaceFactory](#) |\n\nAn interface for customizing the eglCreateWindowSurface and eglDestroySurface calls.\n\nThis interface must be implemented by clients wishing to call [GLSurfaceView.setEGLWindowSurfaceFactory(EGLWindowSurfaceFactory)](/reference/kotlin/android/opengl/GLSurfaceView#setEGLWindowSurfaceFactory(android.opengl.GLSurfaceView.EGLWindowSurfaceFactory))\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [EGLSurface](../../javax/microedition/khronos/egl/EGLSurface.html#)! | [createWindowSurface](#createWindowSurface(javax.microedition.khronos.egl.EGL10,%20javax.microedition.khronos.egl.EGLDisplay,%20javax.microedition.khronos.egl.EGLConfig,%20kotlin.Any))`(`egl:` `[EGL10](../../javax/microedition/khronos/egl/EGL10.html#)!`, `display:` `[EGLDisplay](../../javax/microedition/khronos/egl/EGLDisplay.html#)!`, `config:` `[EGLConfig](../../javax/microedition/khronos/egl/EGLConfig.html#)!`, `nativeWindow:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` \u003cbr /\u003e |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [destroySurface](#destroySurface(javax.microedition.khronos.egl.EGL10,%20javax.microedition.khronos.egl.EGLDisplay,%20javax.microedition.khronos.egl.EGLSurface))`(`egl:` `[EGL10](../../javax/microedition/khronos/egl/EGL10.html#)!`, `display:` `[EGLDisplay](../../javax/microedition/khronos/egl/EGLDisplay.html#)!`, `surface:` `[EGLSurface](../../javax/microedition/khronos/egl/EGLSurface.html#)!`)` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### createWindowSurface\n\nAdded in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun createWindowSurface(\n egl: EGL10!, \n display: EGLDisplay!, \n config: EGLConfig!, \n nativeWindow: Any!\n): EGLSurface!\n```\n\n| Return ||\n|----------------------------------------------------------------------|--------------------------------------------|\n| [EGLSurface](../../javax/microedition/khronos/egl/EGLSurface.html#)! | null if the surface cannot be constructed. |\n\n### destroySurface\n\nAdded in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun destroySurface(\n egl: EGL10!, \n display: EGLDisplay!, \n surface: EGLSurface!\n): Unit\n```"]]