diff options
author | Stijn Buys <ingar@osirion.org> | 2008-12-27 10:45:25 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-12-27 10:45:25 +0000 |
commit | 64d5acb1ef4c9ffc870bdb9defd40864b5412235 (patch) | |
tree | 9f60f9dabba1713f9712071ed697141ecbb0d701 | |
parent | c88a565a23d1779795ebee7a2cba014b2d3ff9f3 (diff) |
added r_particles variable
-rw-r--r-- | src/render/draw.cc | 2 | ||||
-rw-r--r-- | src/render/render.cc | 4 | ||||
-rw-r--r-- | src/render/render.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index 02f2a7d..1b964b2 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -868,7 +868,7 @@ void draw_pass_model_fx(float elapsed) } // draw particle systems - if (ext_render(entity)->particles().size()) { + if (r_particles->value() && ext_render(entity)->particles().size()) { gl::end(); gl::disable(GL_CULL_FACE); diff --git a/src/render/render.cc b/src/render/render.cc index dcede48..7f6b02c 100644 --- a/src/render/render.cc +++ b/src/render/render.cc @@ -28,6 +28,7 @@ model::VertexArray *vertexarray = 0; core::Cvar *r_arraysize = 0; core::Cvar *r_bbox = 0; core::Cvar *r_grid = 0; +core::Cvar *r_particles = 0; core::Cvar *r_radius = 0; core::Cvar *r_sky = 0; core::Cvar *r_wireframe = 0; @@ -89,6 +90,9 @@ void init(int width, int height) r_sky = core::Cvar::get("r_sky", "1", core::Cvar::Archive); r_sky->set_info("[bool] render the sky globe"); + r_particles = core::Cvar::get("r_particles", "1", core::Cvar::Archive); + r_particles->set_info("[bool] render particles"); + Screenshot::screenshotformat = core::Cvar::get("screenshotformat", "jpg", core::Cvar::Archive); Screenshot::screenshotformat->set_info("[string] screenshot format: jpg png tga"); diff --git a/src/render/render.h b/src/render/render.h index 422e521..de881ff 100644 --- a/src/render/render.h +++ b/src/render/render.h @@ -39,10 +39,10 @@ namespace render { extern core::Cvar *r_arraysize; extern core::Cvar *r_bbox; extern core::Cvar *r_grid; + extern core::Cvar *r_particles; extern core::Cvar *r_radius; extern core::Cvar *r_sky; extern core::Cvar *r_wireframe; - extern model::VertexArray *vertexarray; |