Skip to content

zoozooll/LearnGLES

Repository files navigation

LearnGLES

An Android application demonstrating various OpenGL ES 3.0+ techniques, from basic rendering to advanced physically based rendering (PBR) and post-processing effects. This project is inspired by [L[...]

🚀 Features

The project is organized into several categories, each containing multiple tutorials:

🟢 Basic Techniques

  • Basic GLES: Introduction to shaders, textures, and transformations.
  • Model Loading: Loading complex 3D models using Assimp.
  • Cubemaps: Skyboxes and environment mapping.
  • Instancing: Efficiently rendering many instances of the same object (e.g., asteroids).
  • Blending & Depth/Stencil Testing: Handling transparency and complex visibility.
  • Geometry & Tessellation Shaders: Dynamic mesh modification on the GPU.
  • MSAA: Multi-sample anti-aliasing for smoother edges.
  • Text Rendering: Rendering high-quality text using FreeType or signed distance fields.
  • Frustum Culling: Optimizing performance by only rendering visible objects.
  • Skeletal Animation: Realistic character movement using bone-based animation.

💡 Lighting & Post-Processing

  • Basic Lighting: Phong and Blinn-Phong lighting models.
  • Multiple Lights: Handling various light types (directional, point, spotlights).
  • Shadow Mapping: Real-time shadow generation.
  • Gamma Correction & HDR: Improving color accuracy and dynamic range.
  • Bloom: Simulating the glow effect for bright lights.
  • SSAO: Screen-space ambient occlusion for realistic contact shadows.
  • Area Lights: Simulating light from rectangular sources.

💎 Physically Based Rendering (PBR)

  • PBR Theory: Implementation of the Cook-Torrance BRDF.
  • PBR Textures: Using albedo, normal, metallic, roughness, and AO maps.
  • IBL (Image Based Lighting): Realistic environment lighting using HDR maps.
  • Normal & Parallax Mapping: Adding fine surface details without increasing polygon count.

🔥 Advanced Techniques

  • Cascaded Shadow Maps (CSM): High-quality shadows for large-scale scenes.
  • Order Independent Transparency (OIT): Accurate rendering of overlapping transparent objects.
  • Direct State Access (DSA): Modern OpenGL techniques for better performance and cleaner code.

🛠 Tech Stack

  • Platform: Android
  • Language: Kotlin (UI), C++ (Rendering)
  • UI Framework: Jetpack Compose
  • Graphics API: OpenGL ES 3.0+
  • Build System: Gradle with CMake for C++
  • Key Libraries:

📁 Project Structure

  • tutorial/src/main/java: Kotlin source code for Android Activities and Compose UI.
  • tutorial/src/main/cpp: C++ source code for the OpenGL rendering engine and tutorial scenes.
  • tutorial/src/main/assets:
    • shaders: GLSL shader files for all tutorials.
    • objects: 3D models and geometry data.
    • textures: Image assets, including HDR cubemaps.
    • fonts: Font files for text rendering.

🔨 How to Build

  1. Clone the repository.
  2. Open the project in Android Studio (Ladybug or newer recommended).
  3. Ensure you have the NDK and CMake installed via the SDK Manager.
  4. Sync the project with Gradle files.
  5. Build and run the tutorial module on a device or emulator with GLES 3.0 support.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

This means you're free to use, modify, and distribute this project, as long as you include the original license and copyright notice.

Please also refer to the licenses of included third-party libraries for their respective terms:

  • Assimp: BSD 3-Clause License
  • GLM: Happy Bunny License (Modified MIT)
  • stb_image: Public Domain or MIT License
  • FreeType: FreeType License (BSD-like)

About

Tutorials of OpenGL ES on Android Demo Source Code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors