如何在GvrView Android surface上启用sRGB帧缓冲区?
有人知道在Google VR SDK的如何在GvrView Android surface上启用sRGB帧缓冲区?,android,opengl-es,android-ndk,google-cardboard,google-vr,Android,Opengl Es,Android Ndk,Google Cardboard,Google Vr,有人知道在Google VR SDK的GvrView上启用sRGB的方法吗 对于经典的GLSurfaceView,我使用了setEGLWindowSurfaceFactory,它工作得很好-见下文 据我所知,该表面工厂未被GvrView曝光,是否有任何解决方法或替代方法?通过NDK api 我在官方文件中找不到任何东西 view.setEGLWindowSurfaceFactory(mWindow_sRGB_SurfaceFactory); private final EGLWindowSur
GvrView
上启用sRGB的方法吗
对于经典的GLSurfaceView
,我使用了setEGLWindowSurfaceFactory
,它工作得很好-见下文
据我所知,该表面工厂未被GvrView
曝光,是否有任何解决方法或替代方法?通过NDK api
我在官方文件中找不到任何东西
view.setEGLWindowSurfaceFactory(mWindow_sRGB_SurfaceFactory);
private final EGLWindowSurfaceFactory mWindow_sRGB_SurfaceFactory = new EGLWindowSurfaceFactory() {
public EGLSurface createWindowSurface(EGL10 egl, EGLDisplay display,
EGLConfig config, Object nativeWindow) {
EGLSurface result = null;
final int EGL_GL_COLORSPACE_KHR = 0x309D;
final int EGL_GL_COLORSPACE_SRGB_KHR = 0x3089;
final int[] surfaceAttribs = {
EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR,
EGL10.EGL_NONE
};
result = egl.eglCreateWindowSurface(display, config, nativeWindow, surfaceAttribs);
...
}