-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
63 lines (50 loc) · 1020 Bytes
/
main.cpp
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "engine/Renderer.h"
#include "engine/DefaultFrame.h"
#include "engine/Pipeline.h"
#include "fluid.h"
#include "grass.h"
#include "particle.h"
class FluidPipeline final :public DefaultPipeline
{
FluidSimulator mFluidPass;
GrassPass mGrassPass;
ParticlePass mPartilePass;
public:
FluidPipeline()
{
mRenderSettingsWnd->visible = false;
mVisualizationWnd->visible = false;
mDebugInfo->visible = false;
mProfileWindow->visible = false;
}
void update() override
{
RenderGraph graph;
graph.begin() >> mFluidPass >> mGrassPass >> mPartilePass >> mGui >> mPresent;
graph.setup();
graph.compile();
graph.execute();
}
private:
};
class Frame final: public DefaultFrame
{
public:
void init()
{
DefaultFrame::init(false);
Renderer::getSingleton()->addSearchPath("shaders/");
pipeline.reset();
pipeline = decltype(pipeline)(new FluidPipeline);
Renderer::getSingleton()->setVSync(true);
}
};
int main()
{
{
Frame frame;
frame.init();
frame.update();
}
return 0;
}