Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with NDK #6

Closed
cristinabradea opened this issue May 8, 2014 · 1 comment
Closed

Working with NDK #6

cristinabradea opened this issue May 8, 2014 · 1 comment

Comments

@cristinabradea
Copy link

For the "GL Recorder" activity can the rendering be done in native C++ and use the rest of the implementation as is?

E.g:

GLES20.glBindFramebuffer(GL_FRAMBUFFER, javaFBO);
nativeRender(...);
GLES20.glBindFramebuffer(GL_FRAMEBUFFER, 0);
drawToScreen();

Great job on this sandbox, learning a lot from it!

Thanks,
Cristina

@fadden
Copy link
Contributor

fadden commented May 8, 2014

Yes.

The Android EGL/GLES Java-language implementation is a thin wrapper around the native implementation. All of the interesting state is in native thread-local storage. Whatever context and surface you set up from code written in Java will be used by the native rendering calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants