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" ) )
    return;
    // more code here
    bool GLWidget::prepareShaderProgram( const QString& vertexShaderPath,
    const QString& fragmentShaderPath )
    result = m_shader.addShaderFromSourceFile( QGLShader::Fragment, fragmentShaderPath );@
    from resources.qrc
    @<RCC>
    <qresource prefix="/Shaders">
    <file>simple.frag</file>
    <file>simple.vert</file>
    </qresource>
    </RCC>
    @



  • 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.