mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-13 01:21:38 -07:00
OpenGL: updated README
This commit is contained in:
Vendored
+2
-8
@@ -7,17 +7,11 @@ Includes procedures to load OpenGL function pointers. Currently only supports th
|
|||||||
```go
|
```go
|
||||||
gl.load_up_to(4, 5, proc(p: rawptr, name: cstring) do (cast(^rawptr)p)^ = glfw.GetProcAddress(name); );
|
gl.load_up_to(4, 5, proc(p: rawptr, name: cstring) do (cast(^rawptr)p)^ = glfw.GetProcAddress(name); );
|
||||||
```
|
```
|
||||||
[odin-glfw](https://github.com/vassvik/odin-glfw) also provides a useful helper you can pass straight to `gl.load_up_to`:
|
`vendor:glfw` also provides a useful helper you can pass straight to `gl.load_up_to`:
|
||||||
```go
|
```go
|
||||||
gl.load_up_to(4, 5, glfw.gl_set_proc_address);
|
gl.load_up_to(4, 5, glfw.gl_set_proc_address);
|
||||||
```
|
```
|
||||||
|
|
||||||
#### NOTE: It is recommended to put this into the shared collection:
|
|
||||||
```
|
|
||||||
cd /path/to/Odin/shared
|
|
||||||
git clone https://github.com/vassvik/odin-gl.git
|
|
||||||
```
|
|
||||||
|
|
||||||
## Extra utility procedures (Outdated. See the end of `gl.odin`)
|
## Extra utility procedures (Outdated. See the end of `gl.odin`)
|
||||||
|
|
||||||
Some useful helper procedures can be found in `helpers.odin`, for tasks such as:
|
Some useful helper procedures can be found in `helpers.odin`, for tasks such as:
|
||||||
@@ -56,4 +50,4 @@ glGetError() returned NO_ERROR
|
|||||||
glGetError() returned NO_ERROR
|
glGetError() returned NO_ERROR
|
||||||
call: glClearColor(0.800, 0.800, 0.800, 1.000)
|
call: glClearColor(0.800, 0.800, 0.800, 1.000)
|
||||||
in: C:/<snip>/main.odin(272:6)
|
in: C:/<snip>/main.odin(272:6)
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user