• This repository has been archived on 19/Jul/2021
  • Stars
    star
    209
  • Rank 182,885 (Top 4 %)
  • Language
    C++
  • Created about 9 years ago
  • Updated over 8 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
142
star
2

docker-deb-builder

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

cpp-subprocess

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

avr-high-voltage-serial-programming

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

k8s-external-mdns

Expose Kubernetes services with mDNS
Dockerfile
24
star
6

docker-ejbca

Run EJBCA server in Docker container
Groff
19
star
7

certyaml

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

mqtt-micropython-smartsocket

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

devenvs

Java
3
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

stm32f103-minimal-template

Project template for barebones STM32F103C8
C++
1
star
20

vagrant-box-index

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

esp32-pictureframe

C
1
star
22

java-certy

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

dyndns-function

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

vagrant-kubernetes

Run minimal Kubernetes cluster in Vagrant box
Shell
1
star
25

stm32f030-minimal-template

Project template for barebones STM32F030F4
C
1
star
26

cloud-playground

Repository for some random experiments
Shell
1
star