Fix some errors with shader object labels

This commit is contained in:
rdb 2014-10-03 12:21:59 +00:00
parent 24386cdc1e
commit e7c08ec2fe
2 changed files with 8 additions and 8 deletions

View File

@ -12,16 +12,16 @@
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: Shader::get_filename // Function: Shader::get_filename
// Access: Public // Access: Published
// Description: Return the Shader's filename for the given shader // Description: Return the Shader's filename for the given shader
// type. // type.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE const Filename Shader:: INLINE Filename Shader::
get_filename(const ShaderType &type) const { get_filename(const ShaderType &type) const {
if (_filename->_separate) { if (_filename->_separate && type == ST_none) {
nassertr(type != ST_none || !_filename->_shared.empty(), "");
switch (type) { switch (type) {
case ST_vertex: case ST_vertex:
return _filename->_vertex; return _filename->_vertex;
@ -51,7 +51,7 @@ get_filename(const ShaderType &type) const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: Shader::get_text // Function: Shader::get_text
// Access: Public // Access: Published
// Description: Return the Shader's text for the given shader type. // Description: Return the Shader's text for the given shader type.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE const string &Shader:: INLINE const string &Shader::
@ -146,7 +146,7 @@ have_shader_utilization() {
// Description: Returns the shader language in which this shader // Description: Returns the shader language in which this shader
// was written. // was written.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE const Shader::ShaderLanguage Shader:: INLINE Shader::ShaderLanguage Shader::
get_language() const { get_language() const {
return _language; return _language;
} }

View File

@ -94,10 +94,10 @@ PUBLISHED:
const string &tess_evaluation = ""); const string &tess_evaluation = "");
static PT(Shader) make_compute(const ShaderLanguage &lang, const string &body); static PT(Shader) make_compute(const ShaderLanguage &lang, const string &body);
INLINE const Filename get_filename(const ShaderType &type = ST_none) const; INLINE 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 bool get_error_flag() const;
INLINE const ShaderLanguage get_language() const; INLINE ShaderLanguage get_language() const;
INLINE static ShaderUtilization get_shader_utilization(); INLINE static ShaderUtilization get_shader_utilization();
INLINE static void set_shader_utilization(ShaderUtilization utl); INLINE static void set_shader_utilization(ShaderUtilization utl);