我要从一个主界面中,获取其中的一个子窗口如图中的人物镜(surfaceview)显示的内容保存成图片!他是一个摄像镜头所显示的动态的图像。朋友说可以用opengl 中glreadpixels 方法实现 。但是我按照网上的方法进行操作结果只是获取整个页面显示的图像,子窗口内容全为黑黑的一片。 所以想请问一下怎么取得该子窗口surfaceview的缓冲数据???谢谢
以下是我初始化EGL的代码,是哪些参数用得不对吗还是?请大神指点,感激不尽!
public static GL10 gl;
private int[] version = new int[2];
EGLConfig[] configs = new EGLConfig[1];
int[] num_config = new int[1];
//EglchooseConfig used this config
int[] configSpec ={
EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
EGL10.EGL_RED_SIZE, 8,
EGL10.EGL_GREEN_SIZE, 8,
EGL10.EGL_BLUE_SIZE, 8,
EGL10.EGL_ALPHA_SIZE, 8,
EGL10.EGL_NONE
};
//eglCreatePbufferSurface used this config
i
以下是我初始化EGL的代码,是哪些参数用得不对吗还是?请大神指点,感激不尽!
public static GL10 gl;
private int[] version = new int[2];
EGLConfig[] configs = new EGLConfig[1];
int[] num_config = new int[1];
//EglchooseConfig used this config
int[] configSpec ={
EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
EGL10.EGL_RED_SIZE, 8,
EGL10.EGL_GREEN_SIZE, 8,
EGL10.EGL_BLUE_SIZE, 8,
EGL10.EGL_ALPHA_SIZE, 8,
EGL10.EGL_NONE
};
//eglCreatePbufferSurface used this config
i