Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#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