How to start and stop drawing the texture etc upon some event in android application?

Tagged: ,

This topic contains 11 replies, has 3 voices, and was last updated by  Guillem Vinals Gangolells 3 years, 8 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #31613

    I am trying to draw a 3d model when my application detects an image that is scanned with the camera. I cannot figure out how to draw the 3d model on top of the camera view.

    #38406

    dgu
    Member

    you mean doing some augmented reality stuff ?

    #38407

    Yes. I want the 3d model to be drawn only when a certain image is detected. I have the image detection part working. But I cant figure out how to draw the 3d model on the image.

    #38408

    dgu
    Member

    because the Ndk is hardware specific , you cannot access it throught jni easily , so you need to use java ,there is a lot of sample in the Android sdk first of all and here

    http://blog.tomgibara.com/post/173247788/java-image-processing-code
    http://nhenze.net/?p=253

    for IOs
    http://chimera.labs.oreilly.com/books/1234000001814/ch05.html#ch05_id36001796

    there is thousand of samples out there and approach.

    regards
    david

    #38409

    I have the image detection part working. It detects the image i train. Now i want to start drawing 3d models on that image using the powervr sdk. the problem is that the powervr sdk uses nativeActivity approach and will always be initialised when the applicaiton starts and not when my image is detected.

    #38410

    dgu
    Member

    sure the sdk provide gles samples ,you can develop an observer and bind it using JNI to inform your native part or java part , the ShellOSImpl part need to be a bit customized but i am sure it will be not a prob for you.
    The Jni is the not fun part but there is a lot of samples on the web or book about ndk and java intercommunication

    #38411

    I cannot seem to find any ShellOSImpl.cpp i can only find the PVRShellImpl.h in the shell directory

    #38412

    dgu
    Member

    PowerVR/GraphicsSDK/SDK_3.2/Shell/OS/Android

    and most important
    the doc
    PowerVR/GraphicsSDK/SDK_3.2/Shell/Documentation/html/index.html

    #38413

    is there any specific function i can call from my own native class to start the rendering of the 3d model with powervr?

    #38414

    dgu
    Member

    i would recommend to read the shell documentation and the lifecycle if the application about the rendering

    #38415

    Can you tell me where the android_main() function is present. android_app_glue will be calling the android_main() to start running the native code. I cannot find any implementation of android_main()

    #38416

    Hi,

    The android_main() function can be found in the OS dependant part of PVRShell. That is the file /path/to/SDK/Shell/OS/Android/PVRShellOS.cpp.

    Cheers,
    Guillem

Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.