glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
[context presentRenderbuffer:GL_RENDERBUFFER_OES];
how to replace the presentRenderbuffer function in android?
Thanks for the help
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
On Mar 5, 12:28 pm, Brad LaFountain <blafount...@gmail.com> wrote:
> All of the buffer swaping is done for you, you can't really control it. You
> have to draw in a callback from android. Take a look at the sample
> 'san-angeles' from the ndk demo.
>
> public void onDrawFrame(GL10 gl);
>
> Also, you will want to read about the opengl view: GLSurfaceView (http://developer.android.com/reference/android/opengl/GLSurfaceView.h...
> )
>
> On Fri, Mar 5, 2010 at 12:19 AM, sleith <raysle...@gmail.com> wrote:
> > Hi, i want to port an iphone application, and found out that they use
> > this function to render:
>
> > glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
> > [context presentRenderbuffer:GL_RENDERBUFFER_OES];
>
> > how to replace the presentRenderbuffer function in android?
> > Thanks for the help
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to andro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
On Mar 5, 1:17 pm, Brad LaFountain <blafount...@gmail.com> wrote:
> Correct.
>
> > <android-ndk%2Bunsu...@googlegroups.com<android-ndk%252Buns...@googlegroups.com>
> > > > > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > > <android-ndk%2Bunsu...@googlegroups.com<android-ndk%252Bunsubscribe@goo glegroups.com>
>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-ndk?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "android-ndk" group.
> > > To post to this group, send email to andro...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
As it stands now, if you were to just implement some JNI function that
called into your NDK application in the
GLSurfaceView.Renderer.onDrawFrame function, then the native code
executed would be running on the OpenGL thread (which is created by
the GLSurfaceView utility class).
You can see the complete implementation of the GLSurfaceView class
here: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=opengl/java/android/opengl/GLSurfaceView.java;hb=HEAD
The OpenGL commands in the Java SDK are JNI calls themselves (this
much has been confirmed by an ndk developer on this group), so there
shouldn't be much to it. As far as I am aware, however, it is not
possible to completely move OpenGL into native code: The rendering
context must still be created in Java (and all of the related fun,
such as responding to pause and resume events). However, simply moving
the eglSwapBuffers into native code should be trivial.
As it stands now, if you were to just implement some JNI function that
called into your NDK application in the
GLSurfaceView.Renderer.onDrawFrame function, then the native code
executed would be running on the OpenGL thread (which is created by
the GLSurfaceView utility class).
You can see the complete implementation of the GLSurfaceView class
here: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=opengl/java/android/opengl/GLSurfaceView.java;hb=HEAD
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
On Mar 10, 11:46 pm, Brad LaFountain <blafount...@gmail.com> wrote:
> On Wed, Mar 10, 2010 at 11:24 PM, Devnull <rekd...@gmail.com> wrote:
> > The OpenGL commands in the Java SDK are JNI calls themselves (this
> > much has been confirmed by an ndk developer on this group), so there
> > shouldn't be much to it. As far as I am aware, however, it is not
> > possible to completely move OpenGL into native code: The rendering
> > context must still be created in Java (and all of the related fun,
> > such as responding to pause and resume events). However, simply moving
> > the eglSwapBuffers into native code should be trivial.
>
> > As it stands now, if you were to just implement some JNI function that
> > called into your NDK application in the
> > GLSurfaceView.Renderer.onDrawFrame function, then the native code
> > executed would be running on the OpenGL thread (which is created by
> > the GLSurfaceView utility class).
>
> Right, this is how we're all doing it. I thought you were saying something
> different. As i understand it though, the ndk doesn't provide native library
> for the egl calls.
>
>
>
> > You can see the complete implementation of the GLSurfaceView class
> > here:
> >http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_...
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.