diff options
author | Stijn Buys <ingar@osirion.org> | 2009-05-06 19:01:42 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-05-06 19:01:42 +0000 |
commit | 3dde787b2546958072e8a98350335b2bab6d1c17 (patch) | |
tree | 788ab92dcc575d83291baa33cd4698bf2be5a768 /src/render/render.cc | |
parent | ada263d9924c9014b445d0b855f52f1ef75d39dd (diff) |
added r_mipmap variable to enable hardware generated mimaps
Diffstat (limited to 'src/render/render.cc')
-rw-r--r-- | src/render/render.cc | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/render/render.cc b/src/render/render.cc index 9f364cb..60d64a7 100644 --- a/src/render/render.cc +++ b/src/render/render.cc @@ -35,6 +35,7 @@ core::Cvar *r_particles = 0; core::Cvar *r_radius = 0; core::Cvar *r_sky = 0; core::Cvar *r_wireframe = 0; +core::Cvar *r_mipmap = 0; void func_list_textures(std::string const &args) { @@ -62,21 +63,6 @@ void init(int width, int height) // initialize render state State::init(width, height); - if (!State::has_generate_mipmaps()) { - con_print << " no hardware generated mipmap support" << std::endl; - } - - Camera::init(); - - Textures::init(); - - Text::init(); - - Dust::init(); - - // read materials - model::Material::init(); - // size of the vertex array in megabytes r_arraysize = core::Cvar::get("r_arraysize", 64.0f , core::Cvar::Archive); r_arraysize->set_info("[int] size of the vertex array in Mb"); @@ -114,6 +100,24 @@ void init(int width, int height) Screenshot::screenshotquality = core::Cvar::get("screenshotquality", "85", core::Cvar::Archive); Screenshot::screenshotquality->set_info("[int] screenshot jpg quality"); + // hardware generate mipmaps + r_mipmap = core::Cvar::get("r_mipmap", "0", core::Cvar::Archive); + r_mipmap->set_info("[bool] use hardware generated mipmaps"); + if (!State::has_generate_mipmaps()) { + con_print << " no hardware generated mipmap support" << std::endl; + } + + Camera::init(); + + Textures::init(); + + Text::init(); + + Dust::init(); + + // read materials + model::Material::init(); + // engine functions core::Func *func = core::Func::add("list_textures", func_list_textures); func->set_info("list registered textures"); |