Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
shader.cpp File Reference
#include <fstream>
#include <iterator>
#include "shader.h"
#include "irrlichttypes_extrabloated.h"
#include "irr_ptr.h"
#include "debug.h"
#include "filesys.h"
#include "util/container.h"
#include "util/thread.h"
#include "settings.h"
#include <ICameraSceneNode.h>
#include <IGPUProgrammingServices.h>
#include <IMaterialRenderer.h>
#include <IMaterialRendererServices.h>
#include <IShaderConstantSetCallBack.h>
#include "client/renderingengine.h"
#include <EShaderTypes.h>
#include "gettext.h"
#include "log.h"
#include "gamedef.h"
#include "client/tile.h"
#include "config.h"
#include <mt_opengl.h>
+ Include dependency graph for shader.cpp:

Classes

class  SourceShaderCache
 
class  ShaderCallback
 
class  MainShaderConstantSetter
 
class  MainShaderConstantSetterFactory
 
class  ShaderSource
 

Macros

#define PROVIDE(constant)   shaders_header << "#define " #constant " " << (int)constant << "\n"
 

Functions

std::string getShaderPath (const std::string &name_of_shader, const std::string &filename)
 
IWritableShaderSourcecreateShaderSource ()
 
void dumpShaderProgram (std::ostream &output_stream, const std::string &program_type, std::string_view program)
 

Variables

static MutexedMap< std::string, std::string > g_shadername_to_path_cache
 

Macro Definition Documentation

◆ PROVIDE

#define PROVIDE ( constant)    shaders_header << "#define " #constant " " << (int)constant << "\n"

Function Documentation

◆ createShaderSource()

IWritableShaderSource * createShaderSource ( )

Referenced by Game::init(), and ClientLauncher::run().

+ Here is the caller graph for this function:

◆ dumpShaderProgram()

void dumpShaderProgram ( std::ostream & output_stream,
const std::string & program_type,
std::string_view program )

Referenced by ShaderSource::generateShader().

+ Here is the caller graph for this function:

◆ getShaderPath()

std::string getShaderPath ( const std::string & name_of_shader,
const std::string & filename )

References DIR_DELIM, g_settings, g_shadername_to_path_cache, Settings::get(), porting::path_share, and fs::PathExists().

Referenced by ShadowRenderer::createShaders(), SourceShaderCache::getOrLoad(), and SourceShaderCache::insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ g_shadername_to_path_cache

MutexedMap<std::string, std::string> g_shadername_to_path_cache
static

Referenced by getShaderPath().