Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/draw.cc18
-rw-r--r--src/render/render.cc8
-rw-r--r--src/render/render.h4
3 files changed, 16 insertions, 14 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())
diff --git a/src/render/render.cc b/src/render/render.cc
index 589dce3..8c4f0fb 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -26,7 +26,9 @@ core::Cvar *r_radius = 0;
core::Cvar *r_wireframe = 0;
core::Cvar * r_arraysize = 0;
-core::VertexArray *vertexarray = 0;
+using model::VertexArray;
+
+VertexArray *vertexarray = 0;
bool texture(const char *filename, size_t id)
{
@@ -72,7 +74,7 @@ void init()
if (mb > 256)
mb = 256;
(*r_arraysize) = (float) mb;
- vertexarray = new core::VertexArray(mb);
+ vertexarray = new VertexArray(mb);
r_radius = core::Cvar::get("r_radius", "0", core::Cvar::Archive);
r_radius->set_info("[bool] render entity radius");
@@ -95,7 +97,7 @@ void shutdown()
}
// clear models
- core::Model::clear();
+ model::Model::clear();
// clear vertex array
delete vertexarray;
diff --git a/src/render/render.h b/src/render/render.h
index ce638bb..0bde634 100644
--- a/src/render/render.h
+++ b/src/render/render.h
@@ -9,7 +9,7 @@
#include "GL/gl.h"
#include "core/cvar.h"
-#include "core/model.h"
+#include "model/model.h"
namespace render {
@@ -25,7 +25,7 @@ namespace render {
extern core::Cvar *r_wireframe;
extern core::Cvar *r_arraysize;
- extern core::VertexArray *vertexarray;
+ extern model::VertexArray *vertexarray;
}
#include "render/draw.h"