# CompositionGlContextOptions

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

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

```rust
struct CompositionGlContextOptions
```

Options for creating an OpenGL context that draws into the surfaces of a compositor.

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

## Members

- [`new`](#function-new)
- [`gl_profiles`](#function-gl_profiles)
- [`set_gl_profiles`](#function-set_gl_profiles)

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

### new

```rust
fn new() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/composition/composition_gl_context_options.rs#L10)

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

### gl_profiles

```rust
fn gl_profiles(self: &Self) -> Option<&[GlVersion]>
```

The preferred OpenGL profiles and versions for the created context, in the order of
preference. When none, the defaults of the rendering backend are used.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/composition/composition_gl_context_options.rs#L16)

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

### set_gl_profiles

```rust
fn set_gl_profiles(self: &mut Self, value: Option<Vec<GlVersion>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/composition/composition_gl_context_options.rs#L20)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`

## Availability

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