2 #include "oxygine-include.h" 4 #include "core/NativeTexture.h" 5 #include "core/Renderer.h" 17 flag_fullscreen = 1 << 1,
21 PostProcessOptions(
int flags = 0) : _flags(flags), _downscale(1), _clearColor(0, 0, 0, 0) {}
22 PostProcessOptions& fullscreen(
bool enable =
true) { _flags = enable ? (_flags | flag_fullscreen) : (_flags & (~flag_fullscreen));
return *
this; }
23 PostProcessOptions& singleRender(
bool enable =
true) { _flags = enable ? (_flags | flag_singleR2T) : (_flags & (~flag_singleR2T));
return *
this; }
42 static void initShaders();
43 static void freeShaders();
50 void update(
Actor* actor);
51 Rect getScreenRect(
const Actor& actor)
const;
55 TextureFormat _format;
66 virtual void addRefPP() = 0;
67 virtual void releaseRefPP() = 0;
68 virtual void renderPP() = 0;
79 void renderPP()
override;
80 void addRefPP()
override;
81 void releaseRefPP()
override;
83 void init(
Actor& actor)
override;
85 void done(
Actor& actor)
override;
87 virtual void _renderPP() {}
103 spNativeTexture
get(spNativeTexture current,
int w,
int h, TextureFormat tf);
109 bool isGood(
const spNativeTexture& t,
int w,
int h, TextureFormat tf)
const;
111 typedef std::vector<spNativeTexture> rts;
114 typedef std::vector<spNativeTexture> free;
118 void pass(spNativeTexture srcTexture,
const Rect& srcRect, spNativeTexture destTexture,
const Rect& destRect,
const Color& color = Color::White);
122 void updatePortProcessItems();
123 bool isRenderingPostProcessItems();
124 void addPostProcessItem(
PPTask*);
125 void removePostProcessItem(
PPTask*);
126 void clearPostProcessItems();
Definition: PostProcess.h:98
Definition: ShaderProgram.h:7
Definition: PostProcess.h:34
Definition: PostProcess.h:73
Definition: UpdateState.h:6
Definition: PostProcess.h:62
–oxgl-end–!
Definition: Actor.h:14
Definition: PostProcess.h:11