dmuratshin 9 years ago
parent
commit
aa8e8b7b9a

+ 2 - 2
examples/Demo/proj.cmake/CMakeLists.txt

@@ -6,7 +6,7 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OXYGINE_CXX_FLAGS}")
 add_executable(Demo ../src/Counter.cpp ../src/example.cpp ../src/main.cpp ../src/test.cpp  ../src/Counter.h ../src/TestAlphaHitTest.h ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestColorFont.h ../src/TestCounter.h ../src/TestDrag.h ../src/TestEdges.h ../src/TestHttp.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestPolygon.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTouches.h ../src/TestTweenPostProcessing.h ../src/TestTweenShine.h ../src/TestTweenText.h ../src/TestTweens.h ../src/TestUserShader.h ../src/TestUserShader2.h ../src/example.h ../src/test.h )
 target_link_libraries(Demo ${OXYGINE_CORE_LIBS})
 
@@ -20,7 +20,7 @@ endif(WIN32)
 
 if (EMSCRIPTEN)
 	SET(CMAKE_EXECUTABLE_SUFFIX ".html")
-	set(linkFlags "${linkFlags} -s NO_EXIT_RUNTIME=1 -s FULL_ES2=1 -s WARN_ON_UNDEFINED_SYMBOLS=1 --memory-init-file 0 -s TOTAL_MEMORY=50331648")
+	set(linkFlags "${linkFlags} -s NO_EXIT_RUNTIME=1  -s WARN_ON_UNDEFINED_SYMBOLS=1 --memory-init-file 0 -s TOTAL_MEMORY=50331648")
 
 	set_target_properties(Demo PROPERTIES LINK_FLAGS "${linkFlags}")
 

+ 9 - 16
examples/Demo/src/main.cpp

@@ -68,7 +68,7 @@ void run()
     getStage()->setSize(size);
 
     // DebugActor is a helper actor node. It shows FPS, memory usage and other useful stuff
-    DebugActor::show();
+    //DebugActor::show();
 
     // Initializes our example game. See example.cpp
     example_init();
@@ -138,9 +138,12 @@ int main(int argc, char* argv[])
 
 #include "SDL_main.h"
 #include "SDL.h"
+
 extern "C"
 {
     void one(void* param) { mainloop(); }
+    void oneEmsc() { mainloop(); }
+
     int main(int argc, char* argv[])
     {
 
@@ -151,21 +154,11 @@ extern "C"
         SDL_iPhoneSetAnimationCallback(core::getWindow(), 1, one, nullptr);
 #endif
 
+#if EMSCRIPTEN
+        emscripten_set_main_loop(oneEmsc, 0, 0);
+#endif
+
         return 0;
     }
 };
-#endif
-
-
-#ifdef EMSCRIPTEN
-#include <emscripten.h>
-
-void one() { mainloop(); }
-
-int main(int argc, char* argv[])
-{
-    run();
-    emscripten_set_main_loop(one, 0, 0);
-    return 0;
-}
-#endif
+#endif

+ 1 - 1
oxygine/SDL/android/extension/build.gradle

@@ -11,7 +11,7 @@ apply plugin: 'com.android.library'
 
 android {
         compileSdkVersion 23
-  		buildToolsVersion '23.0.2'
+  		buildToolsVersion '23.0.3'
 
         sourceSets {
             main {

+ 5 - 0
oxygine/src/core/NativeTexture.cpp

@@ -82,6 +82,11 @@ namespace oxygine
 
     }
 
+    void NativeTextureNull::setClamp2Edge(bool clamp2edge)
+    {
+
+    }
+
     void NativeTextureNull::setLinearFilter(bool enable)
     {
 

+ 3 - 0
oxygine/src/core/NativeTexture.h

@@ -56,6 +56,7 @@ namespace oxygine
         void unlock();
         void swap(NativeTexture*);
 
+        void setClamp2Edge(bool clamp2edge);
         void setLinearFilter(bool enable);
         void updateRegion(int x, int y, const ImageData& data);
         void apply(const Rect* rect = 0);
@@ -65,5 +66,7 @@ namespace oxygine
         int getWidth() const;
         int getHeight() const;
         TextureFormat getFormat() const;
+
+        void* _getRestorableObject() { return 0; }
     };
 }