mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-27 00:51:55 +00:00
*** empty log message ***
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@60 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
cef4389a43
commit
e86618c484
@ -17,6 +17,7 @@
|
|||||||
** ac = acceleration (ge: generic, fu: full, no: none)
|
** ac = acceleration (ge: generic, fu: full, no: none)
|
||||||
** fm = format (i: integer, f: float, c: color index)
|
** fm = format (i: integer, f: float, c: color index)
|
||||||
** db = double buffer (y = yes)
|
** db = double buffer (y = yes)
|
||||||
|
** sw = swap method (x: exchange, c: copy, u: undefined)
|
||||||
** st = stereo (y = yes)
|
** st = stereo (y = yes)
|
||||||
** sz = total # bits
|
** sz = total # bits
|
||||||
** r = # bits of red
|
** r = # bits of red
|
||||||
@ -43,7 +44,7 @@ FILE* file = 0;
|
|||||||
void
|
void
|
||||||
VisualInfoARB (HDC hDC, int verbose)
|
VisualInfoARB (HDC hDC, int verbose)
|
||||||
{
|
{
|
||||||
int attrib[32], value[32], nAttrib;
|
int attrib[32], value[32], n_attrib, n_pbuffer, n_float;
|
||||||
int i, maxpf;
|
int i, maxpf;
|
||||||
|
|
||||||
attrib[0] = WGL_NUMBER_PIXEL_FORMATS_ARB;
|
attrib[0] = WGL_NUMBER_PIXEL_FORMATS_ARB;
|
||||||
@ -78,36 +79,42 @@ VisualInfoARB (HDC hDC, int verbose)
|
|||||||
attrib[18] = WGL_DEPTH_BITS_ARB;
|
attrib[18] = WGL_DEPTH_BITS_ARB;
|
||||||
attrib[19] = WGL_STENCIL_BITS_ARB;
|
attrib[19] = WGL_STENCIL_BITS_ARB;
|
||||||
attrib[20] = WGL_AUX_BUFFERS_ARB;
|
attrib[20] = WGL_AUX_BUFFERS_ARB;
|
||||||
nAttrib = 21;
|
/* Layer information */
|
||||||
|
attrib[21] = WGL_NUMBER_OVERLAYS_ARB;
|
||||||
|
attrib[22] = WGL_NUMBER_UNDERLAYS_ARB;
|
||||||
|
attrib[23] = WGL_SWAP_LAYER_BUFFERS_ARB;
|
||||||
|
n_attrib = 24;
|
||||||
if (wglew.ARB_pbuffer)
|
if (wglew.ARB_pbuffer)
|
||||||
{
|
{
|
||||||
attrib[nAttrib] = WGL_DRAW_TO_PBUFFER_ARB;
|
attrib[n_attrib] = WGL_DRAW_TO_PBUFFER_ARB;
|
||||||
nAttrib++;
|
n_pbuffer = n_attrib;
|
||||||
|
n_attrib++;
|
||||||
}
|
}
|
||||||
if (wglew.NV_float_buffer)
|
if (wglew.NV_float_buffer)
|
||||||
{
|
{
|
||||||
attrib[nAttrib] = WGL_FLOAT_COMPONENTS_NV;
|
attrib[n_attrib] = WGL_FLOAT_COMPONENTS_NV;
|
||||||
nAttrib++;
|
n_float = n_attrib;
|
||||||
|
n_attrib++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!verbose)
|
if (!verbose)
|
||||||
{
|
{
|
||||||
/* print table header */
|
/* print table header */
|
||||||
fprintf(file, " +-----+----------------+-----------------+----------+-----------------+\n");
|
fprintf(file, " +-----+-------------------+-----------------+----------+-----------------+----------+\n");
|
||||||
fprintf(file, " | | visual | color | ax dp st | accum |\n");
|
fprintf(file, " | | visual | color | ax dp st | accum | layer |\n");
|
||||||
fprintf(file, " | id | tp ac fm db st | sz r g b a | bf th cl | sz r g b a |\n");
|
fprintf(file, " | id | tp ac fm db sw st | sz r g b a | bf th cl | sz r g b a | ov un sw |\n");
|
||||||
fprintf(file, " +-----+----------------+-----------------+----------+-----------------+\n");
|
fprintf(file, " +-----+-------------------+-----------------+----------+-----------------+----------+\n");
|
||||||
|
|
||||||
/* loop through all the pixel formats */
|
/* loop through all the pixel formats */
|
||||||
for(i = 1; i <= maxpf; i++)
|
for(i = 1; i <= maxpf; i++)
|
||||||
{
|
{
|
||||||
wglGetPixelFormatAttribivARB(hDC, i, 0, nAttrib, attrib, value);
|
wglGetPixelFormatAttribivARB(hDC, i, 0, n_attrib, attrib, value);
|
||||||
/* only describe this format if it supports OpenGL */
|
/* only describe this format if it supports OpenGL */
|
||||||
if (!value[0]) continue;
|
if (!value[0]) continue;
|
||||||
/* by default show only fully accelerated window or pbuffer capable visuals */
|
/* by default show only fully accelerated window or pbuffer capable visuals */
|
||||||
if (!showall
|
if (!showall
|
||||||
&& ((value[2] && !value[1])
|
&& ((value[2] && !value[1])
|
||||||
|| (!wglew.ARB_pbuffer || !value[21])
|
|| (!wglew.ARB_pbuffer || !value[n_pbuffer])
|
||||||
|| (value[3] != WGL_FULL_ACCELERATION_ARB))) continue;
|
|| (value[3] != WGL_FULL_ACCELERATION_ARB))) continue;
|
||||||
/* print out the information for this visual */
|
/* print out the information for this visual */
|
||||||
/* visual id */
|
/* visual id */
|
||||||
@ -115,25 +122,30 @@ VisualInfoARB (HDC hDC, int verbose)
|
|||||||
/* visual type */
|
/* visual type */
|
||||||
if (value[1])
|
if (value[1])
|
||||||
{
|
{
|
||||||
if (wglew.ARB_pbuffer && value[21]) fprintf(file, "wp ");
|
if (wglew.ARB_pbuffer && value[n_pbuffer]) fprintf(file, "wp ");
|
||||||
else fprintf(file, "wn ");
|
else fprintf(file, "wn ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (value[2]) fprintf(file, "bm ");
|
if (value[2]) fprintf(file, "bm ");
|
||||||
else if (wglew.ARB_pbuffer && value[21]) fprintf(file, "pb ");
|
else if (wglew.ARB_pbuffer && value[n_pbuffer]) fprintf(file, "pb ");
|
||||||
}
|
}
|
||||||
/* acceleration */
|
/* acceleration */
|
||||||
fprintf(file, "%s", value[3] == WGL_FULL_ACCELERATION_ARB ? "fu" :
|
fprintf(file, "%s", value[3] == WGL_FULL_ACCELERATION_ARB ? "fu" :
|
||||||
value[3] == WGL_GENERIC_ACCELERATION_ARB ? "ge" :
|
value[3] == WGL_GENERIC_ACCELERATION_ARB ? "ge" :
|
||||||
value[3] == WGL_NO_ACCELERATION_ARB ? "no" : ". ");
|
value[3] == WGL_NO_ACCELERATION_ARB ? "no" : ". ");
|
||||||
/* format */
|
/* format */
|
||||||
if (wglew.NV_float_buffer && value[nAttrib-1]) fprintf(file, " f ");
|
if (wglew.NV_float_buffer && value[n_float]) fprintf(file, " f ");
|
||||||
else if (wglew.ATI_pixel_format_float && value[7] == WGL_TYPE_RGBA_FLOAT_ATI) fprintf(file, " f ");
|
else if (wglew.ATI_pixel_format_float && value[7] == WGL_TYPE_RGBA_FLOAT_ATI) fprintf(file, " f ");
|
||||||
else if (value[7] == WGL_TYPE_RGBA_ARB) fprintf(file, " i ");
|
else if (value[7] == WGL_TYPE_RGBA_ARB) fprintf(file, " i ");
|
||||||
else if (value[7] == WGL_TYPE_COLORINDEX_ARB) fprintf(file, " c ");
|
else if (value[7] == WGL_TYPE_COLORINDEX_ARB) fprintf(file, " c ");
|
||||||
/* double buffer */
|
/* double buffer */
|
||||||
fprintf(file, " %c ", value[5] ? 'y' : '.');
|
fprintf(file, " %c ", value[5] ? 'y' : '.');
|
||||||
|
/* swap method */
|
||||||
|
if (value[4] == WGL_SWAP_EXCHANGE_ARB) fprintf(file, " x ");
|
||||||
|
else if (value[4] == WGL_SWAP_COPY_ARB) fprintf(file, " c ");
|
||||||
|
else if (value[4] == WGL_SWAP_UNDEFINED_ARB) fprintf(file, " . ");
|
||||||
|
else fprintf(file, " . ");
|
||||||
/* stereo */
|
/* stereo */
|
||||||
fprintf(file, " %c | ", value[6] ? 'y' : '.');
|
fprintf(file, " %c | ", value[6] ? 'y' : '.');
|
||||||
/* color size */
|
/* color size */
|
||||||
@ -173,15 +185,24 @@ VisualInfoARB (HDC hDC, int verbose)
|
|||||||
if (value[16]) fprintf(file, "%2d ", value[16]);
|
if (value[16]) fprintf(file, "%2d ", value[16]);
|
||||||
else fprintf(file, " . ");
|
else fprintf(file, " . ");
|
||||||
/* accum alpha */
|
/* accum alpha */
|
||||||
if (value[17]) fprintf(file, "%2d ", value[17]);
|
if (value[17]) fprintf(file, "%2d | ", value[17]);
|
||||||
|
else fprintf(file, " . | ");
|
||||||
|
/* overlay */
|
||||||
|
if (value[21]) fprintf(file, "%2d ", value[21]);
|
||||||
|
else fprintf(file, " . ");
|
||||||
|
/* underlay */
|
||||||
|
if (value[22]) fprintf(file, "%2d ", value[22]);
|
||||||
|
else fprintf(file, " . ");
|
||||||
|
/* layer swap */
|
||||||
|
if (value[23]) fprintf(file, "y ");
|
||||||
else fprintf(file, " . ");
|
else fprintf(file, " . ");
|
||||||
fprintf(file, "|\n");
|
fprintf(file, "|\n");
|
||||||
}
|
}
|
||||||
/* print table footer */
|
/* print table footer */
|
||||||
fprintf(file, " +-----+----------------+-----------------+----------+-----------------+\n");
|
fprintf(file, " +-----+-------------------+-----------------+----------+-----------------+----------+\n");
|
||||||
fprintf(file, " | | visual | color | ax dp st | accum |\n");
|
fprintf(file, " | | visual | color | ax dp st | accum | layer |\n");
|
||||||
fprintf(file, " | id | tp ac fm db st | sz r g b a | bf th cl | sz r g b a |\n");
|
fprintf(file, " | id | tp ac fm db sw st | sz r g b a | bf th cl | sz r g b a | ov un sw |\n");
|
||||||
fprintf(file, " +-----+----------------+-----------------+----------+-----------------+\n");
|
fprintf(file, " +-----+-------------------+-----------------+----------+-----------------+----------+\n");
|
||||||
}
|
}
|
||||||
else /* verbose */
|
else /* verbose */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user