# OpenGlControlBaseImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-opengl/controls/trait-openglcontrolbaseimpl/

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

```rust
trait OpenGlControlBaseImpl: ControlImpl + $crate::Upcast<OpenGlControlBase>
```

The overridable members introduced by the class.

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

## Members

- [`on_open_gl_init`](#function-on_open_gl_init)
- [`on_open_gl_deinit`](#function-on_open_gl_deinit)
- [`on_open_gl_lost`](#function-on_open_gl_lost)
- [`on_open_gl_render`](#function-on_open_gl_render)

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

### on_open_gl_init

```rust
fn on_open_gl_init(this: &Self, gl: &GlInterface)
```

Called when the OpenGL context is first created.

`gl` is the interface for making OpenGL calls. Use `GlInterface::get_proc_address`
to access additional APIs not covered by `GlInterface`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/controls/open_gl_control_base.rs#L55)

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

### on_open_gl_deinit

```rust
fn on_open_gl_deinit(this: &Self, gl: &GlInterface)
```

Called when the OpenGL context is being destroyed.

`gl` is the interface for making OpenGL calls. Use `GlInterface::get_proc_address`
to access additional APIs not covered by `GlInterface`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/controls/open_gl_control_base.rs#L55)

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

### on_open_gl_lost

```rust
fn on_open_gl_lost(this: &Self)
```

Called when the OpenGL context is lost and cannot be recovered.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/controls/open_gl_control_base.rs#L55)

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

### on_open_gl_render

```rust
fn on_open_gl_render(this: &Self, gl: &GlInterface, fb: i32)
```

Called to render the OpenGL content for the current frame.

`gl` is the interface for making OpenGL calls. Use `GlInterface::get_proc_address`
to access additional APIs not covered by `GlInterface`. `fb` is the framebuffer
ID to render into.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.OpenGL/controls/open_gl_control_base.rs#L55)

## Trait implementations

- [`OpenGlControlBaseImpl`](/docs/0.5.0/api/ferroui-opengl/controls/trait-openglcontrolbaseimpl/)

## Availability

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