opengl/types
Vao
(Vao)
Every handle below is `:linear` (U1): it is produced once and must be
Vbo
(Vbo)
opaque handle to a Vertex Buffer Object (GLuint).
Ebo
(Ebo)
opaque handle to an Element Buffer Object (GLuint).
Shader
(Shader)
opaque handle to a compiled GL shader (GLuint). Consumed by
Program
(Program)
opaque handle to a linked GL shader program (GLuint).
Window
(Window)
opaque handle to a GLFWwindow* (pointer cast through intptr_t).
Texture
(Texture)
opaque handle to a GL texture (GLuint).
draw-usage->gl
(draw-usage->gl [usage : cstr] :)
map a draw-usage keyword to the GL enum integer.
| usage | :static-draw | :dynamic-draw | :stream-draw |
The GL_* constant as :int.
(draw-usage->gl ":static-draw") ; => GL_STATIC_DRAW (35044)
Since: v0.1.0
shader-stage->gl
(shader-stage->gl [stage : cstr] :)
map a shader-stage keyword to the GL enum integer.
| stage | :vertex | :fragment | :geometry | :compute |
The GL_*_SHADER constant as :int.
(shader-stage->gl ":vertex") ; => GL_VERTEX_SHADER (shader-stage->gl ":fragment") ; => GL_FRAGMENT_SHADER
Since: v0.1.0
draw-mode->gl
(draw-mode->gl [mode : cstr] :)
map a draw-mode keyword to the GL enum integer.
| mode | :triangles | :lines | :points | :triangle-strip | | |
| :triangle-fan | :line-strip | :line-loop |
The GL_* draw mode constant.
Since: v0.1.0
index-type->gl
(index-type->gl [idx-type : cstr] :)
map an index-type keyword to the GL enum integer.
| idx-type | :unsigned-int | :unsigned-short | :unsigned-byte |
The GL_UNSIGNED_* constant.
Since: v0.1.0
wrap-mode->gl
(wrap-mode->gl [mode : cstr] :)
map a texture wrap-mode keyword to the GL enum integer.
| mode | :repeat | :clamp-to-edge | :mirrored-repeat | :clamp-to-border |
Since: v0.1.0
filter-mode->gl
(filter-mode->gl [mode : cstr] :)
map a texture filter-mode keyword to the GL enum integer.
| mode | :nearest | :linear | :nearest-mipmap-nearest | | |
| :linear-mipmap-nearest | :nearest-mipmap-linear | | ||
| :linear-mipmap-linear |
Since: v0.1.0
attrib-type->gl
(attrib-type->gl [type : cstr] :)
map a vertex attribute type keyword to the GL enum integer.
| type | :float | :int | :uint | :byte | :ubyte | :short | :ushort |
Since: v0.1.0
gl-cap->gl
(gl-cap->gl [cap : cstr] :)
map a GL capability keyword to the GL enum integer.
| cap | :depth-test | :blend | :cull-face | :stencil-test | | |
| :scissor-test | :multisample | :line-smooth | :polygon-smooth |
Since: v0.1.0