Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualNyssa

Posted 23 January 2013 - 02:56 AM

And to be totally safe, logging should be used as follows, and after the call to glCompileShader()

GLint retParam;
glGetShaderiv(m_openGLID, GL_COMPILE_STATUS, &retParam);
if(retParam != GL_TRUE) 
{
	GLint errorMsgLen = 0;
	glGetShaderiv(m_openGLID, GL_INFO_LOG_LENGTH, &errorMsgLen);
	if (errorMsgLen > 0)
	{
		GLsizei charsWritten = 0;
		GLchar *errorMsg = new GLchar[errorMsgLen];
		glGetShaderInfoLog(m_openGLID, errorMsgLen, &charsWritten, errorMsg);

                /*Do something with errorMsg*/
	}
}

#2Nyssa

Posted 23 January 2013 - 02:51 AM

And to be totally safe, logging should be used as follows

GLint retParam;
glGetShaderiv(m_openGLID, GL_COMPILE_STATUS, &retParam);
if(retParam != GL_TRUE) 
{
	GLint errorMsgLen = 0;
	glGetShaderiv(m_openGLID, GL_INFO_LOG_LENGTH, &errorMsgLen);
	if (errorMsgLen > 0)
	{
		GLsizei charsWritten = 0;
		GLchar *errorMsg = new GLchar[errorMsgLen];
		glGetShaderInfoLog(m_openGLID, errorMsgLen, &charsWritten, errorMsg);

                /*Do something with errorMsg*/
	}
}

#1Nyssa

Posted 23 January 2013 - 02:50 AM

And to be totally safe, logging should be used as follows

GLint retParam;
glGetShaderiv(m_openGLID, GL_COMPILE_STATUS, &retParam);
if(retParam != GL_TRUE) 
{
	GLint errorMsgLen = 0;
	glGetShaderiv(m_openGLID, GL_INFO_LOG_LENGTH, &errorMsgLen);
	if (errorMsgLen > 0)
	{
		GLsizei charsWritten = 0;
		GLchar *errorMsg = GLchar char[errorMsgLen];
		glGetShaderInfoLog(m_openGLID, errorMsgLen, &charsWritten, errorMsg);

                /*Do something with errorMsg*/
	}
}

PARTNERS