From 1704badc306fc8c7c6609aff9f809aee3ac00d3a Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 10 Feb 2011 02:13:03 +0200 Subject: work-in-progress texture atlas optimization --- src/main.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index ff24fbb87..1e30219c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -97,6 +97,9 @@ SUGG: Meshes of blocks could be split into 6 meshes facing into different directions and then only those drawn that need to be - Also an 1-dimensional tile map would be nice probably +SUGG: Calculate lighting per vertex to get a lighting effect like in + bartwe's game + Gaming ideas: ------------- @@ -363,8 +366,13 @@ Doing now (most important at the top): #include "guiMainMenu.h" #include "mineral.h" #include "noise.h" +#include "tile.h" + +// TODO: Remove this +IrrlichtWrapper *g_irrlicht = NULL; -IrrlichtWrapper *g_irrlicht; +// This makes textures +TextureSource *g_texturesource = NULL; MapDrawControl draw_control; @@ -1643,6 +1651,7 @@ int main(int argc, char *argv[]) g_device = device; g_irrlicht = new IrrlichtWrapper(device); + g_texturesource = new TextureSource(device); /* Speed tests (done after irrlicht is loaded to get timer) @@ -1670,7 +1679,8 @@ int main(int argc, char *argv[]) video::IVideoDriver* driver = device->getVideoDriver(); /* - This changes the minimum allowed number of vertices in a VBO + This changes the minimum allowed number of vertices in a VBO. + Default is 500. */ //driver->setMinHardwareBufferVertexCount(50); @@ -2061,6 +2071,11 @@ int main(int argc, char *argv[]) */ g_irrlicht->Run(); + /* + Process TextureSource's queue + */ + g_texturesource->processQueue(); + /* Random calculations */ -- cgit v1.2.3