mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Formatting.
This commit is contained in:
parent
1ab9dbab60
commit
cf10e318d6
139
tests/glfwinfo.c
139
tests/glfwinfo.c
@ -218,6 +218,7 @@ static void print_version(void)
|
|||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
int ch, api, major, minor, revision, profile;
|
int ch, api, major, minor, revision, profile;
|
||||||
|
GLint redbits, greenbits, bluebits, alphabits, depthbits, stencilbits;
|
||||||
GLboolean list = GL_FALSE;
|
GLboolean list = GL_FALSE;
|
||||||
GLFWwindow* window;
|
GLFWwindow* window;
|
||||||
|
|
||||||
@ -557,86 +558,82 @@ int main(int argc, char** argv)
|
|||||||
glGetString(GL_SHADING_LANGUAGE_VERSION));
|
glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("Framebuffer:\n");
|
||||||
|
|
||||||
|
if (api == GLFW_OPENGL_API && profile == GLFW_OPENGL_CORE_PROFILE)
|
||||||
{
|
{
|
||||||
printf("Framebuffer:\n");
|
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC
|
||||||
|
glGetFramebufferAttachmentParameteriv =
|
||||||
GLint redbits, greenbits, bluebits, alphabits, depthbits, stencilbits;
|
(PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)
|
||||||
|
glfwGetProcAddress("glGetFramebufferAttachmentParameteriv");
|
||||||
if (api == GLFW_OPENGL_API && profile == GLFW_OPENGL_CORE_PROFILE)
|
if (!glGetFramebufferAttachmentParameteriv)
|
||||||
{
|
{
|
||||||
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC
|
glfwTerminate();
|
||||||
glGetFramebufferAttachmentParameteriv =
|
exit(EXIT_FAILURE);
|
||||||
(PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)
|
|
||||||
glfwGetProcAddress("glGetFramebufferAttachmentParameteriv");
|
|
||||||
if (!glGetFramebufferAttachmentParameteriv)
|
|
||||||
{
|
|
||||||
glfwTerminate();
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
|
||||||
GL_BACK_LEFT,
|
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE,
|
|
||||||
&redbits);
|
|
||||||
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
|
||||||
GL_BACK_LEFT,
|
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
|
|
||||||
&greenbits);
|
|
||||||
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
|
||||||
GL_BACK_LEFT,
|
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE,
|
|
||||||
&bluebits);
|
|
||||||
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
|
||||||
GL_BACK_LEFT,
|
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
|
|
||||||
&alphabits);
|
|
||||||
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
|
||||||
GL_DEPTH,
|
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,
|
|
||||||
&depthbits);
|
|
||||||
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
|
||||||
GL_STENCIL,
|
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE,
|
|
||||||
&stencilbits);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
glGetIntegerv(GL_RED_BITS, &redbits);
|
|
||||||
glGetIntegerv(GL_GREEN_BITS, &greenbits);
|
|
||||||
glGetIntegerv(GL_BLUE_BITS, &bluebits);
|
|
||||||
glGetIntegerv(GL_ALPHA_BITS, &alphabits);
|
|
||||||
glGetIntegerv(GL_DEPTH_BITS, &depthbits);
|
|
||||||
glGetIntegerv(GL_STENCIL_BITS, &stencilbits);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf(" red: %u green: %u blue: %u alpha: %u depth: %u stencil: %u\n",
|
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
||||||
redbits, greenbits, bluebits, alphabits, depthbits, stencilbits);
|
GL_BACK_LEFT,
|
||||||
|
GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE,
|
||||||
|
&redbits);
|
||||||
|
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
||||||
|
GL_BACK_LEFT,
|
||||||
|
GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
|
||||||
|
&greenbits);
|
||||||
|
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
||||||
|
GL_BACK_LEFT,
|
||||||
|
GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE,
|
||||||
|
&bluebits);
|
||||||
|
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
||||||
|
GL_BACK_LEFT,
|
||||||
|
GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
|
||||||
|
&alphabits);
|
||||||
|
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
||||||
|
GL_DEPTH,
|
||||||
|
GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,
|
||||||
|
&depthbits);
|
||||||
|
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
|
||||||
|
GL_STENCIL,
|
||||||
|
GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE,
|
||||||
|
&stencilbits);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
glGetIntegerv(GL_RED_BITS, &redbits);
|
||||||
|
glGetIntegerv(GL_GREEN_BITS, &greenbits);
|
||||||
|
glGetIntegerv(GL_BLUE_BITS, &bluebits);
|
||||||
|
glGetIntegerv(GL_ALPHA_BITS, &alphabits);
|
||||||
|
glGetIntegerv(GL_DEPTH_BITS, &depthbits);
|
||||||
|
glGetIntegerv(GL_STENCIL_BITS, &stencilbits);
|
||||||
|
}
|
||||||
|
|
||||||
if (api == GLFW_OPENGL_ES_API ||
|
printf(" red: %u green: %u blue: %u alpha: %u depth: %u stencil: %u\n",
|
||||||
glfwExtensionSupported("GL_ARB_multisample") ||
|
redbits, greenbits, bluebits, alphabits, depthbits, stencilbits);
|
||||||
major > 1 || minor >= 3)
|
|
||||||
{
|
|
||||||
GLint samples, samplebuffers;
|
|
||||||
glGetIntegerv(GL_SAMPLES, &samples);
|
|
||||||
glGetIntegerv(GL_SAMPLE_BUFFERS, &samplebuffers);
|
|
||||||
|
|
||||||
printf(" samples: %u sample buffers: %u\n", samples, samplebuffers);
|
if (api == GLFW_OPENGL_ES_API ||
|
||||||
}
|
glfwExtensionSupported("GL_ARB_multisample") ||
|
||||||
|
major > 1 || minor >= 3)
|
||||||
|
{
|
||||||
|
GLint samples, samplebuffers;
|
||||||
|
glGetIntegerv(GL_SAMPLES, &samples);
|
||||||
|
glGetIntegerv(GL_SAMPLE_BUFFERS, &samplebuffers);
|
||||||
|
|
||||||
if (api == GLFW_OPENGL_API && profile != GLFW_OPENGL_CORE_PROFILE)
|
printf(" samples: %u sample buffers: %u\n", samples, samplebuffers);
|
||||||
{
|
}
|
||||||
GLint accumredbits, accumgreenbits, accumbluebits, accumalphabits;
|
|
||||||
GLint auxbuffers;
|
|
||||||
|
|
||||||
glGetIntegerv(GL_ACCUM_RED_BITS, &accumredbits);
|
if (api == GLFW_OPENGL_API && profile != GLFW_OPENGL_CORE_PROFILE)
|
||||||
glGetIntegerv(GL_ACCUM_GREEN_BITS, &accumgreenbits);
|
{
|
||||||
glGetIntegerv(GL_ACCUM_BLUE_BITS, &accumbluebits);
|
GLint accumredbits, accumgreenbits, accumbluebits, accumalphabits;
|
||||||
glGetIntegerv(GL_ACCUM_ALPHA_BITS, &accumalphabits);
|
GLint auxbuffers;
|
||||||
glGetIntegerv(GL_AUX_BUFFERS, &auxbuffers);
|
|
||||||
|
|
||||||
printf(" accum red: %u accum green: %u accum blue: %u accum alpha: %u aux buffers: %u\n",
|
glGetIntegerv(GL_ACCUM_RED_BITS, &accumredbits);
|
||||||
accumredbits, accumgreenbits, accumbluebits, accumalphabits, auxbuffers);
|
glGetIntegerv(GL_ACCUM_GREEN_BITS, &accumgreenbits);
|
||||||
}
|
glGetIntegerv(GL_ACCUM_BLUE_BITS, &accumbluebits);
|
||||||
|
glGetIntegerv(GL_ACCUM_ALPHA_BITS, &accumalphabits);
|
||||||
|
glGetIntegerv(GL_AUX_BUFFERS, &auxbuffers);
|
||||||
|
|
||||||
|
printf(" accum red: %u accum green: %u accum blue: %u accum alpha: %u aux buffers: %u\n",
|
||||||
|
accumredbits, accumgreenbits, accumbluebits, accumalphabits, auxbuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report client API extensions
|
// Report client API extensions
|
||||||
|
Loading…
Reference in New Issue
Block a user