No matching definitions.

opengl/draw

src/opengl/draw.tur
defn

draw-arrays

(draw-arrays [mode :cstr first :int count :int] :void)

render primitives from currently-bound VAO vertex data.

modeprimitive type keyword: :triangles | :lines | :points |
:triangle-strip | :triangle-fan | :line-strip | :line-loop
firstindex of the first vertex to render
countnumber of vertices to render
(draw-arrays ":triangles" 0 3)   ; render one triangle

Since: v0.1.0

defn

draw-elements

(draw-elements [mode :cstr count :int idx-type :cstr] :void)

render indexed primitives from the bound VAO and EBO.

modeprimitive type keyword (same as draw-arrays)
countnumber of indices to render
idx-typeindex element type keyword:
:unsigned-int | :unsigned-short | :unsigned-byte
(draw-elements ":triangles" 36 ":unsigned-int")   ; cube (12 tris)

Since: v0.1.0

defn

enable

(enable [cap :cstr] :void)

enable a GL server-side capability.

capcapability keyword:
:depth-test | :blend | :cull-face | :stencil-test |
:scissor-test | :multisample
(enable ":depth-test")

Since: v0.1.0

defn

disable

(disable [cap :cstr] :void)

disable a GL server-side capability.

capcapability keyword (same as enable)

Since: v0.1.0

defn

depth-test

(depth-test :void)

enable depth testing (GL_DEPTH_TEST with GL_LESS).

(depth-test)

Since: v0.1.0

defn

blending

(blending :void)

enable standard alpha blending (src-alpha / one-minus-src-alpha).

(blending)

Since: v0.1.0