Last change
on this file since 2956 was
2956,
checked in by ldelgass, 12 years ago
|
First batch of converting shaders to use new parameter support in NvShader?.
|
-
Property svn:eol-style set to
native
|
File size:
997 bytes
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | #ifndef NV_PARTICLE_ADV_SHADER_H |
---|
3 | #define NV_PARTICLE_ADV_SHADER_H |
---|
4 | |
---|
5 | #include "Vector3.h" |
---|
6 | #include "NvShader.h" |
---|
7 | |
---|
8 | class NvParticleAdvectionShader : public NvShader |
---|
9 | { |
---|
10 | public: |
---|
11 | NvParticleAdvectionShader(); |
---|
12 | |
---|
13 | virtual ~NvParticleAdvectionShader(); |
---|
14 | |
---|
15 | virtual void bind(unsigned int texID, unsigned int initPosTexID); |
---|
16 | |
---|
17 | virtual void unbind(); |
---|
18 | |
---|
19 | void setScale(const Vector3& scale) |
---|
20 | { |
---|
21 | _scale = scale; |
---|
22 | } |
---|
23 | |
---|
24 | void setVelocityVolume(unsigned int texID, float max) |
---|
25 | { |
---|
26 | _velocityVolumeID = texID; |
---|
27 | _max = max; |
---|
28 | // FIXME: Is this needed? |
---|
29 | if (_max > 100.f) |
---|
30 | _max = 100.0f; |
---|
31 | } |
---|
32 | |
---|
33 | void setTimeStep(float timeStep) |
---|
34 | { |
---|
35 | _timeStep = timeStep; |
---|
36 | } |
---|
37 | |
---|
38 | void setRenderMode(int mode) |
---|
39 | { |
---|
40 | _mode = mode; |
---|
41 | } |
---|
42 | |
---|
43 | private: |
---|
44 | void init(); |
---|
45 | |
---|
46 | unsigned int _velocityVolumeID; |
---|
47 | Vector3 _scale; |
---|
48 | float _max; |
---|
49 | float _timeStep; |
---|
50 | int _mode; |
---|
51 | }; |
---|
52 | |
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.