Change OpenGL help section in README.md

This commit is contained in:
Cobrand
2017-11-12 00:38:33 +00:00
committed by GitHub
parent 122cc4a8f2
commit d6c51bb5f5
+2 -2
View File
@@ -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