Skip to content

Commit 81eff3b

Browse files
committed
Fix supported error in extensions and add example
1 parent 0eea3b7 commit 81eff3b

File tree

3 files changed

+1774
-16
lines changed

3 files changed

+1774
-16
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,19 @@ The PRs and new feature development will occur in each binding's repo.
6565
```nim
6666
import opengl
6767
68-
# TODO
68+
# Create a context (GLFW recommended)
69+
70+
if glInit():
71+
echo "OpenGL loaded correctly."
72+
73+
glClearColor(0.68f, 1f, 0.34f, 1f)
74+
glClear(GL_COLOR_BUFFER_BIT)
75+
76+
# You can load extensions
77+
78+
loadGL_ARB_gl_spirv()
79+
if glSpecializeShaderARB == nil:
80+
echo "Extension not available"
6981
```
7082

7183
Check out the references and doc in order to understand OpenGL usage.

0 commit comments

Comments
 (0)