aboutsummaryrefslogtreecommitdiff
path: root/examples/particle_system/main.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-22 16:15:48 +0800
committerchai <chaifix@163.com>2018-11-22 16:15:48 +0800
commitcfa05003be67344fbc79c338c2ac82f0accd979d (patch)
tree3ed1fa8cdeaf6210b1fd6271f28af24ab41ee55a /examples/particle_system/main.cpp
parenta0a1e1609fd65c2fe103cfe5a4532b7ccd492c7f (diff)
*修改argc
Diffstat (limited to 'examples/particle_system/main.cpp')
-rw-r--r--examples/particle_system/main.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/particle_system/main.cpp b/examples/particle_system/main.cpp
index 9251cc4..6ab3448 100644
--- a/examples/particle_system/main.cpp
+++ b/examples/particle_system/main.cpp
@@ -21,24 +21,24 @@ Shader* shader;
Sprite* spr;
const char* shader_code = R"(
#VERTEX_SHADER
-Vertex vert(Vertex v)
-{
- return v;
-}
+ Vertex vert(Vertex v)
+ {
+ return v;
+ }
#END_VERTEX_SHADER
#FRAGMENT_SHADER
-Color frag(Color col, Texture tex, Vertex v)
-{
- Color c = texel(tex, v.uv);
- return c * col;
-}
+ Color frag(Color col, Texture tex, Vertex v)
+ {
+ Color c = texel(tex, v.uv);
+ return c * col;
+ }
#END_FRAGMENT_SHADER
)";
const float Pi = 3.14f;
void onLoad()
{
tex = Texture::createTexture("texture.png");
- spr = new Sprite(tex, Sprite::Origin::BottomCenter);
+ spr = new Sprite(tex, Origin::BottomCenter);
shader = Shader::createShader(shader_code);
ParticleSystemDef def;
def.maxParticleCount = 30;