2 Replies Latest reply on Apr 19, 2013 10:44 AM by nic

    [Bug Report] GLSL compiler crashes when glsl code doesn't end with new-line character

    guubao

      OS: Win7 64bit

       

      Renderer info:

      GL_VENDOR:Intel

      GL_RENDERER:Intel(R) HD Graphics 3000

      GL_VERSION:3.1.0 - Build 8.15.10.2761

       

      Description:

      Code crashes somewhere in glCompileShader. New-line character after "#error foo" prevents crash.

       

       

      Code:

       

      //Intel compiler crashes

      std::string source =

      "#version 130\r\n"

      "#error foo";

       

      const char* sources[] = {source.c_str()};

      gl::GLint lens[] = {source.size()};

       

      gl::GLint shader = gl::glCreateShader(gl::GL_VERTEX_SHADER);

       

      gl::glShaderSource(shader,1,sources,lens);

      gl::glCompileShader(shader);