From 22e6fb7056dcc888e9ccf768fefb6c073077a3b5 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 19 Mar 2012 02:59:12 +0100 Subject: ShaderSource and silly example shaders --- src/game.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index a38ffa13c..1339afbf0 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -50,6 +50,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "main.h" // For g_settings #include "itemdef.h" #include "tile.h" // For TextureSource +#include "shader.h" // For ShaderSource #include "logoutputbuffer.h" #include "subgame.h" #include "quicktune_shortcutter.h" @@ -876,6 +877,9 @@ void the_game( // Create texture source IWritableTextureSource *tsrc = createTextureSource(device); + // Create shader source + IWritableShaderSource *shsrc = createShaderSource(device); + // These will be filled by data received from the server // Create item definition manager IWritableItemDefManager *itemdef = createItemDefManager(); @@ -943,7 +947,7 @@ void the_game( MapDrawControl draw_control; Client client(device, playername.c_str(), password, draw_control, - tsrc, itemdef, nodedef, sound, &eventmgr); + tsrc, shsrc, itemdef, nodedef, sound, &eventmgr); // Client acts as our GameDef IGameDef *gamedef = &client; @@ -1422,6 +1426,11 @@ void the_game( /* Process ItemDefManager's queue */ itemdef->processQueue(gamedef); + /* + Process ShaderSource's queue + */ + shsrc->processQueue(); + /* Random calculations */ @@ -3002,9 +3011,11 @@ void the_game( if(!sound_is_dummy) delete sound; + + delete tsrc; + delete shsrc; delete nodedef; delete itemdef; - delete tsrc; } -- cgit v1.2.3