libepoxy 1.5.4

Typedefs | Functions
gl.h File Reference
`#include "epoxy/common.h"`
`#include "epoxy/gl_generated.h"`

## Typedefs
typedef void(* | epoxy_resolver_stub_t) (void)
typedef epoxy_resolver_stub_t(* | epoxy_resolver_failure_handler_t) (const char *name)

## Functions
bool | epoxy_has_gl_extension (const char *extension)
| Returns true if the given GL extension is supported in the current context. More...
bool | epoxy_is_desktop_gl (void)
| Checks whether we're using OpenGL or OpenGL ES. More...
int | epoxy_gl_version (void)
| Returns the version of OpenGL we are using. More...
int | epoxy_glsl_version (void)
| Returns the version of the GL Shading Language we are using. More...
epoxy_resolver_failure_handler_t | epoxy_set_resolver_failure_handler (epoxy_resolver_failure_handler_t handler)
| Sets the function that will be called every time Epoxy fails to resolve a symbol. More...

## Detailed Description

Provides an implementation of a GL dispatch layer using either global function pointers or a hidden vtable.

You should include `<epoxy/gl.h>` instead of `<GL/gl.h>` and `<GL/glext.h>`.

## Typedef Documentation

## ◆ epoxy_resolver_failure_handler_t

typedef epoxy_resolver_stub_t(* epoxy_resolver_failure_handler_t) (const char *name)

## ◆ epoxy_resolver_stub_t

typedef void(* epoxy_resolver_stub_t) (void)

## Function Documentation

## ◆ epoxy_gl_version()

int epoxy_gl_version | ( | void |  | ) |

Returns the version of OpenGL we are using.

The version is encoded as:

version = major * 10 + minor

So it can be easily used for version comparisons.

Returns
  The encoded version of OpenGL we are using

## ◆ epoxy_glsl_version()

int epoxy_glsl_version | ( | void |  | ) |

Returns the version of the GL Shading Language we are using.

The version is encoded as:

version = major * 100 + minor

So it can be easily used for version comparisons.

Returns
  The encoded version of the GL Shading Language we are using

## ◆ epoxy_has_gl_extension()

bool epoxy_has_gl_extension | ( | const char * | ext | ) |

Returns true if the given GL extension is supported in the current context.

Parameters

  ext | The name of the GL extension

Returns
  `true` if the extension is available

Note
  that this function can't be called from within `glBegin()` and `glEnd()`.

See also
  epoxy_has_egl_extension()
  epoxy_has_glx_extension()

## ◆ epoxy_is_desktop_gl()

bool epoxy_is_desktop_gl | ( | void |  | ) |

Checks whether we're using OpenGL or OpenGL ES.

Returns
  `true` if we're using OpenGL

## ◆ epoxy_set_resolver_failure_handler()

epoxy_resolver_failure_handler_t epoxy_set_resolver_failure_handler | ( | epoxy_resolver_failure_handler_t | handler | ) |

Sets the function that will be called every time Epoxy fails to resolve a symbol.

Parameters

  handler | The new handler function

Returns
  The previous handler function