context.c
Go to the documentation of this file.
1 //========================================================================
2 // GLFW 3.1 - www.glfw.org
3 //------------------------------------------------------------------------
4 // Copyright (c) 2002-2006 Marcus Geelnard
5 // Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
6 //
7 // This software is provided 'as-is', without any express or implied
8 // warranty. In no event will the authors be held liable for any damages
9 // arising from the use of this software.
10 //
11 // Permission is granted to anyone to use this software for any purpose,
12 // including commercial applications, and to alter it and redistribute it
13 // freely, subject to the following restrictions:
14 //
15 // 1. The origin of this software must not be misrepresented; you must not
16 // claim that you wrote the original software. If you use this software
17 // in a product, an acknowledgment in the product documentation would
18 // be appreciated but is not required.
19 //
20 // 2. Altered source versions must be plainly marked as such, and must not
21 // be misrepresented as being the original software.
22 //
23 // 3. This notice may not be removed or altered from any source
24 // distribution.
25 //
26 //========================================================================
27 
28 #include "internal.h"
29 
30 #include <stdio.h>
31 #include <string.h>
32 #include <limits.h>
33 #include <stdio.h>
34 
35 
36 // Parses the client API version string and extracts the version number
37 //
38 static GLboolean parseVersionString(int* api, int* major, int* minor, int* rev)
39 {
40  int i;
41  _GLFWwindow* window;
42  const char* version;
43  const char* prefixes[] =
44  {
45  "OpenGL ES-CM ",
46  "OpenGL ES-CL ",
47  "OpenGL ES ",
48  NULL
49  };
50 
51  *api = GLFW_OPENGL_API;
52 
54 
55  version = (const char*) window->GetString(GL_VERSION);
56  if (!version)
57  {
59  "Failed to retrieve context version string");
60  return GL_FALSE;
61  }
62 
63  for (i = 0; prefixes[i]; i++)
64  {
65  const size_t length = strlen(prefixes[i]);
66 
67  if (strncmp(version, prefixes[i], length) == 0)
68  {
69  version += length;
70  *api = GLFW_OPENGL_ES_API;
71  break;
72  }
73  }
74 
75  if (!sscanf(version, "%d.%d.%d", major, minor, rev))
76  {
78  "No version found in context version string");
79  return GL_FALSE;
80  }
81 
82  return GL_TRUE;
83 }
84 
85 
89 
91 {
92  if (ctxconfig->api != GLFW_OPENGL_API &&
93  ctxconfig->api != GLFW_OPENGL_ES_API)
94  {
95  _glfwInputError(GLFW_INVALID_ENUM, "Invalid client API");
96  return GL_FALSE;
97  }
98 
99  if (ctxconfig->api == GLFW_OPENGL_API)
100  {
101  if ((ctxconfig->major < 1 || ctxconfig->minor < 0) ||
102  (ctxconfig->major == 1 && ctxconfig->minor > 5) ||
103  (ctxconfig->major == 2 && ctxconfig->minor > 1) ||
104  (ctxconfig->major == 3 && ctxconfig->minor > 3))
105  {
106  // OpenGL 1.0 is the smallest valid version
107  // OpenGL 1.x series ended with version 1.5
108  // OpenGL 2.x series ended with version 2.1
109  // OpenGL 3.x series ended with version 3.3
110  // For now, let everything else through
111 
113  "Invalid OpenGL version %i.%i",
114  ctxconfig->major, ctxconfig->minor);
115  return GL_FALSE;
116  }
117 
118  if (ctxconfig->profile)
119  {
120  if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE &&
121  ctxconfig->profile != GLFW_OPENGL_COMPAT_PROFILE)
122  {
124  "Invalid OpenGL profile");
125  return GL_FALSE;
126  }
127 
128  if (ctxconfig->major < 3 ||
129  (ctxconfig->major == 3 && ctxconfig->minor < 2))
130  {
131  // Desktop OpenGL context profiles are only defined for version 3.2
132  // and above
133 
135  "Context profiles are only defined for OpenGL version 3.2 and above");
136  return GL_FALSE;
137  }
138  }
139 
140  if (ctxconfig->forward && ctxconfig->major < 3)
141  {
142  // Forward-compatible contexts are only defined for OpenGL version 3.0 and above
144  "Forward-compatibility is only defined for OpenGL version 3.0 and above");
145  return GL_FALSE;
146  }
147  }
148  else if (ctxconfig->api == GLFW_OPENGL_ES_API)
149  {
150  if (ctxconfig->major < 1 || ctxconfig->minor < 0 ||
151  (ctxconfig->major == 1 && ctxconfig->minor > 1) ||
152  (ctxconfig->major == 2 && ctxconfig->minor > 0))
153  {
154  // OpenGL ES 1.0 is the smallest valid version
155  // OpenGL ES 1.x series ended with version 1.1
156  // OpenGL ES 2.x series ended with version 2.0
157  // For now, let everything else through
158 
160  "Invalid OpenGL ES version %i.%i",
161  ctxconfig->major, ctxconfig->minor);
162  return GL_FALSE;
163  }
164  }
165 
166  if (ctxconfig->robustness)
167  {
168  if (ctxconfig->robustness != GLFW_NO_RESET_NOTIFICATION &&
170  {
172  "Invalid context robustness mode");
173  return GL_FALSE;
174  }
175  }
176 
177  if (ctxconfig->release)
178  {
179  if (ctxconfig->release != GLFW_RELEASE_BEHAVIOR_NONE &&
180  ctxconfig->release != GLFW_RELEASE_BEHAVIOR_FLUSH)
181  {
183  "Invalid context release behavior");
184  return GL_FALSE;
185  }
186  }
187 
188  return GL_TRUE;
189 }
190 
192  const _GLFWfbconfig* alternatives,
193  unsigned int count)
194 {
195  unsigned int i;
196  unsigned int missing, leastMissing = UINT_MAX;
197  unsigned int colorDiff, leastColorDiff = UINT_MAX;
198  unsigned int extraDiff, leastExtraDiff = UINT_MAX;
199  const _GLFWfbconfig* current;
200  const _GLFWfbconfig* closest = NULL;
201 
202  for (i = 0; i < count; i++)
203  {
204  current = alternatives + i;
205 
206  if (desired->stereo > 0 && current->stereo == 0)
207  {
208  // Stereo is a hard constraint
209  continue;
210  }
211 
212  if (desired->doublebuffer != current->doublebuffer)
213  {
214  // Double buffering is a hard constraint
215  continue;
216  }
217 
218  // Count number of missing buffers
219  {
220  missing = 0;
221 
222  if (desired->alphaBits > 0 && current->alphaBits == 0)
223  missing++;
224 
225  if (desired->depthBits > 0 && current->depthBits == 0)
226  missing++;
227 
228  if (desired->stencilBits > 0 && current->stencilBits == 0)
229  missing++;
230 
231  if (desired->auxBuffers > 0 &&
232  current->auxBuffers < desired->auxBuffers)
233  {
234  missing += desired->auxBuffers - current->auxBuffers;
235  }
236 
237  if (desired->samples > 0 && current->samples == 0)
238  {
239  // Technically, several multisampling buffers could be
240  // involved, but that's a lower level implementation detail and
241  // not important to us here, so we count them as one
242  missing++;
243  }
244  }
245 
246  // These polynomials make many small channel size differences matter
247  // less than one large channel size difference
248 
249  // Calculate color channel size difference value
250  {
251  colorDiff = 0;
252 
253  if (desired->redBits != GLFW_DONT_CARE)
254  {
255  colorDiff += (desired->redBits - current->redBits) *
256  (desired->redBits - current->redBits);
257  }
258 
259  if (desired->greenBits != GLFW_DONT_CARE)
260  {
261  colorDiff += (desired->greenBits - current->greenBits) *
262  (desired->greenBits - current->greenBits);
263  }
264 
265  if (desired->blueBits != GLFW_DONT_CARE)
266  {
267  colorDiff += (desired->blueBits - current->blueBits) *
268  (desired->blueBits - current->blueBits);
269  }
270  }
271 
272  // Calculate non-color channel size difference value
273  {
274  extraDiff = 0;
275 
276  if (desired->alphaBits != GLFW_DONT_CARE)
277  {
278  extraDiff += (desired->alphaBits - current->alphaBits) *
279  (desired->alphaBits - current->alphaBits);
280  }
281 
282  if (desired->depthBits != GLFW_DONT_CARE)
283  {
284  extraDiff += (desired->depthBits - current->depthBits) *
285  (desired->depthBits - current->depthBits);
286  }
287 
288  if (desired->stencilBits != GLFW_DONT_CARE)
289  {
290  extraDiff += (desired->stencilBits - current->stencilBits) *
291  (desired->stencilBits - current->stencilBits);
292  }
293 
294  if (desired->accumRedBits != GLFW_DONT_CARE)
295  {
296  extraDiff += (desired->accumRedBits - current->accumRedBits) *
297  (desired->accumRedBits - current->accumRedBits);
298  }
299 
300  if (desired->accumGreenBits != GLFW_DONT_CARE)
301  {
302  extraDiff += (desired->accumGreenBits - current->accumGreenBits) *
303  (desired->accumGreenBits - current->accumGreenBits);
304  }
305 
306  if (desired->accumBlueBits != GLFW_DONT_CARE)
307  {
308  extraDiff += (desired->accumBlueBits - current->accumBlueBits) *
309  (desired->accumBlueBits - current->accumBlueBits);
310  }
311 
312  if (desired->accumAlphaBits != GLFW_DONT_CARE)
313  {
314  extraDiff += (desired->accumAlphaBits - current->accumAlphaBits) *
315  (desired->accumAlphaBits - current->accumAlphaBits);
316  }
317 
318  if (desired->samples != GLFW_DONT_CARE)
319  {
320  extraDiff += (desired->samples - current->samples) *
321  (desired->samples - current->samples);
322  }
323 
324  if (desired->sRGB && !current->sRGB)
325  extraDiff++;
326  }
327 
328  // Figure out if the current one is better than the best one found so far
329  // Least number of missing buffers is the most important heuristic,
330  // then color buffer size match and lastly size match for other buffers
331 
332  if (missing < leastMissing)
333  closest = current;
334  else if (missing == leastMissing)
335  {
336  if ((colorDiff < leastColorDiff) ||
337  (colorDiff == leastColorDiff && extraDiff < leastExtraDiff))
338  {
339  closest = current;
340  }
341  }
342 
343  if (current == closest)
344  {
345  leastMissing = missing;
346  leastColorDiff = colorDiff;
347  leastExtraDiff = extraDiff;
348  }
349  }
350 
351  return closest;
352 }
353 
355 {
357 
358  window->GetIntegerv = (PFNGLGETINTEGERVPROC) glfwGetProcAddress("glGetIntegerv");
359  window->GetString = (PFNGLGETSTRINGPROC) glfwGetProcAddress("glGetString");
360  window->Clear = (PFNGLCLEARPROC) glfwGetProcAddress("glClear");
361 
362  if (!parseVersionString(&window->context.api,
363  &window->context.major,
364  &window->context.minor,
365  &window->context.revision))
366  {
367  return GL_FALSE;
368  }
369 
370 #if defined(_GLFW_USE_OPENGL)
371  if (window->context.major > 2)
372  {
373  // OpenGL 3.0+ uses a different function for extension string retrieval
374  // We cache it here instead of in glfwExtensionSupported mostly to alert
375  // users as early as possible that their build may be broken
376 
377  window->GetStringi = (PFNGLGETSTRINGIPROC) glfwGetProcAddress("glGetStringi");
378  if (!window->GetStringi)
379  {
381  "Entry point retrieval is broken");
382  return GL_FALSE;
383  }
384  }
385 
386  if (window->context.api == GLFW_OPENGL_API)
387  {
388  // Read back context flags (OpenGL 3.0 and above)
389  if (window->context.major >= 3)
390  {
391  GLint flags;
392  window->GetIntegerv(GL_CONTEXT_FLAGS, &flags);
393 
395  window->context.forward = GL_TRUE;
396 
397  if (flags & GL_CONTEXT_FLAG_DEBUG_BIT)
398  window->context.debug = GL_TRUE;
399  else if (glfwExtensionSupported("GL_ARB_debug_output") &&
400  ctxconfig->debug)
401  {
402  // HACK: This is a workaround for older drivers (pre KHR_debug)
403  // not setting the debug bit in the context flags for
404  // debug contexts
405  window->context.debug = GL_TRUE;
406  }
407  }
408 
409  // Read back OpenGL context profile (OpenGL 3.2 and above)
410  if (window->context.major > 3 ||
411  (window->context.major == 3 && window->context.minor >= 2))
412  {
413  GLint mask;
414  window->GetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);
415 
418  else if (mask & GL_CONTEXT_CORE_PROFILE_BIT)
420  else if (glfwExtensionSupported("GL_ARB_compatibility"))
421  {
422  // HACK: This is a workaround for the compatibility profile bit
423  // not being set in the context flags if an OpenGL 3.2+
424  // context was created without having requested a specific
425  // version
427  }
428  }
429 
430  // Read back robustness strategy
431  if (glfwExtensionSupported("GL_ARB_robustness"))
432  {
433  // NOTE: We avoid using the context flags for detection, as they are
434  // only present from 3.0 while the extension applies from 1.1
435 
436  GLint strategy;
438 
439  if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)
441  else if (strategy == GL_NO_RESET_NOTIFICATION_ARB)
443  }
444  }
445  else
446  {
447  // Read back robustness strategy
448  if (glfwExtensionSupported("GL_EXT_robustness"))
449  {
450  // NOTE: The values of these constants match those of the OpenGL ARB
451  // one, so we can reuse them here
452 
453  GLint strategy;
455 
456  if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)
458  else if (strategy == GL_NO_RESET_NOTIFICATION_ARB)
460  }
461  }
462 
463  if (glfwExtensionSupported("GL_KHR_context_flush_control"))
464  {
465  GLint behavior;
466  window->GetIntegerv(GL_CONTEXT_RELEASE_BEHAVIOR, &behavior);
467 
468  if (behavior == GL_NONE)
470  else if (behavior == GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH)
472  }
473 #endif // _GLFW_USE_OPENGL
474 
475  return GL_TRUE;
476 }
477 
479 {
481 
482  if (window->context.major < ctxconfig->major ||
483  (window->context.major == ctxconfig->major &&
484  window->context.minor < ctxconfig->minor))
485  {
486  // The desired OpenGL version is greater than the actual version
487  // This only happens if the machine lacks {GLX|WGL}_ARB_create_context
488  // /and/ the user has requested an OpenGL version greater than 1.0
489 
490  // For API consistency, we emulate the behavior of the
491  // {GLX|WGL}_ARB_create_context extension and fail here
492 
494  return GL_FALSE;
495  }
496 
497  return GL_TRUE;
498 }
499 
500 int _glfwStringInExtensionString(const char* string, const char* extensions)
501 {
502  const char* start = extensions;
503 
504  for (;;)
505  {
506  const char* where;
507  const char* terminator;
508 
509  where = strstr(start, string);
510  if (!where)
511  return GL_FALSE;
512 
513  terminator = where + strlen(string);
514  if (where == start || *(where - 1) == ' ')
515  {
516  if (*terminator == ' ' || *terminator == '\0')
517  break;
518  }
519 
520  start = terminator;
521  }
522 
523  return GL_TRUE;
524 }
525 
526 
530 
532 {
533  _GLFWwindow* window = (_GLFWwindow*) handle;
536 }
537 
539 {
542 }
543 
545 {
546  _GLFWwindow* window = (_GLFWwindow*) handle;
548  _glfwPlatformSwapBuffers(window);
549 }
550 
551 GLFWAPI void glfwSwapInterval(int interval)
552 {
554 
556  {
558  return;
559  }
560 
561  _glfwPlatformSwapInterval(interval);
562 }
563 
564 GLFWAPI int glfwExtensionSupported(const char* extension)
565 {
566  _GLFWwindow* window;
567 
569 
571  if (!window)
572  {
574  return GL_FALSE;
575  }
576 
577  if (*extension == '\0')
578  {
580  return GL_FALSE;
581  }
582 
583 #if defined(_GLFW_USE_OPENGL)
584  if (window->context.major >= 3)
585  {
586  int i;
587  GLint count;
588 
589  // Check if extension is in the modern OpenGL extensions string list
590 
591  window->GetIntegerv(GL_NUM_EXTENSIONS, &count);
592 
593  for (i = 0; i < count; i++)
594  {
595  const char* en = (const char*) window->GetStringi(GL_EXTENSIONS, i);
596  if (!en)
597  {
599  "Failed to retrieve extension string %i", i);
600  return GL_FALSE;
601  }
602 
603  if (strcmp(en, extension) == 0)
604  return GL_TRUE;
605  }
606  }
607  else
608 #endif // _GLFW_USE_OPENGL
609  {
610  // Check if extension is in the old style OpenGL extensions string
611 
612  const char* extensions = (const char*) window->GetString(GL_EXTENSIONS);
613  if (!extensions)
614  {
616  "Failed to retrieve extension string");
617  return GL_FALSE;
618  }
619 
620  if (_glfwStringInExtensionString(extension, extensions))
621  return GL_TRUE;
622  }
623 
624  // Check if extension is in the platform-specific string
625  return _glfwPlatformExtensionSupported(extension);
626 }
627 
628 GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
629 {
631 
633  {
635  return NULL;
636  }
637 
638  return _glfwPlatformGetProcAddress(procname);
639 }
640 
int revision
Definition: internal.h:258
const GLubyte *APIENTRYP PFNGLGETSTRINGIPROC(GLenum name, GLuint index)
Definition: glext.h:1161
GLboolean debug
Definition: internal.h:191
#define GLFW_OPENGL_ES_API
Definition: glfw3.h:628
PFNGLCLEARPROC Clear
Definition: internal.h:270
GLboolean _glfwIsValidContext(const _GLFWctxconfig *ctxconfig)
Checks whether the current context fulfils the specified hard constraints.
Definition: context.c:478
void _glfwPlatformSwapBuffers(_GLFWwindow *window)
Swaps the front and back buffers of the specified window.
Definition: wgl_context.c:600
_GLFWwindow * _glfwPlatformGetCurrentContext(void)
Returns the window whose context is current on the calling thread.
Definition: win32_tls.c:65
int major(int version)
Definition: rs.cpp:49
int _glfwStringInExtensionString(const char *string, const char *extensions)
Searches an extension string for the specified extension.
Definition: context.c:500
#define GLFWAPI
Definition: glfw3.h:185
GLFWAPI GLFWglproc glfwGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
Definition: context.c:628
#define GLFW_OPENGL_COMPAT_PROFILE
Definition: glfw3.h:636
#define GL_CONTEXT_FLAG_DEBUG_BIT
Definition: glext.h:2255
#define _GLFW_REQUIRE_INIT()
Definition: internal.h:131
#define GL_CONTEXT_PROFILE_MASK
Definition: glext.h:1430
const _GLFWfbconfig * _glfwChooseFBConfig(const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count)
Chooses the framebuffer config that best matches the desired one.
Definition: context.c:191
int accumGreenBits
Definition: internal.h:216
GLFWglproc _glfwPlatformGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
Definition: wgl_context.c:657
GLenum GLint GLuint mask
Definition: glext.h:652
const GLubyte *(APIENTRY * PFNGLGETSTRINGPROC)(GLenum)
Definition: internal.h:73
int _glfwPlatformExtensionSupported(const char *extension)
Returns whether the specified extension is available.
Definition: wgl_context.c:628
#define GLFW_LOSE_CONTEXT_ON_RESET
Definition: glfw3.h:632
#define GLFW_OPENGL_API
Definition: glfw3.h:627
void(APIENTRY * PFNGLGETINTEGERVPROC)(GLenum, GLint *)
Definition: internal.h:74
GLbitfield flags
Definition: glext.h:1478
int stencilBits
Definition: internal.h:214
#define GLFW_RELEASE_BEHAVIOR_NONE
Definition: glfw3.h:648
PFNGLGETSTRINGPROC GetString
Definition: internal.h:269
#define GL_NO_RESET_NOTIFICATION_ARB
Definition: glext.h:3771
#define GLFW_DONT_CARE
Definition: glfw3.h:692
struct GLFWwindow GLFWwindow
Opaque window object.
Definition: glfw3.h:722
#define GL_CONTEXT_CORE_PROFILE_BIT
Definition: glext.h:1409
int release
Definition: internal.h:262
typedef GLint(APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program
int profile
Definition: internal.h:260
#define GLFW_NO_CURRENT_CONTEXT
No context is current for this thread.
Definition: glfw3.h:488
#define _GLFW_REQUIRE_INIT_OR_RETURN(x)
Definition: internal.h:137
#define GL_CONTEXT_RELEASE_BEHAVIOR
Definition: glext.h:2601
#define GL_RESET_NOTIFICATION_STRATEGY_ARB
Definition: glext.h:3770
typedef GLboolean(APIENTRYP PFNGLISQUERYPROC)(GLuint id)
#define GLFW_PLATFORM_ERROR
A platform-specific error occurred that does not match any of the more specific categories.
Definition: glfw3.h:569
GLuint GLuint GLsizei count
Definition: glext.h:111
GLboolean forward
Definition: internal.h:190
PFNGLGETINTEGERVPROC GetIntegerv
Definition: internal.h:268
GLFWAPI void glfwSwapInterval(int interval)
Sets the swap interval for the current context.
Definition: context.c:551
#define GL_CONTEXT_FLAGS
Definition: glext.h:896
int robustness
Definition: internal.h:261
#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
Definition: glext.h:1410
GLFWAPI void glfwSwapBuffers(GLFWwindow *handle)
Swaps the front and back buffers of the specified window.
Definition: context.c:544
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *handle)
Makes the context of the specified window current for the calling thread.
Definition: context.c:531
int accumBlueBits
Definition: internal.h:217
void _glfwPlatformSwapInterval(int interval)
Sets the swap interval for the current context.
Definition: wgl_context.c:613
void(APIENTRY * PFNGLCLEARPROC)(GLbitfield)
Definition: internal.h:72
struct _GLFWwindow::@0 context
int auxBuffers
Definition: internal.h:219
#define GLFW_RELEASE_BEHAVIOR_FLUSH
Definition: glfw3.h:647
#define GLFW_VERSION_UNAVAILABLE
The requested OpenGL or OpenGL ES version is not available.
Definition: glfw3.h:557
GLboolean forward
Definition: internal.h:259
#define GLFW_INVALID_ENUM
One of the arguments to the function was an invalid enum value.
Definition: glfw3.h:498
#define GLFW_INVALID_VALUE
One of the arguments to the function was an invalid value.
Definition: glfw3.h:510
GLboolean _glfwRefreshContextAttribs(const _GLFWctxconfig *ctxconfig)
Retrieves the attributes of the current context.
Definition: context.c:354
void _glfwPlatformMakeContextCurrent(_GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
Definition: wgl_context.c:590
GLboolean _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
Checks whether the desired context attributes are valid.
Definition: context.c:90
static GLboolean parseVersionString(int *api, int *major, int *minor, int *rev)
Definition: context.c:38
#define GLFW_OPENGL_CORE_PROFILE
Definition: glfw3.h:635
int minor(int version)
Definition: rs.cpp:53
GLuint GLsizei GLsizei * length
Definition: glext.h:664
void _glfwInputError(int error, const char *format,...)
Notifies shared code of an error.
#define GL_LOSE_CONTEXT_ON_RESET_ARB
Definition: glext.h:3766
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT
Definition: glext.h:899
int accumAlphaBits
Definition: internal.h:218
GLFWAPI int glfwExtensionSupported(const char *extension)
Returns whether the specified extension is available.
Definition: context.c:564
#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH
Definition: glext.h:2602
Context configuration.
Definition: internal.h:185
Window and context structure.
Definition: internal.h:232
Framebuffer configuration.
Definition: internal.h:207
#define GL_NUM_EXTENSIONS
Definition: glext.h:895
#define GLFW_NO_RESET_NOTIFICATION
Definition: glfw3.h:631
GLFWAPI GLFWwindow * glfwGetCurrentContext(void)
Returns the window whose context is current on the calling thread.
Definition: context.c:538
GLuint start
Definition: glext.h:111
int accumRedBits
Definition: internal.h:215
void(* GLFWglproc)(void)
Client API function pointer type.
Definition: glfw3.h:706
GLboolean debug
Definition: internal.h:259
int doublebuffer
Definition: internal.h:223


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:16