dmuratshin 9 سال پیش
والد
کامیت
cd5318b9cd
3فایلهای تغییر یافته به همراه11 افزوده شده و 4 حذف شده
  1. 1 1
      oxygine/src/core/NativeTexture.h
  2. 8 3
      oxygine/src/core/oxygine.cpp
  3. 2 0
      oxygine/src/core/oxygine.h

+ 1 - 1
oxygine/src/core/NativeTexture.h

@@ -20,7 +20,7 @@ namespace oxygine
         NativeTexture() {}
         virtual void init(nativeTextureHandle, int w, int h, TextureFormat tf) = 0;
         virtual void init(int w, int h, TextureFormat tf, bool renderTarget = false) = 0;
-        virtual void init(const ImageData& src, bool sysMemCopy) = 0;
+        virtual void init(const ImageData& src, bool sysMemCopy = false) = 0;
         //virtual void release() = 0;
 
         virtual ImageData lock(lock_flags, const Rect* src) = 0;

+ 8 - 3
oxygine/src/core/oxygine.cpp

@@ -226,6 +226,12 @@ namespace oxygine
 
         void init2();
 
+        void init0()
+        {
+            if (!_dispatcher)
+                _dispatcher = new EventDispatcher;
+        }
+
         void init(init_desc* desc_ptr)
         {
             Input::instance.__removeFromDebugList();
@@ -250,8 +256,7 @@ namespace oxygine
 
             log::messageln("build settings %s", t.c_str());
 
-            if (!_dispatcher)
-                _dispatcher = new EventDispatcher;
+            init0();
 
 
             log::messageln("initialize oxygine");
@@ -317,7 +322,7 @@ namespace oxygine
             }
 
             SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0);
-            SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);
+            //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);
             //SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
             SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
             SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);

+ 2 - 0
oxygine/src/core/oxygine.h

@@ -125,5 +125,7 @@ namespace oxygine
         };
 
         spEventDispatcher getDispatcher();
+
+		void init0();
     }
 }