complete open/save project including layer names, in layout bring canvas to background and use translucent UI on top, save computation on Android with lazy rendering on events only

This commit is contained in:
2017-05-01 19:35:58 +01:00
parent c691595767
commit 3ea3fadc46
7 changed files with 61 additions and 38 deletions

View File

@@ -28,9 +28,10 @@ android {
// Sets a flag to enable format macro constants for the C++ compiler.
//cppFlags "-D__STDC_FORMAT_MACROS"
arguments '-DANDROID_PLATFORM=android-19',
'-DANDROID_TOOLCHAIN=clang',
'-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=gnustl_static',
'-DCMAKE_BUILD_TYPE=Debug'
'-DCMAKE_BUILD_TYPE=Release',
'-DANDROID_ARM_NEON=TRUE'
}
}
ndk {

View File

@@ -604,12 +604,14 @@ void android_main(struct android_app* state) {
// If not animating, we will block forever waiting for events.
// If animating, we loop until all events are read, then continue
// to draw the next frame of animation.
while ((ident=ALooper_pollAll(engine.animating ? 0 : -1, NULL, &events,
bool used = false;
while (!used && (ident=ALooper_pollAll(-1, NULL, &events,
(void**)&source)) >= 0) {
// Process this event.
if (source != NULL) {
source->process(state, source);
used = true;
}
// If a sensor has data, process it now.
@@ -632,7 +634,8 @@ void android_main(struct android_app* state) {
}
}
if (engine.animating) {
//if (engine.animating)
{
// Done with events; draw next animation frame.
engine.state.angle += .01f;
if (engine.state.angle > 1) {