100 cout <<
"error shader" << endl;
131 glUseProgramObjectARB(0);
159 const char *source = (
const char *)vert_source;
160 const char **psource = &source;
173 vertexInfoLog =
new char[maxLength];
175 glGetShaderInfoLog(
m_VertexShader, maxLength, &maxLength, vertexInfoLog);
183 +
moText(vertexInfoLog) );
192 +
moText(vertexInfoLog) );
194 delete [] vertexInfoLog;
202 const char *source = (
const char *)frag_source;
203 const char **psource = &source;
209 char *fragmentInfoLog;
217 fragmentInfoLog =
new char[maxLength];
219 glGetShaderInfoLog(
m_FragmentShader, maxLength, &maxLength, fragmentInfoLog);
224 +
moText(fragmentInfoLog) );
228 delete [] fragmentInfoLog;
241 GLint progLinkSuccess;
242 glGetObjectParameterivARB(
m_ProgramObject, GL_OBJECT_LINK_STATUS_ARB, &progLinkSuccess);
245 if (!progLinkSuccess)
252 GLint infologLength = 0;
253 GLsizei charsWritten = 0;
256 glGetObjectParameterivARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infologLength);
258 if (infologLength > 0)
260 infoLog = (
char *)malloc(infologLength);
261 glGetInfoLogARB(obj, infologLength, &charsWritten, infoLog);
void compileVertShader(const moText &vert_source)
virtual MOboolean Finish()
void Error(moText p_text)
Anuncia y registra un error.
GLhandleARB m_VertexShader
void printInfoLog(GLhandleARB obj)
GLhandleARB m_ProgramObject
virtual MOboolean Finish()
virtual moText LoadShaderSource(const moText &p_fn)
void PrintVertShaderLog()
GLint GetUniformID(const moText &uName)
virtual void CreateFragShader(const moText &frag_source)
virtual void StopShader()
virtual void StartShader()
clase de para manejar textos
virtual void LoadVertShader(const moText &vert_filename)
void Log(moText p_text)
Escribe un mensaje en el archivo de registro (log)
GLhandleARB m_FragmentShader
void compileFragShader(const moText &frag_source)
virtual void StopShader()
virtual void LoadShader(const moText &vert_filename, const moText &frag_filename)
virtual void LoadFragShader(const moText &frag_filename)
void SetType(MOuint p_type)
virtual void CreateShader(const moText &vert_source, const moText &frag_source)
static moDebug * MODebug2
Clase de impresión de errores para depuración
LIBMOLDEO_API moText0 IntToStr(int a)
void PrintFragShaderLog()
virtual void StartShader()
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
virtual void CreateVertShader(const moText &vert_source)
GLint GetAttribID(const moText &aName)