View Full Version : Crashes compiling glslang
12-12-2003, 08:10 AM
Hello i have a problem, when i try to compile a glslang source (glCompileShaderARB), my program crashes with an exception in glslang.dll.
Anyone can help me with this?
thak you very much
12-12-2003, 08:17 AM
Which OpenGL implementation do you use? Which driver?
Post your shader and/or program code pls.
12-12-2003, 08:33 AM
I have a WildCat VP 560 from 3Dlabs, and i am using the last driver. The shader that i am trying to load is one of the ogl2sdk. I think that i am follwing all the steps, but, when i reach to the line that compiles the shader, the program crashes.
m_programObject = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);
glShaderSourceARB(m_programObject, 1,(const char **)&m_programSource, &m_size);
i have checked the m_programSource and the m_size, and they are corrects.
P.D if i write glShaderSourceARB(m_programObject, 1,&m_programSource, &m_size); instead glShaderSourceARB(m_programObject, 1,(const char **)&m_programSource, &m_size);
the compiler gives me this error:
error C2664: 'void (GLhandleARB,GLsizei,const GLcharARB ** ,const GLint *)' : no se puede convertir el parámetro 3 de 'GLubyte **__w64 ' a 'const GLcharARB ** '
12-12-2003, 08:56 AM
i have fixed that horrible trouble. I was opening the source file with "rt" mode, and i get the size of the file with _lseek, probably it doesn't take in account the carriage returns, and the size of the array doesn't match.
opening the source file with "rb" solves the problem.
12-14-2003, 12:12 AM
I had a similar problem some time ago too! I was really shocked when I noticed that this was my falt... :-)
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.