Skip to content

Commit

Permalink
revert android TinyRender.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
vinsentli committed Dec 22, 2024
1 parent fd05374 commit d47579e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions shell/android/jni/TinyRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <android/native_window.h>
#if IGL_BACKEND_OPENGL
#include <igl/opengl/egl/HWDevice.h>
#include <igl/opengl/egl/Context.h>
#include <igl/opengl/egl/PlatformDevice.h>
#endif
#include <shell/shared/fileLoader/android/FileLoaderAndroid.h>
Expand Down Expand Up @@ -84,14 +83,12 @@ void TinyRenderer::init(AAssetManager* mgr,
#if IGL_BACKEND_OPENGL
case igl::BackendFlavor::OpenGL_ES: {
auto hwDevice = opengl::egl::HWDevice();
auto hwDevices = hwDevice.queryDevices(queryDesc, &result);
IGL_DEBUG_ASSERT(result.isOk());
// Decide which backend api to use, default as GLES3
auto backendType = (backendVersion_.majorVersion == 3) ? igl::opengl::RenderingAPI::GLES3
: igl::opengl::RenderingAPI::GLES2;

auto context = std::make_unique<igl::opengl::egl::Context>(backendType, (EGLNativeWindowType)nullptr, true);
IGL_DEBUG_ASSERT(result.isOk());
d = hwDevice.createWithContext(std::move(context), &result);
IGL_DEBUG_ASSERT(result.isOk());
d = hwDevice.create(hwDevices[0], backendType, nullptr, &result);
shellParams_.shouldPresent = false;
break;
}
Expand Down

0 comments on commit d47579e

Please sign in to comment.