Partial Screen Rendering

Started by Polomease, December 18, 2010, 04:21:31 AM

Previous topic - Next topic

Polomease


Hello, I'm new to the jPCT-AE framework and I been trying to figure out how to render a 3D scene to only part of the screen.

I would like to have a 3d view port surrounded by a 2d gui and not a 2d gui on top of a 3d scene.

I started with the Hello World demo found on the wiki - http://www.jpct.net/wiki/index.php/Hello_World_for_Android
And i have been trying to get it to render to only a part of the screen but i haven't been successful.

I have been looking through the docs and on this forum but haven't been able to figure out how to do this.

I found these two posts about rendering with different cameras and onto textures but i can't seem to get either one of these methods to work.

How to get a texture from a FrameBuffer
http://www.jpct.net/forum2/index.php/topic,1589.0.html

rearview mirror
http://www.jpct.net/forum2/index.php/topic,682.0.html

any help or "pointing in the right direction" would be appreciated.

Thanks.



raft

jPCT renders into GLSurfaceView. in demo GLSurfaceView is created by code and occupies all the screen (via setContentView(..) call). you can have different layouts where GLSurfaceView shares space with some other views.

have a look at: http://developer.android.com/guide/topics/ui/declaring-layout.html