diff options
author | Kahrl <kahrl@gmx.net> | 2012-03-19 02:59:12 +0100 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-12-02 00:46:18 +0200 |
commit | 22e6fb7056dcc888e9ccf768fefb6c073077a3b5 (patch) | |
tree | f85461ee0449602fa12dde14b97c5c96cf813133 /src/game.cpp | |
parent | e3258b78e263c3f95007e1fbc92fcc3a51646f69 (diff) | |
download | minetest-22e6fb7056dcc888e9ccf768fefb6c073077a3b5.tar.gz minetest-22e6fb7056dcc888e9ccf768fefb6c073077a3b5.tar.bz2 minetest-22e6fb7056dcc888e9ccf768fefb6c073077a3b5.zip |
ShaderSource and silly example shaders
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
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; @@ -1423,6 +1427,11 @@ void the_game( itemdef->processQueue(gamedef); /* + Process ShaderSource's queue + */ + shsrc->processQueue(); + + /* Random calculations */ last_screensize = screensize; @@ -3002,9 +3011,11 @@ void the_game( if(!sound_is_dummy) delete sound; + + delete tsrc; + delete shsrc; delete nodedef; delete itemdef; - delete tsrc; } |