Need some GUI help

Started by adenaman, May 20, 2012, 11:38:00 AM

Previous topic - Next topic

adenaman

Hi
Im a new user of this engine and i lack a lot of experience with grafic engines or android development, but i want to thank you for this engine and say that its easier to use than expected ( at least till now xD)
I have some questions to you:

- user GUI: i want to have my world in the background that is represented in the camera and over this i would like to have a 2dWorld with the user interface, those are some buttons or some text panel , in some guides that i saw ppl used blit() but that is only some pixel painting , i would like to know if there are something more advanced.

- is there some way to know at what point of the 3dObject i have clicked, at what object but and where at that object

Thank you

EgonOlsen

To answer your questions:


  • jPCT-AE is a 3d engine. It's not a GUI toolkit. There's no direct support for anything GUI-related. I guess most people rely on blit and use somekind of homebrew GUI classes
  • Yes. It's possible to detect the point in space where the clicked hits the object and it's also possible to get the polygon that you've hit. It depends which information you actually need!?

adenaman

One of my problems is that i dont know what to expect from the device capacity

1. If i find any 2d engine / GUI toolkit can i try to post-render the screen with another engine, and the most important, it will be stable and fast enought?

2. what im trying to do is some kind of chess game, and i need to know where on the table did the player clicked to move, i can create every box like a new object or all the board like 1 object and then calculate where he want to move. If i want to make it shine where is possible to move then i should to it separately?

Thank you

adenaman

One more thing, is there any way to keep some pixels without a need to draw them evey frame? i mean at the moment i am painitg the whole screen no matter if it changes or not, i think android has something for this invalidate() but can i use it here?

EgonOlsen

No. You have to redraw it in each iteration of onDrawFrame. You can however control if onDrawFrame should be called in fixed intervalls (default) or only when the surface is decleared dirty. See GLSurfaceView.setRenderMode(...) for more details.