# GlContextInfo

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-opengl/struct-glcontextinfo/

**struct** · [`ferroui-opengl`](/docs/0.5.0/api/ferroui-opengl/) · v0.5.0

```rust
struct GlContextInfo
```

What a context is: its version and its extensions.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/gl_interface.rs#L10)

## Members

- [`new`](#function-new)
- [`create`](#function-create)
- [`version`](#function-version)
- [`extensions`](#function-extensions)

<a id="function-new"></a>

### new

```rust
fn new(version: GlVersion, extensions: HashSet<String>) -> Self
```

Describes a context.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/gl_interface.rs#L17)

<a id="function-create"></a>

### create

```rust
unsafe fn create(version: GlVersion, get_proc_address: &GetProcAddress) -> GlContextInfo
```

Describes the current context, asking it for its extensions.
## Safety
See `GlBasicInfoInterface::new`.
## Panics
Panics when a required entry point cannot be resolved; see
`GlContextInfo::try_create`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/gl_interface.rs#L29)

<a id="function-version"></a>

### version

```rust
fn version(self: &Self) -> GlVersion
```

The version of the API.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/gl_interface.rs#L47)

<a id="function-extensions"></a>

### extensions

```rust
fn extensions(self: &Self) -> &HashSet<String>
```

The names of the supported extensions.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/gl_interface.rs#L52)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
