mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
ShaderSource and silly example shaders
This commit is contained in:
parent
e3258b78e2
commit
22e6fb7056
15 changed files with 945 additions and 2 deletions
15
src/game.cpp
15
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue