Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="9" />
<uses-sdk android:minSdkVersion="31" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
Expand All @@ -16,6 +16,7 @@

<activity android:name="android.app.NativeActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

<meta-data android:name="android.app.lib_name"
Expand Down
4 changes: 2 additions & 2 deletions a.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ if not exist .keystore (
if ERRORLEVEL 1 exit /b 1
)

"%JAVA_JDK%\bin\jarsigner.exe" -storepass android -keystore .keystore bin\%APK%.build androiddebugkey >nul
"%ANDROID_SDK%\build-tools\%BUILD_TOOLS%\zipalign.exe" -f 4 bin\%APK%.build bin\%APK%
if ERRORLEVEL 1 exit /b 1

"%ANDROID_SDK%\build-tools\%BUILD_TOOLS%\zipalign.exe" -f 4 bin\%APK%.build bin\%APK%
call "%JAVA_JDK%\bin\java" -jar "%ANDROID_SDK%\build-tools\%BUILD_TOOLS%\apksigner.jar" sign --ks .keystore --ks-key-alias androiddebugkey --ks-pass pass:android bin\%APK%
if ERRORLEVEL 1 exit /b 1

del /q bin\%APK%.build
Expand Down
4 changes: 2 additions & 2 deletions jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# https://developer.android.com/ndk/guides/application_mk.html

NDK_TOOLCHAIN_VERSION := clang
APP_PLATFORM := android-10
APP_PLATFORM := android-31
APP_OPTIM := release
APP_ABI := armeabi-v7a # arm64-v8a x86
APP_ABI := x86_64 # armeabi-v7a # arm64-v8a x86

#APP_CFLAGS :=
#APP_CPPFLAGS :=
Expand Down
6 changes: 3 additions & 3 deletions jni/main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <jni.h>
#include <string.h>

#include <EGL/egl.h>
#include <GLES2/gl2.h>
Expand Down Expand Up @@ -168,7 +169,8 @@ static void engine_draw_frame(struct engine* engine)
return;
}

glClearColor(0.258824f, 0.258824f, 0.435294f, 1);
// glClearColor(0.258824f, 0.258824f, 0.435294f, 1);
glClearColor(1, 1, 1, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glUseProgram(engine->shader);
Expand Down Expand Up @@ -243,8 +245,6 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd)

void android_main(struct android_app* state)
{
app_dummy();

struct engine engine;
memset(&engine, 0, sizeof(engine));

Expand Down