Fragments is a demo application for a custom OpenGL Java implementation for Android.
The demo trails your finger with vibrant, randomly generated planes as you drag your finger across the screen.
The planes are drawn on an Android bitmap using a custom written Java implementation of OpenGL (called SGL) for Stanford's CS148 Graphics class.
Before each addition to the canvas, a random rotation and scaling matrix is pushed onto the SGL stack. Each plane is a square drawn with OpenGL calls to a "triangle strip." After a plane has been drawn, the SGL state is restored from the random transformations so that a plane with new properties can be drawn.
The coloring of the squares is calculated using barycentric interpolation between assigned colors to the triangle strip vertices.
The OpenGL/SGL implementation that this demo showcases features a matrix stack, vertice position and color specification, triangle drawing, and barycentric interpolation, among other features to provide a useable portion of the features in the full OpenGL API.
IMPORTANT: Please note that this demo application is PROCESSOR INTENSIVE. It is meant to showcase the possibility of a custom, scratch-built Java implementation of OpenGL/SGL on the Android platform. Since it is written in Java and does not utilize the Java NDK or make GPU calls, this application may have a rendering delay and run SLOWER on devices with weak CPUs.
This application is still under development. Any questions or comments are appreciated!