Monday, April 25, 2011

[android-developers] Re: Possible to use OpenGL in both C++ and Java?

Calling native functions for rendering from
GLSurfaceView.onDrawFrame() works.
Texture loading goes to onSurfaceCreated().

On Apr 23, 4:54 pm, Ash McConnell <ash.mcconn...@gmail.com> wrote:
> Hi Folks,
>
> I am new to Android coding.  I am trying to convert an iPhone app and
> would like to keep the core c++ code in tact if possible (so that bugs
> can be fixed in a cross platform way).
>
> I am currently using an extended GLSurfaceView to do rendering, I
> believe this uses a separate thread and therefore doing OpenGL stuff
> in C++ doesn't work.  I tried to load a texture in C++ and pass the id
> back to java, but it didn't work - the texture was blank.
>
> Should I be using an alternative to GLSurfaceView?  Is there a
> "normal" way of achieving what I am trying?
>
> Thanks for your help
> All the best,
> Ash

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate