From e7c08ec2fea6ca3aa01453b459c2e7aa3d41d509 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 3 Oct 2014 12:21:59 +0000 Subject: [PATCH] Fix some errors with shader object labels --- panda/src/gobj/shader.I | 12 ++++++------ panda/src/gobj/shader.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/panda/src/gobj/shader.I b/panda/src/gobj/shader.I index 9a84d9b6ef..3c0d2c9db9 100755 --- a/panda/src/gobj/shader.I +++ b/panda/src/gobj/shader.I @@ -12,16 +12,16 @@ // //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// // Function: Shader::get_filename -// Access: Public +// Access: Published // Description: Return the Shader's filename for the given shader // type. //////////////////////////////////////////////////////////////////// -INLINE const Filename Shader:: +INLINE Filename Shader:: get_filename(const ShaderType &type) const { - if (_filename->_separate) { - nassertr(type != ST_none || !_filename->_shared.empty(), ""); + if (_filename->_separate && type == ST_none) { switch (type) { case ST_vertex: return _filename->_vertex; @@ -51,7 +51,7 @@ get_filename(const ShaderType &type) const { //////////////////////////////////////////////////////////////////// // Function: Shader::get_text -// Access: Public +// Access: Published // Description: Return the Shader's text for the given shader type. //////////////////////////////////////////////////////////////////// INLINE const string &Shader:: @@ -146,7 +146,7 @@ have_shader_utilization() { // Description: Returns the shader language in which this shader // was written. //////////////////////////////////////////////////////////////////// -INLINE const Shader::ShaderLanguage Shader:: +INLINE Shader::ShaderLanguage Shader:: get_language() const { return _language; } diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index cc0f2208b0..726a322269 100755 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -94,10 +94,10 @@ PUBLISHED: const string &tess_evaluation = ""); 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 bool get_error_flag() const; - INLINE const ShaderLanguage get_language() const; + INLINE ShaderLanguage get_language() const; INLINE static ShaderUtilization get_shader_utilization(); INLINE static void set_shader_utilization(ShaderUtilization utl);