www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: nsnatraj on July 10, 2012, 08:21:56 am

Title: Help creating architect walk through
Post by: nsnatraj on July 10, 2012, 08:21:56 am
I am creating a POC for a architect walkthrough on android using game engine. I came across JPCT and trying out some things. But I am not able to
Any pointers to how to do it would be very much appreciated.
Title: Re: Help creating architect walk through
Post by: EgonOlsen on July 10, 2012, 04:04:43 pm
jPCT is a 3D engine, not a GUI toolkit. If you want to add buttons, either use the means provided by Android itself or create your own button implementation by blitting some texture data containing the button images on screen and evaluate the current touch position to see if it got pressed.
Title: Re: Help creating architect walk through
Post by: nsnatraj on July 12, 2012, 06:04:42 am
I added the buttons in the Android code but they are not shown on the UI. I had used the HelloWorld example and in the layout\main.xml file I added two buttons but when I run the project if does not show the buttons. so I tried adding a overlay,  but the overylay image is covering the whole screen. :(

Can you let me know how and where the worldspace is inserted in the UI by jPCT?
Title: Re: Help creating architect walk through
Post by: EgonOlsen on July 12, 2012, 07:20:01 am
The Overlay covers the whole screen if you say that it should. If you don't want that, give it other coordinates. The Android-button-thingy is solely an Android issue and i can't comment on this. I'm only using the means that Android provides to render GL output into. It's out of the scope of the engine and this forum to handle mixing of Android's GUI components with that output...how and if...

Quote
Can you let me know how and where the worldspace is inserted in the UI by jPCT?
...no idea what this is supposed to mean... ???
Title: Re: Help creating architect walk through
Post by: nsnatraj on July 12, 2012, 01:14:06 pm
sorry went through the android documentation  ;D and found that when OpenGL renders it takes what ever screen space is available.  ;D

I did set other coordinates using "setSourceCoordinates" but no use  :(.

Am I right or am I missing something?
Title: Re: Help creating architect walk through
Post by: EgonOlsen on July 12, 2012, 09:46:54 pm
...or am I missing something?
Yes, this: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/util/Overlay.html#Overlay(com.threed.jpct.World, int, int, int, int, java.lang.String) (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/util/Overlay.html#Overlay(com.threed.jpct.World, int, int, int, int, java.lang.String))
Title: Re: Help creating architect walk through
Post by: nsnatraj on July 13, 2012, 08:41:51 am
Thanks.. its working.  ;D

I was using "Overlay(World world, FrameBuffer buffer, java.lang.String textureName) "