Author Topic: Partial Screen Rendering  (Read 1480 times)

Offline Polomease

  • byte
  • *
  • Posts: 9
    • View Profile
Partial Screen Rendering
« on: December 18, 2010, 04:21:31 am »

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.



Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Partial Screen Rendering
« Reply #1 on: December 18, 2010, 12:59:08 pm »
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