]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/shaders/shaders.cpp
Merge commit '6352fbdd7968d7dffa2ba4c57ee5cade250e04ed' into master-merge
[xonotic/netradiant.git] / plugins / shaders / shaders.cpp
index 4099a11e3bb51ecb30300840d4e7ad13cd8f7713..14308bad3b10beb8a005cdfe677bb7b64e066d82 100644 (file)
@@ -93,9 +93,6 @@ void FreeShaders();
 
 void LoadShaderFile( const char *filename );
 
-qtexture_t *Texture_ForName( const char *filename );
-
-
 /*!
    NOTE TTimo: there is an important distinction between SHADER_NOT_FOUND and SHADER_NOTEX:
    SHADER_NOT_FOUND means we didn't find the raw texture or the shader for this
@@ -273,6 +270,7 @@ class ShaderTemplate
 {
 std::size_t m_refcount;
 CopiedString m_Name;
+CopiedString m_WadName;
 public:
 
 ShaderParameters m_params;
@@ -844,6 +842,7 @@ const ShaderArguments& m_args;
 const char* m_filename;
 // name is shader-name, otherwise texture-name ( if not a real shader )
 CopiedString m_Name;
+CopiedString m_WadName;
 
 qtexture_t* m_pTexture;
 qtexture_t* m_notfound;
@@ -921,6 +920,10 @@ const char* getName() const {
        return m_Name.c_str();
 }
 
+const char* getWadName() const {
+       return m_WadName.c_str();
+}
+
 bool IsInUse() const {
        return m_bInUse;
 }
@@ -1056,6 +1059,10 @@ void setName( const char* name ){
        m_Name = name;
 }
 
+void setWadName( const char* name ){
+       m_WadName = name;
+}
+
 class MapLayer : public ShaderLayer
 {
 qtexture_t* m_texture;
@@ -1105,12 +1112,6 @@ const ShaderLayer* firstLayer() const {
        }
        return &m_layers.front();
 }
-void forEachLayer( const ShaderLayerCallback& callback ) const {
-       for ( MapLayers::const_iterator i = m_layers.begin(); i != m_layers.end(); ++i )
-       {
-               callback( *i );
-       }
-}
 
 qtexture_t* lightFalloffImage() const {
        if ( !string_empty( m_template.m_lightFalloffImage.c_str() ) ) {