質問

I am using PixelBuffer class decribed here http://www.anddev.org/android-2d-3d-graphics-opengl-tutorials-f2/possible-to-do-opengl-off-screen-rendering-in-android-t13232.html. In my Renderer I use GLU.lookAt to view back face of a 3D object but PixelBuffer does not seem to return the buffer with back face but instead still shows Front face of the object. What might be causing this? Can this issue be solved?

役に立ちましたか?

解決

First of all, pbuffers are obsolete and not supported on Android devices with Nvidia Tegra GPUs. Android has built-in classes for offscreen rendering named TextureView and SurfaceTexture you should use or you can use an FBO. I have a collection of articles here which will help:

http://montgomery1.com/opengl/

I don't know what OpenGL ES driver you are running, but it probably only supports single-buffered pbuffers, so there is no back buffer.

Back faces is a different concept that depends on the winding direction of your triangles to allow back-face culling. It has nothing to do with off-screen rendering.

Update:

Adding a link to some sample code that shows how to copy a texture image into an Android Bitmap:

http://stackoverflow.com/questions/22683572/creating-a-bitmap-of-a-drawn-square-in-android-opengl-es-2-0/22693766#22693766
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top