| 105 | } |
| 106 | |
| 107 | void PullInfo() { |
| 108 | printf("================================================================================\n"); |
| 109 | |
| 110 | int major, minor, rev; |
| 111 | glfwGetVersion(&major, &minor, &rev); |
| 112 | printf("GLFW version is %i.%i.%i\n", major, minor, rev); |
| 113 | |
| 114 | int width, height; |
| 115 | glfwGetWindowSize(&width, &height); |
| 116 | printf("Window size is %i %i\n", width, height); |
| 117 | |
| 118 | int status = glfwGetKey(GLFW_KEY_LCTRL); |
| 119 | if (status == GLFW_PRESS) { |
| 120 | printf("Left control is pressed\n"); |
| 121 | } else { |
| 122 | printf("Left control is released\n"); |
| 123 | } |
| 124 | |
| 125 | status = glfwGetMouseButton(GLFW_MOUSE_BUTTON_1); |
| 126 | if (status == GLFW_PRESS) { |
| 127 | printf("Mouse button 1 is pressed\n"); |
| 128 | } else { |
| 129 | printf("Mouse button 1 is released\n"); |
| 130 | } |
| 131 | |
| 132 | int x, y; |
| 133 | glfwGetMousePos(&x, &y); |
| 134 | printf("Mouse position is %i %i\n", x, y); |
| 135 | |
| 136 | int wheel = glfwGetMouseWheel(); |
| 137 | printf("Mouse wheel pos is %i\n", wheel); |
| 138 | |
| 139 | double time = glfwGetTime(); |
| 140 | printf("Time is %f\n", time); |
| 141 | |
| 142 | glfwGetGLVersion(&major, &minor, &rev); |
| 143 | printf("GL version is %i.%i.%i\n", major, minor, rev); |
| 144 | |
| 145 | int proc = glfwGetNumberOfProcessors(); |
| 146 | printf("%i processors are available\n", proc); |
| 147 | |
| 148 | unsigned int i; |
| 149 | for (i = 0; i<nb_params; i++) { |
| 150 | printf(" - %-27s : %i\n", GetParamName(params[i]), glfwGetWindowParam(params[i])); |
| 151 | } |
| 152 | |
| 153 | const char* extension = "WEBGL_compressed_texture_s3tc"; |
| 154 | printf("'%s' extension is %s.\n", extension, glfwExtensionSupported(extension) ? "supported" : "not supported"); |
| 155 | |
| 156 | extension = "GL_EXT_framebuffer_object"; |
| 157 | printf("'%s' extension is %s.\n", extension, glfwExtensionSupported(extension) ? "supported" : "not supported"); |
| 158 | |
| 159 | extension = "glBindBuffer"; |
| 160 | void* proc_addr = glfwGetProcAddress(extension); |
| 161 | printf("'%s' extension proc address is %p.\n", extension, proc_addr); |
| 162 | |
| 163 | printf("Sleeping 1 sec...\n"); |
| 164 | glfwSleep(1); |
no test coverage detected