diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-24 15:38:07 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-24 15:38:07 +0000 |
commit | 00464c237fbd3a01137099dedf23dc44569472fd (patch) | |
tree | cc6ccf2bc4f8279b240ae20d4d26c4572029e083 /src/render | |
parent | 8017d60e4906a27c1dc82933593c3d5fd1c0bed4 (diff) |
surface flags: light
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/draw.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index dadd0fa..4295330 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -166,6 +166,22 @@ void draw_model_vertex(core::Entity *entity) } } +void draw_model_lvertex(core::Entity *entity) +{ + size_t count = entity->model()->lvertex_structural(); + if (entity->state()->detailvisible()) + count += entity->model()->lvertex_detail(); + + // draw model lvertices + if (count) { + gl::disable(GL_LIGHTING); + size_t index = entity->model()->first_lvertex(); + glDrawArrays(gl::Triangles, index, count); + Stats::tris += count/3; + gl::enable(GL_LIGHTING); + } +} + void draw_model_evertex(core::Entity *entity) { size_t count = entity->model()->evertex_structural(); @@ -180,6 +196,7 @@ void draw_model_evertex(core::Entity *entity) Stats::tris += count/3; } } + /* void draw_model_engines(core::EntityControlable *entity) { @@ -412,6 +429,7 @@ void draw_pass_model_vertex() gl::multmatrix(entity->state()->axis()); draw_model_vertex(entity); + draw_model_lvertex(entity); gl::pop(); } |