• Apple iOS 5 or later in iPad, iPad Mini, iPhone 3GS or later, and iPod Touch 3rd generation or later • BlackBerry devices with BlackBerry OS 7.0 and Blackberry 10, as well as the BlackBerry PlayBook • Google Native Client • Various Nokia phones (such as Symbian^3 based Nokia N8, MeeGo based Nokia N9, and Maemo based Nokia N900[24]) • Palm webOS, using the Plug-in Development Kit • The Pandora console • The Raspberry Pi • The Odroid • Various Samsung mobile phones (such as the Wave) • Web browsers (WebGL) • The GCW Zero console
u_MVPMatrix; \n" // A constant representing the combined model/view/projection matrix. + "attribute vec4 a_Position; \n" // Per-vertex position information we will pass in. + "attribute vec4 a_Color; \n" // Per-vertex color information we will pass in. + "varying vec4 v_Color; \n" // This will be passed into the fragment shader. + "void main() { \n" // The entry point for our vertex shader. + " v_Color = a_Color; \n" // Pass the color through to the fragment shader. // It will be interpolated across the triangle. + " gl_Position = u_MVPMatrix \n" // gl_Position is special var used to store final position + " * a_Position; \n" // Multiply the vertex by the matrix to get the final point in + "} \n"; // normalized screen coordinates.
medium p float; \n" // Set default precision to medium. // We don't need high // precision in the fragment shader. + "varying vec4 v_Color; \n" // The color from the vertex shader // interpolated across the // triangle per fragment. + "void main() { \n" // The entry point for our fragment shader. + " gl_FragColor = v_Color; \n" // Pass color directly through the pipeline. + "}
fragment shader together into a program • Setting the perspective projection • Drawing stuff to the screen! http://www.learnopengles.com/android-lesson-one-getting-start ed/
Desktop, Android, HTLM5 та iOS (за допомогою RoboVM) • Чудова продуктивність • Відмінна документація, велика спільнота • Всі основні можливості 2D та 3D ігр • Дружня ліцензія (Apache 2.0) – можна вільно використовувати для комерційних додатків
• void dispose() // При завершенні програми • void pause() // пауза • void resume() // відновлення роботи • void render() // малювання екрану • void resize(int width, int height) // зміна видимої області