Crashes compiling glslang

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

Which OpenGL implementation do you use? Which driver?

Post your shader and/or program code pls.

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 ** ’

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.

I had a similar problem some time ago too! I was really shocked when I noticed that this was my falt… :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.