diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/Makefile.am | 4 | ||||
-rw-r--r-- | src/render/draw.cc | 2 | ||||
-rw-r--r-- | src/render/gl.cc | 10 | ||||
-rw-r--r-- | src/render/gl.h | 5 | ||||
-rw-r--r-- | src/render/textures.cc | 1 |
5 files changed, 18 insertions, 4 deletions
diff --git a/src/render/Makefile.am b/src/render/Makefile.am index 27ad8bb..dd2f5f8 100644 --- a/src/render/Makefile.am +++ b/src/render/Makefile.am @@ -10,6 +10,6 @@ endif librender_la_LDFLAGS = -avoid-version -no-undefined @GL_LIBS@ librender_la_LIBADD = $(top_builddir)/src/math/libmath.la librender_la_SOURCES = camera.cc draw.cc dust.cc gl.cc image.cc jpgfile.cc \ - pngfile.cc render.cc text.cc textures.cc tga.cc + pngfile.cc primitives.cc render.cc text.cc textures.cc tga.cc noinst_HEADERS = camera.h draw.h dust.h gl.h image.h render.h text.h textures.h \ - tga.h pngfile.h jpgfile.h + tga.h pngfile.h jpgfile.h primitives.h diff --git a/src/render/draw.cc b/src/render/draw.cc index c74f65f..6de398a 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -749,7 +749,7 @@ void draw_pass_model_fx(float elapsed) math::Axis flare_axis; - size_t circle_texture = Textures::load("bitmaps/fx/circle00"); + size_t circle_texture = Textures::load("bitmaps/fx/circle01"); size_t current_texture = Textures::bind("bitmaps/fx/flare00"); gl::enable(GL_TEXTURE_2D); diff --git a/src/render/gl.cc b/src/render/gl.cc index 5540af0..47a0420 100644 --- a/src/render/gl.cc +++ b/src/render/gl.cc @@ -7,7 +7,7 @@ #include "render/gl.h" #include "math/matrix4f.h" - +using math::Vector2f; using math::Vector3f; using math::Color; @@ -120,6 +120,14 @@ void scale(const float x, const float y, const float z) { glScalef(x, y, z); } +void vertex(const Vector2f& vector) { + glVertex2fv(vector.ptr()); +} + +void vertex(const float x, const float y) { + glVertex2f(x, y); +} + void vertex(const Vector3f& vector) { glVertex3fv(vector.ptr()); } diff --git a/src/render/gl.h b/src/render/gl.h index fb8bdf2..6e32e35 100644 --- a/src/render/gl.h +++ b/src/render/gl.h @@ -10,6 +10,7 @@ #include "GL/gl.h" #include "GL/glu.h" +#include "math/vector2f.h" #include "math/vector3f.h" #include "math/matrix4f.h" #include "math/axis.h" @@ -105,6 +106,10 @@ namespace gl void vertex(const float x, const float y, const float z); + void vertex(const math::Vector2f& vector); + + void vertex(const float x, const float y); + /// glNormal void normal(const math::Vector3f & vector); diff --git a/src/render/textures.cc b/src/render/textures.cc index b6b7f05..bf0cc84 100644 --- a/src/render/textures.cc +++ b/src/render/textures.cc @@ -44,6 +44,7 @@ void Textures::init() load("bitmaps/loader"); // crosshairs + load("bitmaps/pointers/pointer"); load("bitmaps/pointers/aim"); load("bitmaps/pointers/center"); load("bitmaps/pointers/control"); |