clinch

API Reference

clinch

An OpenGL Game Engine.

CLINCH

  • Variable *WINDOW*
    nil
    Global window object.
  • Variable *CONTEXT*
    nil
    Global Opengl Contex object.
  • Variable *FBO*
    nil
    Current Frame Buffer Object.
  • Variable *VIEWPORT*
    nil
    Current viewport object.
  • Variable *PROJECTION*
    nil
    Current default projection.
  • Variable *ORTHO-PROJECTION*
    nil
    An automatically generated orthogonal projection for the window. Pixel to pixel.
  • Variable *NODE*
    nil
    Current default node.
  • Variable *TEXTURE*
    nil
    The current texture. Defaults to the window's overlay.
  • Variable *ENTITY*
    nil
    The current entity
  • Variable *UNCOLLECTED*
    (trivial-garbage:make-weak-hash-table :weakness :key-or-value)
    Weak hash of loaded OpenGL objects.
  • Macro ! (&body body)
    Runs body in main thread for safe OpenGL calls. Waits for return value.
  • Macro !! (&body body)
    Runs body in main thread for safe OpenGL calls. Returns immediately.
  • Generic-Function UNLOAD (this &key)
    Unloads an opengl object. Does nothing for non-opengl objects.
  • Method UNLOAD ((this t) &key)
  • Function UNLOAD-ALL-UNCOLLECTED
    Unloads all loaded OpenGL objects.
  • Function DECOMPOSE-TRANSFORM (m)
    Decomposes a matrix into it's position vector3, rotation quaterion and scaling vector3. Useful for creating/updating the node object.
  • Function RAY-TRIANGLE-INTERSECT? (origin ray-dir v0 v1 v2)
    Given an origin, direction and a triangle returns if and where they intersect. Presently does not cull backfacing triangles.
  • Function TOPOLOGICAL-SORT (graph &key (test 'eql))
    Graph is an association list whose keys are objects and whose values are lists of objects on which the corresponding key depends. Test is used to compare elements, and should be a suitable test for hash-tables. Topological-sort returns two values. The first is a list of objects sorted toplogically. The second is a boolean indicating whether all of the objects in the input graph are present in the topological ordering (i.e., the first value).
  • Variable +PI+
    (coerce pi 'single-float)
    A single-float version of pi.
  • Macro ENSURE-FLOAT (x)
    Coerce a number to a single-float.
  • Macro DEGREES->RADIANS (degrees)
    Converts degrees to radians.
  • Macro D->R (degrees)
    Converts degrees to radians.
  • Macro RADIANS->DEGREES (radians)
    Converts radians to degrees.
  • Macro R->D (radians)
    Converts radians to degrees.
  • Function MAKE-ORTHOGONAL-TRANSFORM (width height near far)
    Create a raw CFFI orthogonal matrix.
  • Function MAKE-FRUSTUM-TRANSFORM (left right bottom top near far)
    Create a raw CFFI frustum matrix.
  • Function MAKE-PERSPECTIVE-TRANSFORM (fovy aspect znear zfar)
    Create a raw CFFI perspective matrix.
  • Function TRANSFORM-POINT (p m)
  • Function TRANSFORM-POINTS (points matrix)
  • Function UNPROJECT (x y width height inv-transform)
    Unproject from the screen to transform space.
  • Function GET-SCREEN-DIRECTION (lens-1)
    Gets the direction from the middle of the screen.
  • Variable *ROOT*
    nil
    The default root node.
  • Class NODE
    A node class for creating hierarchies of objects. It caches calculations for speed. Not enough in itself, and is not required by Clinch.
    NAME   Accessor: NAME
    TRANS   Reader: TRANSLATION
    ROT   Reader: ROTATION
    SCALE   Reader: SCALING
    T-MATRIX
    R-MATRIX
    S-MATRIX
    TRANSFORM
    CURRENT-TRANSFORM   Reader: CURRENT-TRANSFORM
    ENABLED   Accessor: ENABLED
    CHILDREN   Accessor: CHILDREN
  • Generic-Function (setf TRANSLATION) (val this)
  • Generic-Function (setf ROTATION) (val this)
  • Generic-Function (setf SCALING) (val this)
  • Generic-Function TRANSFORM (this &key)
    get the entire transform.
  • Generic-Function TRANSLATE (this trans &key)
    Translate node. Shortcut is !t.
  • Generic-Function ROTATE (this rot &key)
    Rotate node. Shortcut is !r.
  • Generic-Function SCALE (this scale &key)
    Scale node. Shortcut is !s.
  • Generic-Function N* (this that &key)
    Multiplies nodes and matrix transforms.
  • Method CHANGED? ((this node))
    Has this node changed and not updated?
  • Method (setf CHANGED?) (val (this node))
    Set this node to update later.
  • Method ADD-CHILD ((this node) child &key)
    Add a child. Children must implement update and render.
  • Method REMOVE-CHILD ((this node) child &key)
    Removes a child. Does not unref removed children.
  • Method RENDER ((this node) &key parent (projection *projection*))
    Render child objects. You don't need to build your application with nodes/render. This is just here to help.
  • Method RENDER ((this list) &key parent (projection *projection*))
    Render a list of rendables.
  • Method UPDATE ((this node) &key parent (projection *projection*))
    Render child objects. You don't need to build your application with nodes/render. This is just here to help.
  • Method (setf TRANSLATION) (trans (this node))
    Sets the translation vector.
  • Method (setf ROTATION) (rot (this node))
    Sets the rotation quaterion.
  • Method (setf SCALING) (scale (this node))
    Sets the scaling vector.
  • Method (setf TRANSFORM) (transform (this node))
  • Method TRANSFORM ((this node) &key)
    Gets the transform matrix.
  • Method ROTATE ((this node) rot &key (modify t))
    Rotate the node. Takes a quaterion.
  • Macro !R (this w x y z &optional in-place)
  • Method TRANSLATE ((this node) trans &key (modify t))
    Translate the node. Takes a vector3.
  • Macro !T (this x y z &optional in-place)
  • Method SCALE ((this node) size &key (modify t))
    Scales a node. Takes a vector3.
  • Macro !S (this x y z &optional in-place)
  • Method N* ((this node) (that node) &key new-node)
    Multiplies a node? I'm not sure if this works.
  • Method N* ((this vector) (that node) &key new-node)
    Multiplies a node? I'm not sure if this works.
  • Method N* ((this node) (that vector) &key new-node)
    Multiplies a node? I'm not sure if this works.
  • Method N* ((this vector) (that vector) &key new-node)
    Multiplies a node? I'm not sure if this works.
  • Macro WITH-NODE ((node) &body body)
    A wrapper which sets and unsets the current *node* object.
  • Macro WITH-NEW-NODE ((&optional parent) &body body)
    A wrapper which creates a new node and set it as current.
  • Method TRAVERSE-NODE ((this node))
    Not yet implemented.
  • Method WALK-NODE-TREE (this f &key test non-node)
  • Method WALK-NODE-TREE ((this node) f &key test non-node)
    Render child objects. You don't need to build your application with nodes/render. This is just here to help.
  • Method SHADER-COMPILE ((this shader) &key code defs undefs)
  • Method SHADER-SOURCE ((this shader))
  • Method (setf SHADER-SOURCE) ((code string) (this shader))
  • Method UNLOAD ((this shader) &key)
    Unloads and releases the shader.
  • Class SHADER-PROGRAM
    Creates and keeps track of the shader-program objects. Requires an UNLOAD call when you are done. Bind Buffer functions are in Buffer.l
    NAME   Reader: NAME
    PROGRAM   Reader: PROGRAM
    ATTRIBUTES   Reader: SHADER-PROGRAM-ATTRIBUTES
    UNIFORMS   Reader: SHADER-PROGRAM-UNIFORMS
    KEY   Reader: KEY
  • Method PULLG ((this shader-program) &key)
    Returns shader-program's available information such as shader source, uniforms and attributes.
  • Method USE-SHADER-PROGRAM ((this shader-program) &key)
    Start using the shader-program.
  • Method GET-UNIFORM-ID ((this shader-program) (id integer))
    Shaders pass information by using named values called Uniforms and Attributes. If we are using the raw id, this returns it.
  • Method GET-UNIFORM-ID ((this shader-program) (uniform string))
    Shaders pass information by using named values called Uniforms and Attributes. This gets the gl id of a uniform name.
  • Method GET-ATTRIBUTE-ID ((this shader-program) (id integer))
    Shaders pass information by using named values called Uniforms and Attributes. If we are using the raw id, this returns it.
  • Method GET-ATTRIBUTE-ID ((this shader-program) (attribute string))
    Shaders pass information by using named values called Uniforms and Attributes. This gets the gl id of a attribute name.
  • Method ATTACH-UNIFORM ((this shader-program) (uniform string) value)
    Shaders pass information by using named values called Uniforms and Attributes. This sets a uniform to value.
  • Method ATTACH-UNIFORM ((this shader-program) (uniform string) (matrix array))
    Shaders pass information by using named values called Uniforms and Attributes. This sets a uniform to a matrix value.
  • Method ATTACH-UNIFORM ((this shader-program) (uniform string) (matrix node))
    Shaders pass information by using named values called Uniforms and Attributes. This sets a uniform to the matrix of a node.
  • Method BIND-STATIC-VALUES-TO-ATTRIBUTE ((this shader-program) name vals)
    It is possible to bind static information to an attribute. That's what this does.
  • Method UNLOAD ((this shader-program) &key)
    Unloads and releases all shader-program resources.
  • Function GET-GENERIC-SINGLE-TEXTURE-SHADER
    Creates/returns a shader-program which blits a texture to an entity. Uniforms: P: projection matrix M: model-view matrix t1: texture Attributes: v: Vertexes tc1: texture coordinates
  • Function GET-GENERIC-SOLID-PHONG-SHADER
    Creates/returns a shader-program which uses simple phong shading with a single color. Uniforms: P: projection matrix M: model-view matrix ambientLight: Ambient Light Color lightDirection: Direction of light lightIntensity: Color of light color: color of object Attributes: v: Vertexes
  • Function GET-GENERIC-SINGLE-DIFFUSE-LIGHT-SHADER
  • Function GET-GENERIC-SINGLE-DIFFUSE-LIGHT-ANIMATION-SHADER
  • Function GET-GENERIC-SINGLE-DIFFUSE-LIGHT-PER-VERTEX-COLOR-SHADER
  • Function GET-GENERIC-SINGLE-COLOR-SHADER
  • Function GET-GENERIC-PER-VERTEX-COLOR-SHADER
  • Class BUFFER
    Creates and keeps track of GPU buffer object (shared memory with gpu).
    ID   Reader: ID
    TYPE   Accessor: QTYPE
    USAGE   Accessor: USAGE
    STRIDE   Reader: STRIDE
    VERTEX-COUNT   Reader: VERTEX-COUNT
    TARGET   Reader: TARGET
    LOADED   Accessor: LOADED?
    KEY   Reader: KEY
  • Generic-Function PULLG (this &key)
  • Generic-Function PUSHG (this data &key)
  • Method DATA-FROM-POINTER ((this buffer) pointer)
  • Method BIND ((this buffer) &key index offset length)
    Wrapper around glBindBuffer. Binds this buffer for use.
  • Method UNBIND ((this buffer) &key)
    Wrapper around glBindBuffer with buffer 0, or no buffer.
  • Method GET-SIZE ((this buffer) &key)
    Calculates the number of VALUES (stride + vcount) this buffer contains.
  • Method SIZE-IN-BYTES ((this buffer))
    Calculates how many bytes this buffer consists of.
  • Method BIND-BUFFER-TO-VERTEX-ARRAY ((this buffer) &key index offset length)
    Use buffer in shader for the vertex array: The built-in variable gl_Vertex.
  • Method BIND-BUFFER-TO-ATTRIBUTE-ARRAY ((this buffer) (shader shader-program) name &key index offset length)
    Bind buffer to a shader attribute.
  • Method MAP-BUFFER ((this buffer) &optional (access :read-write))
    Returns a pointer to the buffer data. YOU MUST CALL UNMAP-BUFFER AFTER YOU ARE DONE! Access options are: :Read-Only, :Write-Only, and :READ-WRITE. NOTE: Using :read-write is slower than the others. If you can, use them instead.
  • Method UNMAP-BUFFER ((this buffer))
    Release the pointer given by map-buffer. NOTE: THIS TAKES THE BUFFER OBJECT, NOT THE POINTER! ALSO, DON'T TRY TO RELASE THE POINTER.
  • Method UNLOAD ((this buffer) &key)
    Release buffer resources.
  • Macro WITH-MAPPED-BUFFER ((name buffer &optional (access :read-write)) &body body)
    Convenience macro for mapping and unmapping the buffer data. Name is the symbol name to use for the buffer pointer.
  • Method PULLG ((this buffer) &key index offset size)
    Returns the buffer's data as a vector array.
  • Method PUSHG ((this buffer) (data array) &key)
    Sets the buffer data from a vector array.
  • Method (setf !>) ((data array) (this buffer))
  • Class INDEX-BUFFER  (BUFFER)
    Creates and keeps track of GPU index buffer object (shared memory with gpu).
    ID   Reader: ID
    TYPE   Accessor: QTYPE
    USAGE   Accessor: USAGE
    STRIDE   Reader: STRIDE
    VERTEX-COUNT   Reader: VERTEX-COUNT
    TARGET   Reader: TARGET
    LOADED   Accessor: LOADED?
    KEY   Reader: KEY
  • Method DRAW-WITH-INDEX-BUFFER ((this index-buffer) &key (mode :triangles))
    Use this buffer as an index array and draw somthing.
  • Method DRAW-WITH-RANGED-INDEX-BUFFER ((this index-buffer) &key (start 0) (end (vertex-count this)) (mode :triangles))
    Use this buffer as an index array and draw somthing within start and end bounds.
  • Class TEXTURE
    Creates and keeps track of a texture object. Can be used with a pixelbuffer to speed things up.
    TEX-ID   Accessor: TEX-ID
    WIDTH   Reader: WIDTH
    HEIGHT   Reader: HEIGHT
    TYPE   Accessor: QTYPE
    INTERNAL-FORMAT   Accessor: INTERNAL-FORMAT
    DATA-FORMAT   Accessor: DATA-FORMAT
    STRIDE   Reader: STRIDE
    KEY   Reader: KEY
  • Method DATA-FROM-POINTER ((this texture) pointer)
  • Method GET-SIZE ((this texture) &key)
    Calculates the number of VALUES (stride * vcount) or (stride * width * height) this buffer contains.
  • Method SIZE-IN-BYTES ((this texture))
    Calculates how many bytes this buffer consists of.
  • Method BIND ((this texture) &key)
    Wrapper around glBindBuffer. Puts the texture into play.
  • Method UNBIND ((this texture) &key)
    Unbinds the texture.
  • Method PUSHG ((this texture) (pbo pixel-buffer) &key)
    Sets the texture data from a pixel buffer.
  • Method MAKE-PBO-FOR-TEXTURE ((this texture) &key (usage :static-draw) (target :pixel-unpack-buffer))
    Returns a compatible pixel buffer for a texture.
  • Method PULLG ((tex texture) &key data-format)
    Gets the texture data as a vector array.
  • Method PUSHG ((tex texture) (data array) &key)
    Sets the texture data from a vector array.
  • Method BIND-SAMPLER ((this texture) shader-program name tex-unit)
    Shader-Programs pass information by using named values called Uniforms. Textures are passed using Samplers. This sets a texture-unit to a sampler uniform
  • Method UNLOAD ((this texture) &key)
    Unloads the texture. Also cancels gc finalization.
  • Macro WITH-TEMPORARY-PBO ((var texture &key (usage :static-draw) (target :pixel-unpack-buffer)) &body body)
    Creates a temporary pixel buffer for a texture.
  • Method SET-TEXTURE-COLOR ((this texture) r g b &optional (a 1.0))
  • Function GET-IDENTITY-TEXTURE
    Creates/returns a 1x1 texture with the values (1.0, 1.0, 1.0, 1.0). This is a nice placeholder when you don't want a custom shader.
  • Class ENTITY
    Renders a mesh with a shader-program with attributes and uniforms.
    SHADER-PROGRAM   Reader: SHADER-PROGRAM
    INDEXES   Reader: INDEXES
    MODE   Reader: MODE
    UNIFORMS   Reader: UNIFORMS
    ATTRIBUTES   Reader: ATTRIBUTES
    BONES   Accessor: BONES
    ENABLED   Accessor: ENABLED
  • Method (setf SHADER-PROGRAM) (new-value (this entity))
    Sets the shader-program to use.
  • Method (setf INDEXES) (new-value (this entity))
    Sets the index array.
  • Method ATTRIBUTE ((this entity) name)
    Returns an attribute by name. Should work with numbers and strings.
  • Method (setf ATTRIBUTE) (new-value (this entity) name)
    Sets an attribute's value. If the name doesn't exist, it's added. If the new value is nil, the entry is deleted.
  • Method UNIFORM ((this entity) name)
    Returns a uniform by name. Should work with numbers and strings.
  • Method (setf UNIFORM) (new-value (this entity) name)
    Sets a uniform's value. If the name doesn't exist, it's added. If the new value is nil, the entry is deleted.
  • Macro WITH-ATTRIBUTES (args this &body body)
  • Macro WITH-UNIFORMS (args this &body body)
  • Method RENDER ((this entity) &key parent (projection *projection*))
    Renders the entity (mesh). :parent Sets the parent for the :model
  • Method UPDATE ((this entity) &key parent matrix force)
    Dummy method when updating nodes.
  • Method RAY-ENTITY-INTERSECT? ((this entity) transform start end &optional (primitive :vertices))
  • Method UNLOAD ((this entity) &key all)
    Release entity resources. If :all t, then the index buffer and all uniforms and attributes are unloaded.
  • Class VIEWPORT
    Creates a viewport.
    X   Accessor: X
    Y   Accessor: Y
    WIDTH   Accessor: WIDTH
    HEIGHT   Accessor: HEIGHT
    CLEAR-COLOR   Accessor: CLEAR-COLOR
  • Method RESIZE ((this viewport) x y w h)
    Resize the viewport.
  • Method WIDTH ((this viewport))
    Get viewport width.
  • Method (setf WIDTH) (new-val (this viewport))
    Set viewport width.
  • Method HEIGHT ((this viewport))
    Get the viewport height.
  • Method (setf HEIGHT) (new-val (this viewport))
    Set the viewport height.
  • Method RENDER ((this viewport) &key projection)
    Makes this viewport active.
  • Method QUICK-SET ((this viewport) x y w h)
    A quick method to set all the values in the viewport.
  • Variable *FBO*
    nil
  • Class FRAME-BUFFER
    The Frame Buffer Object or FBO. Use this to render to textures.
    ID   Reader: ID
    TARGET   Accessor: TARGET
    COLOR   Reader: COLOR-ATTACHMENTS
    DEPTH   Reader: DEPTH-BUFFER
    STENCIL   Reader: STENCIL-ATTACHMENTS
    KEY   Reader: KEY
  • Method MAKE-DEPTH-TEXTURE ((this frame-buffer) width height &key (internal-format :depth-component32) (format :depth-component) (qtype :float) (stride 1) (depth-texture-mode :intensity) (texture-compare-mode :compare-r-to-texture) (texture-compare-function :lequal))
    Creates a depth texture for a framebuffer.
  • Method (setf DEPTH-BUFFER) ((db texture) (this frame-buffer))
    Binds the depth buffer for use.
  • Method COLOR-ATTACHMENT ((this frame-buffer) name)
    Returns a color-attachment by number.
  • Method (setf COLOR-ATTACHMENT) (new-value (this frame-buffer) name)
    Sets an attachment's number
  • Method MAKE-COLOR-TEXTURE ((this frame-buffer) index width height &key (pbo nil) (stride 4) (qtype :unsigned-char) (internal-format :rgba) (format :bgra) (wrap-s :repeat) (wrap-t :repeat) (mag-filter :linear) (min-filter :linear) texture-compare-mode texture-compare-function)
    Creates and adds a color buffer for the frame buffer.
  • Method BIND ((this frame-buffer) &key)
    Wrapper around glBindFrameBuffer. Puts the Framebuffer into play.
  • Method BIND ((this null) &key)
    Binds the frame buffer for use.
  • Method UNBIND ((this frame-buffer) &key)
    Wrapper around glBindFrameBuffer. Puts the Framebuffer into play.
  • Method UNLOAD ((this frame-buffer) &key)
    Unloads and releases all frame-buffer resources, also any renderbuffers
  • Macro WITH-FBO ((fbo) &body body)
    Convenience macro for useing and resetting an FBO.
  • Class ANIMATION
    NAME   Accessor: NAME
    FRAMES   Accessor: FRAMES
    REPEAT   Accessor: REPEAT
    RUN-LENGTH   Accessor: RUN-LENGTH
  • Class ANIMATOR
    ANIMATION   Accessor: ANIMATION
    CURRENT-TIME   Accessor: CURRENT-TIME
    PAUSED   Accessor: PAUSED
    REPEAT   Accessor: REPEAT
    RUN-SPEED   Accessor: RUN-SPEED
    RUN-LENGTH   Accessor: RUN-LENGTH
    LAST-UPDATE-TIME
  • Method GET-ANIMATION-TIME (this)
  • Method GET-KEYFRAME (this time &key)
  • Method GET-ANIMATION-TIME ((this list))
  • Method GET-ANIMATION-TIME ((this vector))
  • Method GET-ANIMATION-TIME ((this animation))
  • Method GET-ANIMATION-TIME ((this animator))
  • Method GET-KEYFRAME ((this list) (time number) &key)
  • Method GET-KEYFRAME ((this vector) (time number) &key)
  • Method GET-KEYFRAME ((this animation) (time number) &key)
  • Method GET-KEYFRAME ((this animator) time &key)
  • Generic-Function PLAY (this &key)
  • Generic-Function STOP (this &key)
  • Generic-Function PAUSE (this &key)
  • Generic-Function SKIP (this position &key)
  • Method SKIP ((this animator) position &key)
  • Method UPDATE ((this animator) &key (time *ticks*))
  • Method RENDER ((this animator) &key time)
  • Method PLAY ((this animator) &key)
  • Method PAUSE ((this animator) &key)
  • Method STOP ((this animator) &key)
  • Macro DEFEVENT (event args &body body)
    Creates and updates an event handler. Use this for all your *on-* events. It's just a nice wrapper around (setf event (lambda ...
  • Variable *TICKS*
    nil
    Time elapsed since (init) in milliseconds.
  • Variable *DELTA-TICKS*
    nil
    Change in time (delta time, dt) since the last on-idle call.
  • Variable *CONTROLLERS*
    nil
    An alist of discovered controllers. Format: (controller-id . sdl-controller-handle)
  • Variable *HAPTIC*
    nil
    An alist of discovered haptic feedback devices. Format: (controller-id . sdl-haptic-device-handle)
  • Variable *NEXT*
    nil
    Runs before the next on-idle call. No arguments.
  • Variable *ON-WINDOW-SIZE-CHANGED*
    nil
    Always called when window size changes. Arguments (window width height timestamp)
  • Variable *ON-WINDOW-RESIZED*
    nil
    Always called when window size changes. Arguments (window width height timestamp)
  • Variable *ON-WINDOW-HIDDEN*
    nil
    Called when window is hidden. Arguments (window timestamp)
  • Variable *ON-WINDOW-EXPOSED*
    nil
    Called when window is exposed and need redrawn. Arguments (window timestamp)
  • Variable *ON-WINDOW-MOVED*
    nil
    Called when the window has been moved. Arguments (window x y timestamp)
  • Variable *ON-WINDOW-MINIMIZED*
    nil
    Called when window is minimized. Arguments (window timestamp)
  • Variable *ON-WINDOW-MAXIMIZED*
    nil
    Called when window is maximized. Arguments (window timestamp)
  • Variable *ON-WINDOW-RESTORED*
    nil
    Called when window is restored to normal position and size. Arguments (window timestamp)
  • Variable *ON-WINDOW-ENTER*
    nil
    Called when window gains mouse focus. Arguments (window timestamp)
  • Variable *ON-WINDOW-LEAVE*
    nil
    Called when window is loses mouse focus. Arguments (window timestamp)
  • Variable *ON-WINDOW-FOCUS-GAINED*
    nil
    Called when window gains focus. Arguments (window timestamp)
  • Variable *ON-WINDOW-FOCUS-LOST*
    nil
    Called when window loses focus. Arguments (window timestamp)
  • Variable *ON-WINDOW-CLOSE*
    nil
    Called when window is closing. Arguments (window timestamp)
  • Variable *ON-KEY-DOWN*
    nil
    Called when a key is pressed. Arguments (win keysym state ts)
  • Variable *ON-KEY-UP*
    nil
    Called when a key is released. Arguments (win keysym state ts)
  • Variable *TEXT-EDITING*
    nil
    Called when editing text.
  • Variable *ON-TEXT-INPUT*
    nil
    Call when text input happens.
  • Variable *ON-MOUSE-MOVE*
    nil
    Called when mouse is moved. Arguments (win mouse state x y xrel yrel ts)
  • Variable *ON-MOUSE-DOWN*
    nil
    Called when mouse button is pressed. Arguments: (win mouse x y button state clicks ts)
  • Variable *ON-MOUSE-UP*
    nil
    Called when mouse button is released. Arguments: (win mouse x y button state clicks ts)
  • Variable *ON-MOUSE-CLICK*
    nil
    Called when mouse button is released. Arguments: (win mouse x y button state clicks ts)
  • Variable *ON-MOUSE-DOUBLE-CLICK*
    nil
  • Variable *ON-MOUSE-WHEEL-MOVE*
    nil
    Called when the mouse wheel is moved. Arguments: (win mouse x y ts)
  • Variable *ON-CONTROLLER-BUTTON-DOWN*
    nil
    Called when a controller's button is pressed. Arguments: (controller-id axis-id value timestamp)
  • Variable *ON-CONTROLLER-BUTTON-UP*
    nil
    Called when a controller's button is released. Arguments: (controller-id axis-id value timestamp)
  • Variable *ON-CONTROLLER-ADDED*
    nil
    Called when a new controller is discovered. Arguments: (controller-id axis-id value timestamp)
  • Variable *ON-CONTROLLER-REMOVED*
    nil
    Called when a controller is removed. Arguments: (window data1 data2 timestamp)
  • Variable *ON-CONTROLLER-REMAPPED*
    nil
    Called when a controller is remapped. Arguments: (window data1 data2 timestamp)
  • Variable *ON-CONTROLLER-AXIS-MOVE*
    nil
    Called when a controller's axis moves. Arguments (controller-id axis-id position timestamp)
  • Variable *ON-IDLE*
    nil
    Called when there are no pending events. Take no arguments. Default can be overridden.
  • Variable *DEFAULT-ON-IDLE*
    (lambda ()
      (cl-opengl:clear :color-buffer-bit :depth-buffer-bit)
      (clinch:render clinch:*root* :projection clinch:*ortho-projection*)
      (when clinch:*entity*
        (clinch:render clinch:*entity* :projection clinch:*ortho-projection*)))
    The default on-idle handler. Mapped as both a function and a variable.
  • Function *DEFAULT-ON-IDLE*
  • Variable *ON-QUIT*
    nil
    Called when clinch is about to exit. Take no arguments.
  • Function INIT (&key (asynchronous t) (init-controllers t) (width 800) (height 600) (title "clinch program") (fullscreen nil) (no-frame nil) context-profile-mask alpha-size depth-size stencil-size red-size green-size blue-size buffer-size (double-buffer t) (hidden nil) (resizable t))
    Creates Clinch's window in it's own thread. Use ! (wait and return a value from main thread) or Use !! (return immediately with a nil.
  • Function UNINIT
  • Function MAKE-QUAD (width height &key (center :center) shader-program texture (parent *node*))
    Creates a quad entity of width and height.
  • Method MAKE-QUAD-FOR-TEXTURE ((this texture) &key width height (center :center) shader-program parent no-parent)
    Creates a quad for a texture which defaults to texture's width and height.
  • Method MAKE-QUAD-AND-TEXTURE (width height &key (center :center) shader-program (parent *node*) no-parent)
  • Function GET-DEFAULT-TEXTURE

Also exports

  • RTG-MATH.BASE-VECTORS:V!

clinch-cairo

No packages.

clinch-classimp

No packages.

clinch-freeimage

No packages.

clinch-pango

No packages.