Skip to content

Commit

Permalink
Add comment explaining EGL version defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
tedfelix authored and DanAlbert committed Apr 16, 2024
1 parent c07738e commit faeda26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions native-activity/app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit faeda26

Please sign in to comment.