Deprecated the osg::Shader::reaDShaderFile() and osg::Shader::loadShaderSourceFromFile() methods.
Programmers should use osgDB::readRefShaderFile()/readShaderFile() instead.
This commit is contained in:
parent
f81a46da5b
commit
34336931fa
@ -162,14 +162,13 @@ class OSG_EXPORT Shader : public osg::Object
|
|||||||
/** Get the const Shader's ShaderBinary, return NULL if none is assigned. */
|
/** Get the const Shader's ShaderBinary, return NULL if none is assigned. */
|
||||||
const ShaderBinary* getShaderBinary() const { return _shaderBinary.get(); }
|
const ShaderBinary* getShaderBinary() const { return _shaderBinary.get(); }
|
||||||
|
|
||||||
|
#ifdef OSG_USE_DEPRECATED_API
|
||||||
/** Read shader source from file and then constructor shader of specified type.
|
/** Deorecated use osgDB::readRefShaderFile().*/
|
||||||
* Return the resulting Shader or 0 if no valid shader source could be read.*/
|
|
||||||
static Shader* readShaderFile( Type type, const std::string& fileName );
|
static Shader* readShaderFile( Type type, const std::string& fileName );
|
||||||
|
|
||||||
/** Load the Shader's source code text from a file. */
|
/** Deorecated use osgDB::readRefShaderFile(). */
|
||||||
bool loadShaderSourceFromFile( const std::string& fileName );
|
bool loadShaderSourceFromFile( const std::string& fileName );
|
||||||
|
#endif
|
||||||
|
|
||||||
/** The code injection map used when generating the main shader during main shader composition.*/
|
/** The code injection map used when generating the main shader during main shader composition.*/
|
||||||
typedef std::multimap<float, std::string> CodeInjectionMap;
|
typedef std::multimap<float, std::string> CodeInjectionMap;
|
||||||
|
@ -314,7 +314,7 @@ void Shader::setShaderSource( const std::string& sourceText )
|
|||||||
dirtyShader();
|
dirtyShader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef OSG_USE_DEPRECATED_API
|
||||||
Shader* Shader::readShaderFile( Type type, const std::string& fileName )
|
Shader* Shader::readShaderFile( Type type, const std::string& fileName )
|
||||||
{
|
{
|
||||||
ref_ptr<Shader> shader = new Shader(type);
|
ref_ptr<Shader> shader = new Shader(type);
|
||||||
@ -348,7 +348,7 @@ bool Shader::loadShaderSourceFromFile( const std::string& fileName )
|
|||||||
delete [] text;
|
delete [] text;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const char* Shader::getTypename() const
|
const char* Shader::getTypename() const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user