Explorar o código

Merge remote-tracking branch 'origin/master' into dev

# Conflicts:
#	oxygine/src/oxygine/PostProcess.h
dm %!s(int64=7) %!d(string=hai) anos
pai
achega
24087c2231
Modificáronse 2 ficheiros con 6 adicións e 4 borrados
  1. 2 2
      oxygine/src/oxygine/PostProcess.cpp
  2. 4 2
      oxygine/src/oxygine/PostProcess.h

+ 2 - 2
oxygine/src/oxygine/PostProcess.cpp

@@ -393,7 +393,7 @@ namespace oxygine
         rsCache().setTexture(0, 0);
     }
 
-    PostProcess::PostProcess(const PostProcessOptions& opt) : _options(opt), _format(TF_R4G4B4A4), _extend(2, 2)
+    PostProcess::PostProcess(const PostProcessOptions& opt) : _options(opt), _format(opt._format), _extend(2, 2)
     {
     }
 
@@ -554,4 +554,4 @@ namespace oxygine
             _actor->setRenderDelegate(_prevMaterial);
     }
 
-}
+}

+ 4 - 2
oxygine/src/oxygine/PostProcess.h

@@ -19,18 +19,20 @@ namespace oxygine
             flag_fixedBounds = 1 << 3,
         };
 
-        PostProcessOptions(int flags = 0) : _flags(flags), _downscale(1), _clearColor(0, 0, 0, 0) {}
+        PostProcessOptions(int flags = 0) : _flags(flags), _downscale(1), _clearColor(0, 0, 0, 0), _format(TF_R4G4B4A4) {}
         PostProcessOptions& fullscreen(bool enable = true) { _flags = enable ? (_flags | flag_fullscreen) : (_flags  & (~flag_fullscreen)); return *this; }
         PostProcessOptions& singleRender(bool enable = true) { _flags = enable ? (_flags | flag_singleR2T) : (_flags  & (~flag_singleR2T)); return *this; }
         //loops -(2, 3, 4, ...),  final size: 2^loops
         PostProcessOptions& downscale(int loops = 2) { _downscale = loops; return *this; }
         PostProcessOptions& clear(const Color& c) { _clearColor = c; return *this; }
         PostProcessOptions& fixedBounds(const RectF& b) { _fixedBounds = b; _flags |= flag_fixedBounds; return *this; }
+        PostProcessOptions& format(TextureFormat tf) { _format = tf; return *this; }
 
         int _flags;
         int _downscale;
         RectF _fixedBounds;
         Color _clearColor;
+        TextureFormat _format;
     };
 
 
@@ -131,4 +133,4 @@ namespace oxygine
     void removePostProcessItem(PPTask*);
     void clearPostProcessItems();
     int getNumPostProcessItem();
-}
+}