Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89431

QOpenGLShader compiling failed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.8
    • GUI: OpenGL
    • None
    • Windows

    Description

      I am going to render a simple triangle in the scene. When using the build-in GLSL and modifing the original fixed contents to my own, the qt reports a bug as follows. I am sure that i am right because the code works before. However, after i add new texts it becomes bad.

      I write the same code and using addShaderFromSourceCode, it works. So how to deal with this problem?

      QOpenGLShader::compile(Vertex): 0(2) : error C0204: version directive must be first statement and may not be repeated

          • Problematic Vertex shader source code ***

      #define lowp

      #define mediump

      #define highp

      #line 1

      ???#version 330 core

      layout(location=0)in vec3 aPos;

      ......

       

      ***

      add vertex shader failed! "0(2) : error C0204: version directive must be first statement and may not be repeated\n"

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            llxsjnh Lixin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes