No matching definitions.

opengl/types

src/opengl/types.tur
defn

draw-usage->gl

(draw-usage->gl [usage :cstr] :int)

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

defn

shader-stage->gl

(shader-stage->gl [stage :cstr] :int)

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

defn

draw-mode->gl

(draw-mode->gl [mode :cstr] :int)

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

defn

index-type->gl

(index-type->gl [idx-type :cstr] :int)

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

defn

wrap-mode->gl

(wrap-mode->gl [mode :cstr] :int)

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

defn

filter-mode->gl

(filter-mode->gl [mode :cstr] :int)

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

defn

attrib-type->gl

(attrib-type->gl [type :cstr] :int)

map a vertex attribute type keyword to the GL enum integer.

type:float | :int | :uint | :byte | :ubyte | :short | :ushort

Since: v0.1.0

defn

gl-cap->gl

(gl-cap->gl [cap :cstr] :int)

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