Qt shaders wont compile

  • For whatever reason I cant seem to load my fragment shaders.
    since it doesn't give me any errors for the vertex shaders I'll just post the fragment shader code. This is from the openGL core profile example code.
    from glwidget.cpp
    @// imagine some code here
    if ( !prepareShaderProgram( ":/Shaders/simple.vert", ":/Shaders/simple.frag" ) )
    // more code here
    bool GLWidget::prepareShaderProgram( const QString& vertexShaderPath,
    const QString& fragmentShaderPath )
    result = m_shader.addShaderFromSourceFile( QGLShader::Fragment, fragmentShaderPath );@
    from resources.qrc
    <qresource prefix="/Shaders">

  • Nevermind Just faulty error checking. Neither will compile for me.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.