OpenGL ES によるグラフィックの表示
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android フレームワークには、魅力的で機能的なグラフィカル ユーザー インターフェースを作成するための標準ツールが多数用意されています。ただし、アプリが画面上に描画する対象を詳細に制御したい場合や、3D グラフィックを試してみる場合は、別のツールを使用する必要があります。Android フレームワークによって提供される OpenGL ES API は、想像力にしか制限のないハイエンドのアニメーション グラフィックを表示するためのツールセットを提供します。また、多くの Android デバイスに搭載されているグラフィック プロセッシング ユニット(GPU)の高速化によるメリットも享受できます。
このクラスでは、セットアップ、オブジェクトの描画、描画された要素の移動、タップ入力への応答など、OpenGL を使用するアプリの開発の基本について説明します。
このクラスのサンプルコードでは、現在の Android デバイスで使用することが推奨される OpenGL ES 2.0 API を使用しています。OpenGL ES のバージョンについて詳しくは、OpenGL デベロッパー ガイドをご覧ください。
注: OpenGL ES 1.x API 呼び出しと OpenGL ES 2.0 メソッドを混在させないように注意してください。この 2 つの API は互換性がないため、組み合わせて使用しようとすると不満や悲しみが生じるだけです。
レッスン
- OpenGL ES 環境の構築
- Android アプリを設定して OpenGL グラフィックを描画できるようにする方法について説明します。
- 図形の定義
- シェイプを定義する方法と、面と曲がりについて知っておくべき理由を学びます。
- 図形の描画
- アプリ内で OpenGL シェイプを描画する方法について説明します。
- 投影とカメラビューの適用
- 投影とカメラビューを使用して、描画されたオブジェクトを新しい視点で捉える方法を学習します。
- モーションの追加
- OpenGL を使用して描画されたオブジェクトの基本的な移動とアニメーション化を行う方法について学習します。
- タップイベントへの応答
- OpenGL グラフィックを使用して基本的な操作を行う方法を学習します。
他のサンプルコード
NDK サンプルをダウンロードするには、NDK サンプルをご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-26 UTC。"],[],[],null,["# Displaying graphics with OpenGL ES\n\nThe Android framework provides plenty of standard tools for creating attractive, functional\ngraphical user interfaces. However, if you want more control of what your application draws on\nscreen, or are venturing into three dimensional graphics, you need to use a different tool. The\nOpenGL ES APIs provided by the Android framework offers a set of tools for displaying high-end,\nanimated graphics that are limited only by your imagination and can also benefit from the\nacceleration of graphics processing units (GPUs) provided on many Android devices.\n\nThis class walks you through the basics of developing applications that use OpenGL, including\nsetup, drawing objects, moving drawn elements and responding to touch input.\n\nThe example code in this class uses the OpenGL ES 2.0 APIs, which is the recommended API version\nto use with current Android devices. For more information about versions of OpenGL ES, see the\n[OpenGL developer\nguide](/develop/ui/views/graphics/opengl/about-opengl#choosing-version).\n\n**Note:** Be careful not to mix OpenGL ES 1.x API calls with OpenGL\nES 2.0 methods! The two APIs are not interchangeable and trying to use them together only results in\nfrustration and sadness.\n\nLessons\n-------\n\n**[Build an OpenGL ES environment](/develop/ui/views/graphics/opengl/environment)**\n: Learn how to set up an Android application to be able to draw OpenGL graphics.\n\n**[Define shapes](/develop/ui/views/graphics/opengl/shapes)**\n: Learn how to define shapes and why you need to know about faces and winding.\n\n**[Draw shapes](/develop/ui/views/graphics/opengl/draw)**\n: Learn how to draw OpenGL shapes in your application.\n\n**[Apply projection and camera views](/develop/ui/views/graphics/opengl/projection)**\n: Learn how to use projection and camera views to get a new perspective on your drawn\n objects.\n\n**[Add motion](/develop/ui/views/graphics/opengl/motion)**\n: Learn how to do basic movement and animation of drawn objects with OpenGL.\n\n**[Respond to touch events](/develop/ui/views/graphics/opengl/touch)**\n: Learn how to do basic interaction with OpenGL graphics.\n\nAdditional sample code\n----------------------\n\nTo download NDK samples, see\n[NDK Samples](https://github.com/googlesamples/android-ndk/)."]]