Esempio n. 1
0
bool checkTeapot()
{
    // attempt to open the teapot (to see if the paths are right)
    std::string teapotFilename = getModelsPath() + "teapot.obj";
    std::ifstream in( teapotFilename.c_str() );
    if( in.good() )
        return true;
    return false;
}
Esempio n. 2
0
void IBLWidget::initializeGL()
{
    glcontext->makeCurrent(this);

    model = new SimpleModel();

    loadIBL( (getProbesPath() + "beach.penv").c_str() );
    loadModel( (getModelsPath() + "sphere.obj").c_str() );

    // load the shaders
    resultShader = new DGLShader( (getShaderTemplatesPath() + "Quad.vert").c_str(), (getShaderTemplatesPath() + "IBLResult.frag").c_str() );
    compShader = new DGLShader( (getShaderTemplatesPath() + "Quad.vert").c_str(), (getShaderTemplatesPath() + "IBLComp.frag").c_str() );
}