[SOLVED] Error about GLchar * in Release Mode
-
Hi!
I have a function decleared as:
iglSetaUniformVec4(GLchar *nome,CIMTVetor4 vlr)
This function only receives a GLchar pointer and a vector to setup a shader uniform.
In the program i´m calling this function like this:
iglSetaUniformVec4 ("cor_diffusa_mat" ,CorDifusa );
The function works very well , but only in Debug Mode, when i switch to Release Mode i receive the following error:
......\INS3D\src\INSGL\IGL_FunctionsPCv43.cpp(171) : error C2664: 'bool CIGLFunctionsPCv43::iglSetaUniformVec4(GLchar *,CIMTVetor4)' : cannot convert argument 1 from 'const char [16]' to 'GLchar *'
Conversion from string literal loses const qualifier (see /Zc:strictStrings)My doubt is, why this error happen only in release mode?
i Will need change all my parameter to QString and when i send the name to OpenGL uses the c_str() method to send the string to OpenGL?(Since all methods in OpenGL are defined as GLchar * ?)Kind Regards.
-
@wwolff said:
iglSetaUniformVec4(GLchar *nome,CIMTVetor4 vlr)
I'm rather sure you could use const GLchar * here instead to overcome the compile problem.
-
Hi!
Thanks so Much!
Works Lovelly!Kind Regards.