mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Change OpenGL help section in README.md
This commit is contained in:
@@ -351,8 +351,6 @@ You have two options to use OpenGL with sdl2:
|
||||
|
||||
## Use sdl2::render
|
||||
|
||||
Then you need to add some initialization code to establish the bindings.
|
||||
|
||||
First, find the OpenGL driver from SDL:
|
||||
|
||||
```rust
|
||||
@@ -366,6 +364,8 @@ fn find_sdl_gl_driver() -> Option<u32> {
|
||||
}
|
||||
```
|
||||
|
||||
This is especially relevant on non-linux systems where the default render engine will something else (for instance DirectX on Windows).
|
||||
|
||||
Next, initialize the SDL2 subsystems, and create your window with the OpenGL canvas:
|
||||
|
||||
```rust
|
||||
|
||||
Reference in New Issue
Block a user