third_party/virtualbox/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
/**
 * Outputs GL_EXTENSIONS list to the release log.
 */
Outputs GL_EXTENSIONS list to the release log.
Outputs GL_EXTENSIONS list to the release log .
static void vmsvga3dLogRelExtensions(const char *pszPrefix, const char *pszExtensions)
{
    bool fBuffered = RTLogRelSetBuffering(true);
    size_t   acchWidths[4] = { 1, 1, 1, 1 };
    uint32_t i;
    const char *psz = pszExtensions;
    for (i = 0; ; i++)
    {
        while (*psz == ' ')
            psz++;
        if (!*psz)
            break;
        const char *pszEnd = strchr(psz, ' ');
        AssertBreak(pszEnd);
        size_t cch = pszEnd - psz;
        uint32_t iColumn = i % RT_ELEMENTS(acchWidths);
        if (acchWidths[iColumn] < cch)
            acchWidths[iColumn] = cch;
        psz = pszEnd;
    }
    LogRel(("VMSVGA3d: %sOpenGL extensions (%d):", pszPrefix, i));
    psz = pszExtensions;
    for (i = 0; ; i++)
    {
        while (*psz == ' ')
            psz++;
        if (!*psz)
            break;
        const char *pszEnd = strchr(psz, ' ');
        AssertBreak(pszEnd);
        size_t cch = pszEnd - psz;
        uint32_t iColumn = i % RT_ELEMENTS(acchWidths);
        if (iColumn == 0)
            LogRel(("\nVMSVGA3d:  %-*.*s", acchWidths[iColumn], cch, psz));
        else if (iColumn != RT_ELEMENTS(acchWidths) - 1)
            LogRel((" %-*.*s", acchWidths[iColumn], cch, psz));
        else
            LogRel((" %.*s", cch, psz));
        psz = pszEnd;
    }
    RTLogRelSetBuffering(fBuffered);
    LogRel(("\n"));
}
static void vmsvga3dLogRelExtensions ( const char * pszPrefix , const char * pszExtensions ) { bool fBuffered = RTLogRelSetBuffering ( true ) ; size_t acchWidths [ 4 ] = { 1 , 1 , 1 , 1 } ; uint32_t i ; const char * psz = pszExtensions ; for ( i = 0 ; ; i ++ ) { while ( * psz == ' ' ) psz ++ ; if ( ! * psz ) break ; const char * pszEnd = strchr ( psz , ' ' ) ; AssertBreak ( pszEnd ) ; size_t cch = pszEnd - psz ; uint32_t iColumn = i % RT_ELEMENTS ( acchWidths ) ; if ( acchWidths [ iColumn ] < cch ) acchWidths [ iColumn ] = cch ; psz = pszEnd ; } LogRel ( ( " " , pszPrefix , i ) ) ; psz = pszExtensions ; for ( i = 0 ; ; i ++ ) { while ( * psz == ' ' ) psz ++ ; if ( ! * psz ) break ; const char * pszEnd = strchr ( psz , ' ' ) ; AssertBreak ( pszEnd ) ; size_t cch = pszEnd - psz ; uint32_t iColumn = i % RT_ELEMENTS ( acchWidths ) ; if ( iColumn == 0 ) LogRel ( ( " \n " , acchWidths [ iColumn ] , cch , psz ) ) ; else if ( iColumn != RT_ELEMENTS ( acchWidths ) - 1 ) LogRel ( ( " " , acchWidths [ iColumn ] , cch , psz ) ) ; else LogRel ( ( " " , cch , psz ) ) ; psz = pszEnd ; } RTLogRelSetBuffering ( fBuffered ) ; LogRel ( ( " \n " ) ) ; }
Outputs GL_EXTENSIONS list to the release log.
Outputs GL_EXTENSIONS list to the release log .
/* OpenGL 3.0 interface (glGetString(GL_EXTENSIONS) return NULL). */ /*
     * Determin the column widths first.
     */ /*
     * Output it.
     */