Description:
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.
Implementation:
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.
Performance:
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.
Feedback:
This application is still under development. Any questions or comments are appreciated!
<a href="mailto:fragmentsapp@gmail.com">fragmentsapp@gmail.com</a>
</div> <div class="id-app-translated-desc" style="display:none">说明:
片段是一个演示应用程序的Android的Java实现一个自定义的OpenGL。
演示落后于你的手指,充满活力的,随机生成的飞机,当你将你的手指在屏幕上。
执行:
飞机上绘制的Android位图使用自定义编写的Java实现的OpenGL(SGL),斯坦福大学CS148 Graphics类。
每添加到画布上之前,随机的旋转和缩放矩阵压入到SGL堆栈。每架飞机是OpenGL调用一个“三角形带绘制一个正方形。”后飞机已经绘就,SGL状态恢复的随机变换,使新的属性,可以得出一个平面上。
使用分配的颜色的三角形带顶点的重心之间的内插计算的平方的着色。
在OpenGL / SGL实现,该演示展示了具有矩阵堆栈,顶点位置和颜色规格的三角图,重心插值,除其他功能完整的OpenGL API中的功能提供一个可用的部分。
性能:
重要提示:请注意,此演示应用程序是处理器密集型。它的目的是向人们展示了一个自定义的,从头开始构建的Java实现在Android平台上的OpenGL / SGL的可能性。由于它是用Java编写的,并不会使用的Java,NDK或使GPU的调用,这个应用程序可能有一个渲染延迟,并与弱的CPU的设备上运行速度较慢。
反馈:
此应用程序仍处于开发阶段。有任何问题或意见,是值得赞赏的!
<a href="mailto:fragmentsapp@gmail.com">fragmentsapp@gmail.com</a></div> <div class="show-more-end">