Author Topic: show layout after detected object  (Read 3419 times)

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
show layout after detected object
« on: June 30, 2015, 10:42:29 am »
Hi there
I use of vuforia and jpct.
I need when my object detected show a small layout on screen.
how can i do that?
help me please.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: show layout after detected object
« Reply #1 on: June 30, 2015, 12:09:12 pm »
What exactly do you mean by layout?

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: show layout after detected object
« Reply #2 on: June 30, 2015, 01:05:59 pm »
for example show a simple button

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: show layout after detected object
« Reply #3 on: June 30, 2015, 05:42:52 pm »
For a simple button and similar elements, just draw them into a texture and blit it onto the screen using the blit methods in FrameBuffer.

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: show layout after detected object
« Reply #4 on: July 01, 2015, 12:00:30 pm »
Thanks for your comment.
but can you tell me,how can I do that?(I mean draw button into texture)

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: show layout after detected object
« Reply #5 on: July 01, 2015, 12:13:09 pm »
excuse me,also I have an another question.
I want render a video in vuforia? but i can't find native sample for android.
can you help me,please.
Thanks

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: show layout after detected object
« Reply #6 on: July 01, 2015, 03:16:52 pm »
Onto a texture? Then this might help: http://www.jpct.net/forum2/index.php/topic,3794.0.html

(It's a rather long thread, but it should be possible to derive a solution from it.)

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: show layout after detected object
« Reply #7 on: July 01, 2015, 03:23:21 pm »
Thanks for you replay.
I got it,but can you answer my first question?(draw button into texture).
Thanks

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: show layout after detected object
« Reply #9 on: July 01, 2015, 03:42:57 pm »
um,sorry,my english not very well.
but my question is:how can I draw button into texture?
I'm new in vuforia/jpct.
« Last Edit: July 01, 2015, 03:45:21 pm by nima.sh23 »

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: show layout after detected object
« Reply #10 on: July 01, 2015, 04:00:43 pm »
I got it,I solved it.
Thanks a lot.
for the last question.
can I use ImageSwicher instead of object3D?
I need render a Image gallery.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: show layout after detected object
« Reply #11 on: July 02, 2015, 12:53:49 pm »
You can try to mix standard Android GUI/layout stuff with OpenGL output. Personally, I wouldn't do it, but that might be just a personal preference. If you do it that way, it's independent from jPCT-AE and this forum isn't the right place to ask for support.
The other option is stay within the OpenGL world, but that requires you to re-invent some stuff. For a simple button, you can create a texture that contains the button as an image and use one of the blit()-methods in FrameBuffer to draw it on screen.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: show layout after detected object
« Reply #12 on: July 02, 2015, 12:54:42 pm »
can I use ImageSwicher instead of object3D?
I need render a Image gallery.
Not sure what you mean? You want to combine the ImageSwitcher with Vuforia or what?