• This repository has been archived on 19/Jul/2021
  • Stars
    star
    210
  • Rank 187,585 (Top 4 %)
  • Language
    C++
  • Created over 9 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample that shows how to combine native rendering with Java UI on Android

Android Native EGL example

This project demonstrates how to combine Java application with native C/C++ code for OpenGL rendering on Android 2.3 and newer. It shows how to do rendering without GLSurfaceView and GLSurfaceView.Renderer Java classes. The solution gives full control of the rendering for the native code while still allowing the convenience of using Java for calling Android APIs.

Java part of the sample application is responsible for the main UI and application lifecycle. It creates empty SurfaceView and passes that to the native code. Native code uses that for OpenGL rendering. The application is running standard Java activity and not the NativeActivity.

Native code starts a new thread using pthreads API to execute rendering code. It uses EGL API to set up rendering context for the thread.

screenshot

Requirements

Android API level 9 and Android NDK r5

Acknowledgments

The EGL setup code was adapted from Android NDK native-activity sample.

The OpenGL cube was adapted from Android SDK Graphics ApiDemos.

More Repositories

1

esp32-micropython-webcam

ESP32-CAM webcam with MicroPython
Python
147
star
2

docker-deb-builder

Tutorial on how to use Docker to build Debian packages
Shell
114
star
3

cpp-subprocess

popen() -like C++ library with iostream support for stdio forwarding
M4
88
star
4

avr-high-voltage-serial-programming

AVR high-voltage (HV) serial programming for ATtiny
C++
38
star
5

k8s-external-mdns

Expose Kubernetes services with mDNS
Dockerfile
23
star
6

docker-ejbca

Run EJBCA server in Docker container
Groff
20
star
7

certyaml

Declarative way to create x509 certificates for test environments.
Go
13
star
8

mqtt-micropython-smartsocket

Alternative firmware for Itead S20 WiFi Smart Socket
Python
4
star
9

devenvs

Java
4
star
10

ssh-subprocess

Python module that provides subprocess-like execution of commands over SSH
Python
3
star
11

x500dn

Convert string with X.500 distinguished name into pkix.Name.
Go
2
star
12

logstash-lumberjack-demo

Dockerfile
2
star
13

ir-remote-control-repeater

DYI IR remote control signal extender
C++
2
star
14

stm32f103-low-power-mbed

How to enable standby mode on STM32F1
C++
2
star
15

mcu-playground

Repository for some random experiments
C
1
star
16

tls-testapp

C
1
star
17

kubernetes-tcp-retransmit-retry-timeout

Go
1
star
18

docker-image-creator

Tool which creates CentOS / Fedora / Red Hat -style Docker base images using Docker itself
Shell
1
star
19

chrome-bookmark-browser-extension

Automatically exported from code.google.com/p/chrome-bookmark-browser-extension
JavaScript
1
star
20

shellymon

Realtime energy monitoring with Shelly Plug
Vue
1
star
21

stm32f103-minimal-template

Project template for barebones STM32F103C8
C++
1
star
22

vagrant-box-index

CGI script that creates index from Vagrant box metadata files
Python
1
star
23

java-certy

Java library for generating certificates for unit and integration tests.
Java
1
star
24

esp32-pictureframe

C
1
star
25

dyndns-function

Dynamically update Google Cloud DNS with given hostname and IP address
Go
1
star
26

vagrant-kubernetes

Run minimal Kubernetes cluster in Vagrant box
Shell
1
star
27

stm32f030-minimal-template

Project template for barebones STM32F030F4
C
1
star
28

cloud-playground

Repository for some random experiments
Shell
1
star
29

reloading-keystore

KeyStore for Java with certificate hot-reload and PEM file support
Java
1
star