ffgl

Description

Freeframe é um sistema de plugin para efeitos de vídeo em tempo-real multi-plataforma. Fluxus suporta FreeFrame 1.5 também conhecido como FreeFrameGL ou FFGL. Plugins FF CPU de renderização em software não são suportadas no momento. Para mais informação visite http://www.freeframe.org

Example

 (clear)

 (define p (build-pixels 256 256 #t)) ; input pixelprimitive

 (translate (vector 1.1 0 0))
 ; output pixelprimitive - rendering is not active
 ; otherwise it would overwrite the plugin output
 (define op (build-pixels 256 256))

 ; load the FFGLTile plugin from the FreeFrame SDK
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (for ([i (ffgl-get-info)]) ; print plugin information
        (printf "~a~n" i))
   (printf "~a~n" (ffgl-get-parameters)) ; parameter names as strings
   (ffgl-process op p)) ; set destination and source pixelprimitives

 (define (anim)
    ; set plugin parameters as keywords arguments
    (with-ffgl plugin
        (ffgl-set-parameter! #:tilex (/ (mouse-x) (vx (get-screen-size)))
                             #:tiley (/ (mouse-y) (vy (get-screen-size)))))
    ; render to the input pixelprimitive
    (with-pixels-renderer p
        (with-state
            (clear-colour #(0 1 0))
            (scale 5)
            (rotate (vector (* 50 (time)) -17 (* -35 (time))))
            (draw-cube))))

 (every-frame (anim))

(ffgl-load string-nome-do-arquivo tamanho-comprimento tamanho-altura)

Returns número-da-instancia-do-plugin

Carrega um plugin FFGL e retorna uma sua instância. Altura e comprimento do plugin tem de ser da mesma resolução da primitiva piexel que você está prestes a usar.

Example

 (clear)
 ; load the FFGLTile plugin from the FreeFrame SDK
 (define plugin (ffgl-load "FFGLTile" 256 256))

(ffgl-get-info)

Returns (lista de numero-versao-plugin string-id-plugin string-nome-plugin tipo-simbolo-plugin string-descriçao plugin string-sobre-plugin)

Retorna informação sobre o plugin.

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (for ([i (ffgl-get-info)]) ; print plugin information
        (printf "~a~n" i)))

(ffgl-get-parameters)

Returns lista-string-parametros

Retorna a lista com os parametros

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (printf "~a~n" (ffgl-get-parameters)))

(ffgl-get-parameter-default simbolo-nome-parametro)

Returns valor-padrao-parametro

Retorna o valor padrão do parametro dado.

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (printf "tilex default: ~a~n" (ffgl-get-parameter-default 'tilex)))

(ffgl-get-parameter simbolo-nome-parametro)

Returns valor-parametro

Retorna o valor atual do parametro dado.

Example

 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (printf "tilex default: ~a~n" (ffgl-get-parameter 'tilex)))

(ffgl-activate booleano)

Returns void

Ativa, desativa o plugin.

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (ffgl-activate #t))

(ffgl-active?)

Returns booleano

Retorna #t se o plugin está ativo, ou #f se não.

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (when (ffgl-active?)
     (display "plugin is active")))

(ffgl-get-min-inputs)

Returns número

Retorna o número mínimo de primitivas pixel que o plugin precisa.

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (printf "~a~n" (ffgl-get-min-inputs)))

(ffgl-get-max-inputs)

Returns número

Retorna o número máximo de primitivas pixel que o plugin aceita.

Example

 (clear)
 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (printf "~a~n" (ffgl-get-max-inputs)))

(ffgl-set-time! número-tempo)

Returns void

Ajusta o tempo em segundos

Example

 (clear)
 (define plugin (ffgl-load "FFGLTime" 256 256))

 (with-ffgl plugin
   (ffgl-set-time! (time)))

(ffgl-process numero-saida-primitivapixelid número-entrada-primitivapixelid)

Returns void

Ajusta primitivas pixel de saída e entrada para a primitiva pega. A resolução das primitivas pixel tem de ser as mesmas do plugin inicializado.

Example

 (clear)

 (define p (build-pixels 256 256 #t))
 (define op (build-pixels 256 256))

 (define plugin (ffgl-load "FFGLTile" 256 256))

 (with-ffgl plugin
   (ffgl-process op p))

 (define (anim)
    (with-pixels-renderer p
        (with-state
            (clear-colour #(0 1 0))
            (scale 5)
            (rotate (vector (* 50 (time)) -17 (* -35 (time))))
            (draw-cube))))

 (every-frame (anim))

(ffgl-clear-instances)

Returns void

Limpa as instancias do plugin FFGL

Example

 (ffgl-clear-instances)

(ffgl-clear-cache)

Returns void

Limpa o cache e instancias do plugin FFGL

Example

 (ffgl-clear-cache)