Browse Source

Merge branch 'master' of github.com:oxygine/oxygine-framework

dm 7 years ago
parent
commit
45a8eefaa2

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

@@ -358,7 +358,7 @@ namespace oxygine
         driver->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)
     {
     }
 
@@ -519,4 +519,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;
     };
 
 
@@ -127,4 +129,4 @@ namespace oxygine
     void addPostProcessItem(PPTask*);
     void removePostProcessItem(PPTask*);
     void clearPostProcessItems();
-}
+}

+ 1 - 0
oxygine/src/oxygine/oxygine-forwards.h

@@ -134,6 +134,7 @@ namespace oxygine
     class SingleResAnim;
     class Sprite;
     class TextField;
+    class TextStyle;
     class ThreadDispatcher;
     class TouchEvent;
     class Tween;