diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/Makefile.am | 4 | ||||
-rw-r--r-- | src/render/render.cc | 17 | ||||
-rw-r--r-- | src/render/render.h | 5 |
3 files changed, 19 insertions, 7 deletions
diff --git a/src/render/Makefile.am b/src/render/Makefile.am index a993703..183ab41 100644 --- a/src/render/Makefile.am +++ b/src/render/Makefile.am @@ -3,5 +3,5 @@ METASOURCES = AUTO noinst_LTLIBRARIES = librender.la librender_la_LDFLAGS = -avoid-version -no-undefined @GL_LIBS@ librender_la_LIBADD = $(top_builddir)/src/math/libmath.la -librender_la_SOURCES = box.cc gl.cc render.cc sphere.cc -noinst_HEADERS = box.h gl.h render.h sphere.h +librender_la_SOURCES = box.cc gl.cc render.cc sphere.cc text.cc tga.cc +noinst_HEADERS = box.h gl.h render.h sphere.h text.h tga.h diff --git a/src/render/render.cc b/src/render/render.cc index 2440b25..4f959dc 100644 --- a/src/render/render.cc +++ b/src/render/render.cc @@ -10,18 +10,25 @@ namespace render { +GLuint textures[32]; + void init() { - con_debug << "Initializing render..." << std::endl; + con_print << "Initializing render..." << std::endl; + + con_print << " Renderer: " << gl::renderer() << std::endl; + con_print << " Vendor: " << gl::vendor() << std::endl; + con_print << " Version: " << gl::version() << std::endl; + + con_print << "Loading textures..." << std::endl; - con_print << "Renderer: " << gl::renderer() << std::endl; - con_print << "Vendor: " << gl::vendor() << std::endl; - con_print << "Version: " << gl::version() << std::endl; + TGA::texture(textures, "bitmaps/loader.tga", 0); + TGA::texture(textures, "bitmaps/conchars.tga", 1); } void shutdown() { - con_debug << "Shutting down render..." << std::endl; + con_print << "Shutting down render..." << std::endl; } } diff --git a/src/render/render.h b/src/render/render.h index eaaef73..4faa7d5 100644 --- a/src/render/render.h +++ b/src/render/render.h @@ -7,6 +7,7 @@ #ifndef __INCLUDED_RENDER_H__ #define __INCLUDED_RENDER_H__ +#include "GL/gl.h" namespace render { @@ -15,8 +16,12 @@ namespace render { /// shutdown the render subsystem void shutdown(); + + extern GLuint textures[32]; } #include "render/gl.h" +#include "render/text.h" +#include "render/tga.h" #endif // __INCLUDED_RENDER_H__ |