OpenGL ES API~ 一個最簡單的 GLSurfaceView 彩色立方體example

相對於windows的directX, Android 的3d是使用opengl es來對高性能3D圖形的support
OpenGL ES是一套為手持和嵌入式系統設計的3D引擎API
Android支持OpenGL ES1.0,即相當於OpenGL 1.3

OpenGL有自己的Surface --> GLSurfaceView
GLSurfaceView需要你註冊一個Renderder,它是GLSurfaceView.Renderer接口

在Android Sample Code > graphics - API Demos有範例程式
匯入 4個檔案:
GLSurfaceViewActivity.java
Cube.java
CubeRenderer.java
layout下的hello_world.xml
再修改AndroidManifest.xml
就可以run起來了,但run起來是簡單,要研究裡面的原理跟 api用法就是之後複雜的功夫了.


留言

這個網誌中的熱門文章

最爛的銀行服務-玉山銀行

Mark App Design Apps - Terms and Privacy Policy (服務條款,隱私權政策)

SMR疊瓦式hdd致命缺陷被解決????!!!

ios app 上架時app icon要注意事項

更改google drive預設存放目錄位置Change Google Drive Default Folder Location in Windows

google play 正式發布前測試報告...非常好用.

舊有app在Android 12 閃退問題& app Splash screens

app bundle and bundletool. 關於aab安裝問題

關於google play console app應用程式簽署

Google Play badge徽章產生器