From 968b8cca046c458843c26516d8bb261b16ded021 Mon Sep 17 00:00:00 2001 From: Ted Felix Date: Tue, 19 Jul 2022 08:30:32 -0400 Subject: [PATCH 1/2] Add comment explaining EGL version defaults. --- native-activity/app/src/main/cpp/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/native-activity/app/src/main/cpp/main.cpp b/native-activity/app/src/main/cpp/main.cpp index 090e601bf..76ed5f637 100644 --- a/native-activity/app/src/main/cpp/main.cpp +++ b/native-activity/app/src/main/cpp/main.cpp @@ -127,6 +127,10 @@ static int engine_init_display(struct engine* engine) { eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format); surface = eglCreateWindowSurface(display, config, engine->app->window, nullptr); + + /* A version of OpenGL has not been specified here. This will default to + * OpenGL 1.0. You will need to change this if you want to use the newer + * features of OpenGL like shaders. */ context = eglCreateContext(display, config, nullptr, nullptr); if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) { From 3eef78716f4c2ec7d8f9510adcbb83d035c1f2d2 Mon Sep 17 00:00:00 2001 From: Ted Felix Date: Tue, 19 Jul 2022 08:47:10 -0400 Subject: [PATCH 2/2] Fix typos in teapots sample doc. --- teapots/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/teapots/README.md b/teapots/README.md index b7cfc31f1..e18dc7ca4 100644 --- a/teapots/README.md +++ b/teapots/README.md @@ -1,13 +1,13 @@ # Teapots Teapots is an collection of Android C++ samples that uses a Teapot rendering to -demostrate Android NDK platform features: +demonstrate Android NDK platform features: - classic-teapot: Rendering classic teapot mesh using GLES 2.0 API and [NativeActivity](http://developer.android.com/reference/android/app/NativeActivity.html). - more-teapots: Rendering multiple instances of Classic Teapot with GLES 3.0 Instance Rendering -- choreographer-30fps: demonstrates multiple frame rate throttoling techniques +- choreographer-30fps: demonstrates multiple frame rate throttling techniques based on API level using Choreographer API and EGL Android presentation time extension. - textured-teapot: Rendering classic teapot plus textures @@ -18,7 +18,7 @@ This sample uses the new [Android Studio CMake plugin](http://tools.android.com/tech-docs/external-c-builds) with C++ support. -## Pre-requisites +## Prerequisites - Android Studio 4.0.0 with [NDK](https://developer.android.com/ndk/) - Android @@ -51,7 +51,7 @@ submitting a pull request through GitHub. Please see [CONTRIBUTING.md](../CONTRIBUTING.md) for more details. - [Stack Overflow](http://stackoverflow.com/questions/tagged/android-ndk) -- [Android Tools Feedbacks](http://tools.android.com/feedback) +- [Android Tools Feedback](http://tools.android.com/feedback) ## License