1Name 2 3 EGL_ANGLE_feature_control 4 5Name Strings 6 7 EGL_ANGLE_feature_control 8 9Contributors 10 11 Jonah Ryan-Davis (jonahr 'at' google.com) 12 13Contact 14 15 Jonah Ryan-Davis (jonahr 'at' google.com) 16 17Status 18 19 Draft 20 21Version 22 23 Version 1, May 23, 2019 24 25Number 26 27 EGL Extension #XXX 28 29Extension Type 30 31 EGL client extension 32 33Dependencies 34 35 This extension is written against the wording of the EGL 1.5 36 Specification. 37 38 EGL_EXT_device_query affects the definition of this extension. 39 40Overview 41 42 This extension adds two methods to query arrays holding 43 information about the available features for a given device. 44 One method is used to query the total count of available 45 features. Another method is used to query a string property 46 of an individual feature given the feature's index. 47 48IP Status 49 50 No known claims. 51 52New Types 53 54 None. 55 56New Procedures and Functions 57 58 const char *eglQueryStringiANGLE( 59 EGLDisplay dpy, 60 EGLint name, 61 EGLint index); 62 63 EGLBoolean eglQueryDisplayAttribANGLE( 64 EGLDisplay dpy, 65 EGLint attribute, 66 EGLAttrib *value); 67 68New Tokens 69 70 Accepted as a queried <name> in eglQueryStringiANGLE: 71 72 EGL_FEATURE_NAME_ANGLE 0x3460 73 EGL_FEATURE_CATEGORY_ANGLE 0x3461 74 EGL_FEATURE_STATUS_ANGLE 0x3464 75 76 Accepted as a queried <attribute> in eglQueryDisplayAttribANGLE 77 78 EGL_FEATURE_COUNT_ANGLE 0x3465 79 80 Accepted as an attribute name in the <attrib_list> argument of 81 eglGetPlatformDisplay 82 83 EGL_FEATURE_OVERRIDES_ENABLED_ANGLE 0x3466 84 EGL_FEATURE_OVERRIDES_DISABLED_ANGLE 0x3467 85 EGL_FEATURE_ALL_DISABLED_ANGLE 0x3469 86 87New Behavior 88 89 EGLDisplay eglGetPlatformDisplay(EGLenum platform, void 90 *native_display, const EGLAttrib *attrib_list); 91 92 The attribute following EGL_FEATURE_OVERRIDES_ENABLED_ANGLE or 93 EGL_FEATURE_OVERRIDES_DISABLED_ANGLE should be of type char**, 94 which should contain a null-terminated array of C strings naming 95 the features to be enabled or disabled upon display creation. 96 Any features unspecified in one of these arrays will be 97 initialized with an internal heuristic. 98 The attribute following EGL_FEATURE_ALL_DISABLED_ANGLE should be 99 either EGL_TRUE to disable all features that are not overridden, 100 or EGL_FALSE to let ANGLE determine which features to enable. 101 102Add the following to the end of section 3.3 "EGL Queries": 103 104 const char *eglQueryStringiANGLE(EGLDisplay dpy, 105 EGLint name, EGLint index); 106 107 eGLQueryStringiANGLE returns a pointer to a static, null- 108 terminated string describing some aspect of the EGL 109 implementation running on the specified display, from an array of 110 strings. name may be one of EGL_FEATURE_NAME_ANGLE, 111 EGL_FEATURE_CATEGORY_ANGLE, EGL_FEATURE_STATUS_ANGLE. Index 112 must be a valid index to access into the array of strings. 113 The EGL_FEATURE_NAME_ANGLE array contains strings that 114 describe the name of each feature available in the display. 115 The EGL_FEATURE_CATEGORY_ANGLE array contains strings 116 with corresponding indices to the array of names. Each string 117 describes the category of the feature at the specified index. 118 The EGL_FEATURE_STATUS_ANGLE array contains strings 119 with corresponding indices to the array of names. Each string has 120 the value "enabled" if the feature is currently enabled, or 121 "disabled" if the feature is currently disabled. 122 123 Errors 124 125 On failure, NULL is returned. 126 An EGL_BAD_DISPLAY error is generated if dpy is not a valid 127 display. 128 An EGL_BAD_PARAMETER error is generated if name is not one of the 129 values described above. 130 An EGL_BAD_PARAMETER error is generated if index is not within 131 the valid range of indices for the array. 132 133Add a section "3.4 Display Attributes" after "3.3 EGL Versioning" 134 135 To query attributes of an initialized display, use: 136 137 EGLBoolean eglQueryDisplayAttribANGLE(EGLDisplay dpy, 138 EGLint attribute, 139 EGLAttrib *value); 140 141 On success, EGL_TRUE is returned. 142 If <attribute> is EGL_FEATURE_COUNT_ANGLE, the total count of 143 available features is returned in <value>. 144 145 On failure, EGL_FALSE is returned. 146 An EGL_BAD_DISPLAY error is generated if dpy is not a valid 147 display. 148 An EGL_BAD_ATTRIBUTE error is generated if <attribute> is not a 149 valid value. 150 151Issues 152 153 None 154 155Revision History 156 157 Version 1, May 23, 2019 (Jonah Ryan-Davis) 158 - Initial Draft 159