================= UI_DrawKeyBindStatus ================= */
| 3728 | ================= |
| 3729 | */ |
| 3730 | static void UI_DrawGLInfo(rectDef_t *rect, float scale, vec4_t color, int textStyle, int iFontIndex) |
| 3731 | { |
| 3732 | #define MAX_LINES 64 |
| 3733 | char buff[4096]; |
| 3734 | char * eptr = buff; |
| 3735 | const char *lines[MAX_LINES]; |
| 3736 | int y, numLines=0, i=0; |
| 3737 | |
| 3738 | y = rect->y; |
| 3739 | Text_Paint(rect->x, y, scale, color, va("GL_VENDOR: %s",uiInfo.uiDC.glconfig.vendor_string), rect->w, textStyle, iFontIndex); |
| 3740 | y += 15; |
| 3741 | Text_Paint(rect->x, y, scale, color, va("GL_VERSION: %s: %s", uiInfo.uiDC.glconfig.version_string,uiInfo.uiDC.glconfig.renderer_string), rect->w, textStyle, iFontIndex); |
| 3742 | y += 15; |
| 3743 | Text_Paint(rect->x, y, scale, color, "GL_PIXELFORMAT:", rect->w, textStyle, iFontIndex); |
| 3744 | y += 15; |
| 3745 | Text_Paint(rect->x, y, scale, color, va ("Color(%d-bits) Z(%d-bits) stencil(%d-bits)",uiInfo.uiDC.glconfig.colorBits, uiInfo.uiDC.glconfig.depthBits, uiInfo.uiDC.glconfig.stencilBits), rect->w, textStyle, iFontIndex); |
| 3746 | y += 15; |
| 3747 | // build null terminated extension strings |
| 3748 | Q_strncpyz(buff, uiInfo.uiDC.glconfig.extensions_string, sizeof(buff)); |
| 3749 | int testy=y-16; |
| 3750 | while ( testy <= rect->y + rect->h && *eptr && (numLines < MAX_LINES) ) |
| 3751 | { |
| 3752 | while ( *eptr && *eptr == ' ' ) |
| 3753 | *eptr++ = '\0'; |
| 3754 | |
| 3755 | // track start of valid string |
| 3756 | if (*eptr && *eptr != ' ') |
| 3757 | { |
| 3758 | lines[numLines++] = eptr; |
| 3759 | testy+=16; |
| 3760 | } |
| 3761 | |
| 3762 | while ( *eptr && *eptr != ' ' ) |
| 3763 | eptr++; |
| 3764 | } |
| 3765 | |
| 3766 | numLines--; |
| 3767 | while (i < numLines) |
| 3768 | { |
| 3769 | Text_Paint(rect->x, y, scale, color, lines[i++], rect->w, textStyle, iFontIndex); |
| 3770 | y += 16; |
| 3771 | } |
| 3772 | } |
| 3773 | |
| 3774 | /* |
| 3775 | ================= |
no test coverage detected