mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
get_text() should return a reference
This commit is contained in:
parent
2e9cf84f88
commit
e972a6dd0b
@ -45,10 +45,10 @@ get_filename(const ShaderType &type) const {
|
||||
// Access: Public
|
||||
// Description: Return the Shader's text for the given shader type.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const string Shader::
|
||||
INLINE const string &Shader::
|
||||
get_text(const ShaderType &type) const {
|
||||
if (_text->_separate) {
|
||||
nassertr(type != ST_none || !_text->_shared.empty(), "");
|
||||
nassertr(type != ST_none || !_text->_shared.empty(), _text->_shared);
|
||||
switch (type) {
|
||||
case ST_vertex:
|
||||
return _text->_vertex;
|
||||
|
@ -56,7 +56,7 @@ PUBLISHED:
|
||||
static PT(Shader) make(const ShaderLanguage &lang, const string &vertex, const string &fragment, const string &geometry = "");
|
||||
|
||||
INLINE const Filename get_filename(const ShaderType &type = ST_none) const;
|
||||
INLINE const string get_text(const ShaderType &type = ST_none) const;
|
||||
INLINE const string &get_text(const ShaderType &type = ST_none) const;
|
||||
INLINE const bool get_error_flag() const;
|
||||
INLINE const ShaderLanguage get_language() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user