summaryrefslogtreecommitdiff
path: root/Runtime/Camera/Renderable.h
blob: ed56577a87289ea9d86934d686023ce8bc4249e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef RENDERABLE_H
#define RENDERABLE_H

class RenderTexture;
namespace Unity { class Component; }
struct CullResults;

class Renderable {
public:
	virtual void RenderRenderable (const CullResults& cullResults) = 0;
};

typedef void RenderImageFilterFunc (Unity::Component* component, RenderTexture* source, RenderTexture* dest);

struct ImageFilter
{
	Unity::Component* component;
	RenderImageFilterFunc* renderFunc;

	bool transformsToLDR;
	bool afterOpaque;

	ImageFilter (Unity::Component* inComponent, RenderImageFilterFunc* inRenderFunc, bool inLDR, bool inAfterOpaque)
		: component(inComponent), renderFunc(inRenderFunc), afterOpaque(inAfterOpaque),  transformsToLDR(inLDR){ }

	bool operator==(const ImageFilter& o) const { return component==o.component && renderFunc==o.renderFunc; }
	bool operator!=(const ImageFilter& o) const { return component!=o.component || renderFunc!=o.renderFunc; }
};

#endif