I need to add the EGL_RECORDABLE_ANDROID attribute to the existing OpenGL context. Is it possible to get the list of the current attributes for the current context and add the extra attribute to the list?
Asked
Active
Viewed 413 times
0
1 Answers
0
You cannot modify the attributes of a context once it has been created. However, you can query the attributes of the context using eglGetConfigAttrib
(this actually is stated in the extension documentation for EGL_ANDROID_recordable. If you want a context with this attribute set, you will have to create one (eg. with eglCreateContext
).

MuertoExcobito
- 9,741
- 2
- 37
- 78
-
Thanks for your reply.I have a view derived from GLSurfaceView in which I render the camera preview. I need to record the camera preview to a video file. I'm now thinking of creating a second context with android_recordable attribute and render the same preview texture in both contexts. Is this possible? – user2021070 Jun 03 '15 at 13:12
-
I'm not sure about creating multiple contexts on Android, although it's kind of a separate question. I haven't tried it, and there are several unanswered questions asking this (eg. http://stackoverflow.com/questions/29605757/how-to-create-multiple-opengl-es-redering-contexts-in-android). However, I'm not sure why you wouldn't just create one context in your case - does the EGL_RECORDABLE_ANDROID attribute negatively affect the context in some way? – MuertoExcobito Jun 03 '15 at 16:35