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!
fragmentsapp@gmail.com
</div> <div jsname="WJz9Hc" style="display:none">รายละเอียด:
เศษเป็นโปรแกรมการสาธิตที่กำหนดเอง OpenGL Java การดำเนินงานสำหรับ Android
การสาธิตเส้นทางนิ้วของคุณกับเครื่องบินที่สดใสสร้างขึ้นแบบสุ่มขณะที่คุณลากนิ้วของคุณผ่านหน้าจอ
การดำเนินงาน:
เครื่องบินจะมีการวาดเมื่อบิตแมป Android ใช้กำหนดเองดำเนินการเขียน Java ของ OpenGL (เรียกว่า SGL) สำหรับ Stanford ของ CS148 คลาส Graphics
ก่อนที่จะนอกเหนือไปจากผืนผ้าใบแต่ละเมตริกซ์การหมุนและปรับแบบสุ่มจะถูกผลักเข้าสู่สแตก SGL แต่ละลำเป็นตารางวาดด้วยสาย OpenGL ไป "แถบสามเหลี่ยม." หลังจากที่เครื่องบินได้รับการวาดรัฐ SGL มีการเรียกคืนจากการแปลงสุ่มเพื่อให้เครื่องบินที่มีคุณสมบัติใหม่ที่สามารถวาด
สีของสี่เหลี่ยมจะคำนวณโดยใช้การแก้ไข barycentric ระหว่างสีได้รับมอบหมายให้เป็นรูปสามเหลี่ยมแถบจุด
การดำเนินการตาม OpenGL / SGL ที่โชว์ผลงานการสาธิตนี้มีเมทริกซ์กองตำแหน่ง vertice และข้อกำหนดสีวาดรูปสามเหลี่ยมและการแก้ไข barycentric ในคุณสมบัติอื่น ๆ ที่จะให้ส่วนของคุณสมบัติ useable ในเต็ม OpenGL API
ประสิทธิภาพการทำงาน:
สำคัญ: โปรดทราบว่าใบสมัครของตัวอย่างนี้เป็นดำเนินการอย่าง มันมีความหมายที่จะแสดงความเป็นไปได้ของที่กำหนดเอง, รอยขีดข่วนที่สร้างขึ้นใช้งานจาวาของ OpenGL / SGL บนแพลตฟอร์ม Android เพราะมันถูกเขียนใน Java และไม่ได้ใช้ Java NDK หรือโทร GPU โปรแกรมนี้อาจมีความล่าช้าการแสดงผลและทำงานช้าลงในอุปกรณ์กับซีพียูที่อ่อนแอ
ข้อเสนอแนะ:
โปรแกรมนี้ยังอยู่ภายใต้การพัฒนา คำถามหรือความเห็นที่ชื่นชม!
fragmentsapp@gmail.com</div> <div class="show-more-end">