Fixed logging of boost::basic_path and a type-punned pointer

This was SVN commit r6152.
This commit is contained in:
Simon Brenner 2008-06-29 09:59:26 +00:00
parent 7d18028fe2
commit d513f3a579

View File

@ -115,7 +115,8 @@ static LibError Ogl_Shader_reload(Ogl_Shader* shdr, const VfsPath& pathname, Han
{ {
const GLchar* strings[] = { (const GLchar*)file.get() }; const GLchar* strings[] = { (const GLchar*)file.get() };
pglShaderSourceARB(shdr->id, 1, strings, (const GLint*)&file_size); const GLint tmp = file_size;
pglShaderSourceARB(shdr->id, 1, strings, &tmp);
pglCompileShaderARB(shdr->id); pglCompileShaderARB(shdr->id);
} }
@ -255,7 +256,7 @@ static LibError do_load_shader(
if (Type.empty()) if (Type.empty())
{ {
LOG(CLogger::Error, LOG_CATEGORY, "%hs: Missing attribute \"type\" in element \"Shader\".", pathname); LOG(CLogger::Error, LOG_CATEGORY, "%hs: Missing attribute \"type\" in element \"Shader\".", pathname.string().c_str());
WARN_RETURN(ERR::CORRUPTED); WARN_RETURN(ERR::CORRUPTED);
} }
@ -263,7 +264,7 @@ static LibError do_load_shader(
if (!shadertype) if (!shadertype)
{ {
LOG(CLogger::Error, LOG_CATEGORY, "%hs: Unknown shader type \"%hs\" (valid are: VERTEX_SHADER, FRAGMENT_SHADER).", pathname, Type.c_str()); LOG(CLogger::Error, LOG_CATEGORY, "%hs: Unknown shader type \"%hs\" (valid are: VERTEX_SHADER, FRAGMENT_SHADER).", pathname.string().c_str(), Type.c_str());
WARN_RETURN(ERR::CORRUPTED); WARN_RETURN(ERR::CORRUPTED);
} }
@ -271,7 +272,7 @@ static LibError do_load_shader(
if (Name.empty()) if (Name.empty())
{ {
LOG(CLogger::Error, LOG_CATEGORY, "%hs: Missing shader name.", pathname); LOG(CLogger::Error, LOG_CATEGORY, "%hs: Missing shader name.", pathname.string().c_str());
WARN_RETURN(ERR::CORRUPTED); WARN_RETURN(ERR::CORRUPTED);
} }