Beispiel #1
0
//----------------------------------------------------------------------
// configInit
//----------------------------------------------------------------------
bool Window::configInit( const uint128_t& initID )
{
    if( !getPixelViewport().isValid( ))
    {
        sendError( ERROR_WINDOW_PVP_INVALID );
        return false;
    }

    LBASSERT( !_systemWindow );

    int glMajorVersion = 1;
    int glMinorVersion = 1;
    if( getPipe()->getSystemPipe()->getMaxOpenGLVersion() != AUTO )
    {
        float maj, min;
        min = modff( getPipe()->getSystemPipe()->getMaxOpenGLVersion(), &maj );
        glMajorVersion = static_cast< int >( maj );
        glMinorVersion = static_cast< int >( min*10.f );
    }

    if( getIAttribute( WindowSettings::IATTR_HINT_OPENGL_MAJOR ) == AUTO )
        setIAttribute( WindowSettings::IATTR_HINT_OPENGL_MAJOR, glMajorVersion);
    if( getIAttribute( WindowSettings::IATTR_HINT_OPENGL_MINOR ) == AUTO )
        setIAttribute( WindowSettings::IATTR_HINT_OPENGL_MINOR, glMinorVersion);

    return configInitSystemWindow( initID ) && configInitGL( initID );
}
Beispiel #2
0
//----------------------------------------------------------------------
// configInit
//----------------------------------------------------------------------
bool Window::configInit( const uint128_t& initID )
{
    if( !getPixelViewport().isValid( ))
    {
        sendError( ERROR_WINDOW_PVP_INVALID );
        return false;
    }

    LBASSERT( !_systemWindow );

    return configInitSystemWindow( initID ) && configInitGL( initID );
}