diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-03 21:04:02 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-03 21:04:02 +0000 |
commit | 82293065b52f5a4e5c4ccde5eade4ebae18014ca (patch) | |
tree | 254f1fa3259f03f033b3d1fd225742a12de167b1 /src/render/draw.cc | |
parent | 5388c37bdc040ba50d21ec16a01f399d20592a90 (diff) |
liibmodel
Diffstat (limited to 'src/render/draw.cc')
-rw-r--r-- | src/render/draw.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index 2938442..5627ac6 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -8,7 +8,7 @@ #include <iomanip> #include "core/core.h" -#include "core/model.h" +#include "model/model.h" #include "render/render.h" #include "render/textures.h" #include "render/draw.h" @@ -67,10 +67,10 @@ void draw_sphere(math::Color const & color, float radius) gl::color(color); size_t index = 0; - size_t count = (core::SPHERESEGMENTS+1)*2; + size_t count = (model::SPHERESEGMENTS+1)*2; // draw body - for (int j=0; j < core::SPHERESEGMENTS-1; j++) { + for (int j=0; j < model::SPHERESEGMENTS-1; j++) { glDrawArrays(gl::QuadStrip, index, count); index += count; Stats::quads += count/2-1; @@ -186,13 +186,13 @@ void draw_model_evertex(core::Entity *entity) void draw_model_engines(core::EntityControlable *entity) { - core::Model *model = entity->model(); + model::Model *model = entity->model(); if (model->model_engine.size() && entity->thrust()) { gl::color(1.0f, 0.0f ,0.0f, 1.0f); gl::begin(gl::Lines); - for (std::list<core::Engine *>::iterator eit = model->model_engine.begin(); eit != model->model_engine.end(); eit++) { + for (std::list<model::Engine *>::iterator eit = model->model_engine.begin(); eit != model->model_engine.end(); eit++) { math::Vector3f const & v = (*eit)->location(); gl::vertex(v); gl::vertex(v.x - 0.0625f*entity->thrust(), v.y, v.z); @@ -260,13 +260,13 @@ void pass_visibility() // load entity models if necessary if (!entity->model() && entity->modelname().size()) { - entity->entity_model = core::Model::get(entity->modelname()); + entity->entity_model = model::Model::get(entity->modelname()); if (!entity->model()) { entity->entity_modelname.clear(); } else { - for (std::list<core::Light *>::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { - core::Light *light = (*lit); + for (std::list<model::Light *>::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { + model::Light *light = (*lit); // load flare texture std::stringstream flarename; @@ -408,7 +408,7 @@ void draw_pass_model_lights() if (test_drawfx_distance(entity) && (entity->model()->model_light.size())) { - for (std::list<core::Light *>::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { + for (std::list<model::Light *>::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { // strobe frequency float t = 1.0f; if ((*lit)->strobe()) |