How can I take screen shot of Glsurfaceview in Cocos2d. I tried with following code using GLsurfaceView
GlsurfaceView glv=CCDirector.sharedDirector().getOpenGLView();
glv.setDrawingCacheEnabled(true);
Bitmap bitmap=glv.getDrawingCache();
but it return transparent image.
Here is solution:
put the code under onDrawFrame(GL10 gl) method, IT WORKS!
I got answer from this anddev forum question I attached code along with this hope somebody will find this helpful
Please Put this code inside renderer class onDraw Method inside starting.