Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Crashes compiling glslang

  1. #1
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    273

    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
    "!I don't know... fly casual"

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: Crashes compiling glslang

    Which OpenGL implementation do you use? Which driver?

    Post your shader and/or program code pls.
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  3. #3
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    273

    Re: Crashes compiling glslang

    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);
    glCompileShaderARB(m_programObject);

    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 don't know... fly casual"

  4. #4
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    273

    Re: Crashes compiling glslang

    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 don't know... fly casual"

  5. #5
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: Crashes compiling glslang

    I had a similar problem some time ago too! I was really shocked when I noticed that this was my falt... :-)
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •