diff --git a/.git-ci/gitlab-iem.yml b/.git-ci/gitlab-iem.yml index 9a74a37dc..da6bc05fb 100644 --- a/.git-ci/gitlab-iem.yml +++ b/.git-ci/gitlab-iem.yml @@ -24,7 +24,8 @@ variables: gem_defaultwindow: value: "gemglfw3window" description: "default window backend" - + GIT_SUBMODULE_STRATEGY: recursive + #GIT_SUBMODULE_DEPTH: 1 stages: - build @@ -53,24 +54,64 @@ stages: set -o shwordsplit || true # zsh doesn't do wordsplitting by default... set -o nonomatch || true # zsh bails out if globbing patterns do not expand +.script:set_destdir: &script_set_destdir + - DESTDIR="$(pwd)/${ARTIFACTSDIR}/${CI_JOB_NAME%%-*}" + + +.image:windows: + tags: + - sardinecake + image: registry.git.iem.at/devtools/sardinecake/windows:latest + +.image:macos: + tags: + - tart + image: ghcr.io/cirruslabs/macos-monterey-xcode:latest + .build: stage: build + variables: + localdeps: ".git-ci/iem-ci/localdeps/localdeps" script: - *script_zsh_compat + # set SOURCE_DATE_EPOCH for reproducible builds + - export SOURCE_DATE_EPOCH="$(date --date="${CI_COMMIT_TIMESTAMP}" +%s 2>/dev/null || date -j -f %Y-%m-%dT%H:%M:%S%z "$(echo ${CI_COMMIT_TIMESTAMP} | sed -e 's|\([+-][0-9][0-9]\):\([0-9][0-9]\)$|\1\2|')" +%s || echo ${SOURCE_DATE_EPOCH})" + - echo "${CI_COMMIT_TIMESTAMP} -> ${SOURCE_DATE_EPOCH}" + # handle Pd64 jobs + - if test "${OS}" = "Windows_NT"; then defaultext="dll"; else defaultext="so"; fi + # - gnutriplet="$(g++ -dumpmachine)" + - arch="${CI_JOB_NAME%-[0-9][0-9]}" + - floatsize="${CI_JOB_NAME#${arch}}" + - floatsize="${floatsize#-}" + - test "${floatsize}" != 32 || floatsize="" + - test -z "${floatsize}" || pd_extension="${arch}-${floatsize}.${defaultext}" + - if test "${OS}" = "Windows_NT"; then gnutriplet="${CI_JOB_NAME}"; else gnutriplet="${arch}"; fi + - configure_floatsize="${floatsize:+--with-floatsize=${floatsize}}" + # on Windows, plugins link against Gem, so we cannot share them between floatsizes; other platforms are fine + - test -z "${floatsize}" || test "${OS}" = "Windows_NT" || configure_floatsize="${configure_floatsize} --disable-plugins" + - echo "arch=${arch} pd_extension=${pd_extension} floatsize=${floatsize}" + # print some system information - echo building against Pd-${PDVERSION} - echo building with ${NUMBER_OF_PROCESSORS:=$(nproc || sysctl -n hw.ncpu || echo 1)} CPUs - tools/systeminfo.sh || true - date + - which autoreconf aclocal glibtoolize libtoolize autoconf autoheader automake g++ || true + - for tool in autoreconf aclocal libtoolize glibtoolize autoconf autoheader automake; do "${tool}" --version | grep "^${tool}" || true; done || true - g++ -v + # the actual build - mkdir -pv "${ARTIFACTSDIR}" - autoreconf -fiv || ./autogen.sh - - ./configure --disable-dependency-tracking ${TARGETARCH:+--host=}${TARGETARCH} ${fat_binary:+--enable-fat-binary=}${fat_binary} ${PDDIR:+--with-pd=}${PDDIR} ${pd_extension:+--with-extension=}${pd_extension} ${gem_defaultwindow:+--with-defaultwindow=}${gem_defaultwindow} --with-DeckLink=local || true + - ./configure --disable-dependency-tracking ${TARGETARCH:+--host=}${TARGETARCH} ${fat_binary:+--enable-fat-binary=}${fat_binary} ${PDDIR:+--with-pd=}${PDDIR} ${pd_extension:+--with-extension=}${pd_extension} ${configure_floatsize} ${gem_defaultwindow:+--with-defaultwindow=}${gem_defaultwindow} --with-DeckLink=local || true - test -n "${CI_COMMIT_TAG}" || cp -v config.log "${ARTIFACTSDIR}" - make check -j"${NUMBER_OF_PROCESSORS}" - - make install DESTDIR=$(pwd)/${ARTIFACTSDIR}/${CI_JOB_NAME%_*} libdir=/ extradir=/Gem includedir=/Gem/include + - *script_set_destdir + # " + - make install DESTDIR="${DESTDIR}" libdir=/ extradir=/Gem includedir=/Gem/include + # make Gem-plugins co-installable + - find "${DESTDIR}" "(" -name "gem_*.so" -or -name "gem_*.dll" ")" -exec .git-ci/rename-gnutriplet.sh -a "${gnutriplet}" {} "+" # finally split the binaries from the debug information - base_dir_ci=$(pwd) - - cd "$(pwd)/${ARTIFACTSDIR}/${CI_JOB_NAME%_*}/Gem" + - cd "${DESTDIR}/Gem" - du -sh - | "${base_dir_ci}/.git-ci/split-debug" ${pd_extension:+*.${pd_extension}} *.pd_* *.?_* *.dll *.so || echo "ignoring problems when splitting debug info" @@ -93,25 +134,24 @@ stages: - apt-get update - apt-get install ${TARGETDEBARCH:+-a}${TARGETDEBARCH} puredata-dev puredata-core - apt-get build-dep ${TARGETDEBARCH:+-a}${TARGETDEBARCH} gem || true + - apt-get install git - g++ -v .build:macos: extends: + - .image:macos - .build - tags: - - tart - image: ghcr.io/cirruslabs/macos-monterey-xcode:latest retry: max: 1 when: - runner_system_failure variables: CXXFLAGS: "-std=c++11 -g -O2" - CPPFLAGS: "-DGEM_DEBUG_PIXCONVERT=1" fat_binary: "x86_64,arm64" HOMEBREW_NO_ANALYTICS: 1 HOMEBREW_NO_INSTALL_UPGRADE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 CODESIGNFLAGS: --timestamp --strict --force before_script: - *script_zsh_compat @@ -123,7 +163,17 @@ stages: - brew list --full-name || true - brew update || true # make sure we have a good gitlab runner + - mkdir -p /usr/local/bin/ + - | + : "${GITLAB_ARCH:=$(uname -m | sed -e 's|^x86_64$|amd64|' -e 's|^aarch64$|arm64|')}" + - | + : "${GITLAB_OS:=$(uname -s | tr '[:upper:]' '[:lower:]')}" + - | + : "${GITLAB_VERSION:=latest}" + - | + echo "fallback gitlab-runner ${GITLAB_VERSION} ${GITLAB_OS}-${GITLAB_ARCH}" - (which gitlab-runner; gitlab-runner --version) || brew install gitlab-runner || true + - (which gitlab-runner; gitlab-runner --version) || curl -o /usr/local/bin/gitlab-runner "https://gitlab-runner-downloads.s3.amazonaws.com/${GITLAB_VERSION}/binaries/gitlab-runner-${GITLAB_OS}-${GITLAB_ARCH}" && chmod +x /usr/local/bin/gitlab-runner || true - (which gitlab-runner; gitlab-runner --version) || true # download Pd @@ -134,7 +184,7 @@ stages: - test ! -f "${IEM_CI_TMPDIR}"/Pd.zip || unzip "${IEM_CI_TMPDIR}"/Pd.zip -d "${IEM_CI_TMPDIR}" # the ZIP-file shoud contain a .dmg containing Pd - | - for dmg in "${IEM_CI_TMPDIR}"/Pd*.dmg; do break; done + for dmg in "${IEM_CI_TMPDIR}"/Pd*.dmg ; do break; done - pddisk="" - test ! -f "${dmg}" || pddisk=$(hdiutil attach "${dmg}" 2>/dev/null | egrep "^/.*/Volumes/" | tail -1 | awk '{print $NF}') - rm -rf "${dmg}" @@ -142,7 +192,7 @@ stages: for app in "${pddisk}"/Pd*.app "${IEM_CI_TMPDIR}"/Pd*.app; do if test -d "${app}"; then cp -r "${app}" /Applications/; break; fi; done - test ! -d "${pddisk}" || umount "${pddisk}" - | - rm -rf "${IEM_CI_TMPDIR}" + rm -rf "${IEM_CI_TMPDIR}" | true dmg="" pddisk="" app="" @@ -151,8 +201,15 @@ stages: - export PDDIR=$(find /Applications/Pd*.app/Contents/Resources -maxdepth 1 -type d -print -quit) - echo "PD=${PD}" - echo "PDDIR=${PDDIR}" + # urgh: these are provided as fat variants, but must be uninstalled manually, for whatever reason. + - brew uninstall --force --ignore-dependencies zstd xz lz4 + # urgh, the gnu servers timeout, so try to install these files multiple times... + - which automake || brew install automake || true + - which -s libtoolize || which -s glibtoolize || brew install libtool || true + # install the real stuff - brew bundle --no-upgrade --file=.git-ci/macOS.brew || true - brew list --full-name || true + - libtoolize --version || glibtoolize --version || brew install libtool || true # older versions of assimp are broken with clang>=14 - sed -e 's|^\([[:space:]]*mTextureCoordsNames = new aiString \*\[AI_MAX_NUMBER_OF_TEXTURECOORDS\]\) {};[[:space:]]*$|\1; for (size_t i=0; i/dev/null || echo "${pkg}"; done) # if pacman failed, try to continue (but do not mark the run as 'success') - echo "pacman returned ${result}" - test "${result}" = "0" || result="skip" after_script: - - mkdir -p "${ARTIFACTSDIR}/${CI_JOB_NAME%_*}" - - find "${ARTIFACTSDIR}/${CI_JOB_NAME%_*}" -type f "(" -name "*.${pd_extension:-m_*}" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec .git-ci/localdeps.win.sh {} + + - *script_set_destdir + - mkdir -p "${DESTDIR}" + - depdir="${CI_JOB_NAME%-[0-9][0-9]}" + - find "${DESTDIR}" -type f "(" -name "*.${pd_extension:-m_*}" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec "${localdeps}.win.sh" -v -d ".${depdir}" {} + .build:w32: extends: @@ -205,7 +267,7 @@ stages: ################################################### ### the actual jobs: (linux,macos,windows)*(release,snapshot) -Source: +source: extends: - .artifacts - .run-selected @@ -215,28 +277,46 @@ Source: - apt-get update && apt-get --no-install-recommends -y install git script: # create a source package - - git archive --format=tar --prefix="${ARTIFACTSDIR}/Source/${CI_PROJECT_NAME}/" HEAD | tar xf - + - git archive --format=tar --prefix="${ARTIFACTSDIR}/${CI_JOB_NAME}}/${CI_PROJECT_NAME}/" HEAD | tar xf - -Linux-amd64-32: +linux-amd64-32: extends: - .build:linux - .artifacts - .run-selected -Darwin-fat-32: + variables: + pd_extension: "pd_linux" +darwin-fat-32: extends: - .build:macos - .artifacts - .run-selected -Windows-i386-32: + variables: + pd_extension: "d_fat" +windows-i386-32: extends: - .build:w32 - .artifacts - .run-selected -Windows-amd64-32: + variables: + pd_extension: "dll" +windows-amd64-32: extends: - .build:w64 - .artifacts - .run-selected + variables: + pd_extension: "m_amd64" + +# Pd64 +linux-amd64-64: + extends: linux-amd64-32 +darwin-fat-64: + extends: darwin-fat-32 +windows-amd64-64: + extends: windows-amd64-32 + variables: + pd_download_url: "https://get.puredata.info/pure-data/releases/${PDVERSION}-pd64/Pd64-${PDVERSION}.msw.zip" distcheck: extends: @@ -281,7 +361,7 @@ nodist: script: ## pre-cleanup # get rid of gitignores - - find . -name .gitignore -delete + - git ls-tree -r HEAD --name-only -z | grep --null-data "\.gitignore" | xargs -0 rm - git commit -a -m "Drop .gitignore files" ## create 'make dist' package - autoreconf -fiv || ./autogen.sh @@ -307,9 +387,11 @@ macOS:notarize: stage: deploy image: python:alpine dependencies: - - Darwin-fat-32 + - darwin-fat-32 + - darwin-fat-64 needs: - - Darwin-fat-32 + - darwin-fat-32 + - darwin-fat-64 variables: IEM_NOTARIZE_SRCDIR: artifacts IEM_NOTARIZE_ARCHIVE: Gem.zip diff --git a/.git-ci/iem-ci b/.git-ci/iem-ci new file mode 160000 index 000000000..4c9d89f56 --- /dev/null +++ b/.git-ci/iem-ci @@ -0,0 +1 @@ +Subproject commit 4c9d89f563f82f1ea13209f718d5eda44c5871ec diff --git a/.git-ci/nodist b/.git-ci/nodist index 9be0017e2..5ff24cce5 100644 --- a/.git-ci/nodist +++ b/.git-ci/nodist @@ -21,3 +21,4 @@ doc/notes/keynames.org **/*.vsprops **/* * tests/ +.git* diff --git a/.git-ci/rename-gnutriplet.sh b/.git-ci/rename-gnutriplet.sh new file mode 100755 index 000000000..b9dfc93e1 --- /dev/null +++ b/.git-ci/rename-gnutriplet.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +: "${CC:=cc}" + +usage() { + arch="$(${CC} -dumpmachine)" +cat <] [ ...] + +renames each to include . just before the file-extension. +the no is specified, use $arch. + +E.g. + foo.so -> foo.${arch}.so + bar -> bar.${arch} + +EOF + +if [ -n "$1" ]; then + exit "$((1+0))" +fi +exit +} + +addinfix() { + local f + local d + local b + local x + f="$1" + d="${f%/*}" + if [ "${d}" = "${f}" ]; then + d="." + else + f="${f##*/}" + fi + b="${f%.*}" + if [ "${b}" = "${f}" ]; then + x="" + else + x=".${f##*.}" + fi + mv "$1" "${d}/${b}.${2}${x}" +} + +while getopts "ha:" arg; do + case $arg in + h) + usage + ;; + a) + arch="${OPTARG}" + ;; + *) + usage 1 + ;; + esac +done +shift $((OPTIND-1)) +test -n "$*" || usage 1 + +: "${arch:=$(${CC} -dumpmachine)}" +if [ -z "${arch}" ]; then + echo "$0: Unable to determine " 1>&2 + exit 1 +fi + +for f in "$@"; do + addinfix "$f" "${arch}" +done diff --git a/.git-ci/split-debug b/.git-ci/split-debug index 17d2969b2..1836f26c9 100755 --- a/.git-ci/split-debug +++ b/.git-ci/split-debug @@ -51,6 +51,15 @@ list_files() { } +if ! list_files "$@" | grep -q .; then + cat >/dev/stderr <; +#X obj 78 113 spigot 1; +#X obj 78 156 outlet; +#X obj 202 81 route context_active; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 3 0; +#X connect 4 0 2 1; +#X connect 4 1 3 0; +#X restore 130 308 pd activate; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 2 0 4 0; @@ -193,11 +205,12 @@ #X connect 19 0 17 0; #X connect 20 0 21 0; #X connect 21 0 9 0; -#X connect 22 0 10 0; +#X connect 22 0 27 0; #X connect 22 1 19 0; #X connect 22 2 24 0; -#X connect 23 0 10 0; +#X connect 23 0 27 1; #X connect 23 1 25 0; #X connect 24 0 26 0; #X connect 25 0 26 0; #X connect 26 0 20 1; +#X connect 27 0 10 0; diff --git a/abstractions/gemwin.pd b/abstractions/gemwin.pd index 3e8bb6cee..126b93fe8 100644 --- a/abstractions/gemwin.pd +++ b/abstractions/gemwin.pd @@ -1,4 +1,4 @@ -#N canvas 702 37 937 794 10; +#N canvas 697 37 942 872 10; #X obj 126 74 inlet; #X obj 626 678 outlet; #N canvas 6 61 1083 500 argument 0; @@ -667,50 +667,18 @@ #X connect 1 0 2 0; #X connect 3 0 0 0; #X restore 118 54 pd reset; -#N canvas 0 50 975 410 lighting 0; +#N canvas 940 756 975 410 lighting 0; #X obj 97 48 inlet; #X obj 97 69 route lighting ambient specular shininess; #X obj 97 97 i; #X obj 97 122 > 0; #X obj 97 149 s \$0-lighting; -#X obj 488 53 r \$0-reset; -#X msg 204 215 0.1 0.1 0.1 1; -#X obj 84 213 pack 0 0 0 1; -#X obj 84 186 t l b; -#X msg 165 188 1; -#X obj 84 234 s \$0-ambient; -#X obj 84 289 pack 0 0 0 1; -#X obj 84 262 t l b; -#X msg 165 264 1; -#X msg 273 255 1 1 1 1; -#X obj 84 314 s \$0-specular; -#X msg 543 128 100; -#X obj 436 133 f; -#X obj 436 159 s \$0-shininess; #X obj 356 48 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; -#X connect 1 1 8 0; -#X connect 1 2 12 0; -#X connect 1 3 17 0; -#X connect 1 4 19 0; +#X connect 1 4 5 0; #X connect 2 0 3 0; #X connect 3 0 4 0; -#X connect 5 0 6 0; -#X connect 5 0 14 0; -#X connect 5 0 16 0; -#X connect 6 0 8 0; -#X connect 7 0 10 0; -#X connect 8 0 7 0; -#X connect 8 1 9 0; -#X connect 9 0 7 3; -#X connect 11 0 15 0; -#X connect 12 0 11 0; -#X connect 12 1 13 0; -#X connect 13 0 11 3; -#X connect 14 0 12 0; -#X connect 16 0 17 0; -#X connect 17 0 18 0; #X restore 118 193 pd lighting; #N canvas 0 106 1001 529 window 0; #X obj 111 53 inlet; @@ -1302,26 +1270,14 @@ #X obj 179 65 t b b; #X obj 179 88 GLdefine GL_FRONT_AND_BACK; #X obj 206 117 GLdefine GL_DIFFUSE; -#X obj 61 211 GEMglMaterialfv GL_FRONT_AND_BACK GL_AMBIENT 0.1 0.1 0.1 1; -#X obj 426 211 r \$0-ambient; -#X obj 61 251 GEMglMaterialfv GL_FRONT_AND_BACK GL_SPECULAR 1 1 1 1; -#X obj 427 251 r \$0-specular; -#X obj 61 281 GEMglMaterialfv GL_FRONT_AND_BACK GL_SHININESS 100; -#X obj 426 281 r \$0-shininess; #X connect 0 0 3 0; -#X connect 2 0 8 0; +#X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 3 1; #X connect 7 0 3 2; -#X connect 8 0 10 0; -#X connect 9 0 8 3; -#X connect 10 0 12 0; -#X connect 11 0 10 3; -#X connect 12 0 1 0; -#X connect 13 0 12 3; #X restore 391 286 pd color_material; #X f 28; #X floatatom 327 133 5 0 0 0 - - - 0; @@ -1441,13 +1397,15 @@ #X obj 118 222 GEMglFrustum -1 1 -1 1 1 20; #X obj 118 274 GEMglLoadIdentity; #X obj 118 254 GEMglMatrixMode GL_MODELVIEW; -#X obj 118 330 GEMglLineWidth 2; -#X obj 118 353 GEMglColor3f 1 1 1; -#X obj 118 374 GEMglBegin GL_LINES; -#X obj 118 399 GEMglVertex2f 0 -6; -#X obj 118 419 GEMglVertex2f 0 6; -#X obj 118 448 GEMglEnd; -#X obj 118 475 GEMglLineWidth 1; +#X obj 118 323 GEMglColor3f 1 1 1; +#X obj 118 351 polygon 2 \; draw line \; width 2 \; 0 -6 0 0 6 0; +#X obj 258 387 GEMglLineWidth 2; +#X obj 258 410 GEMglNormal3f 0 0 1; +#X obj 258 433 GEMglBegin GL_LINES; +#X obj 258 456 GEMglVertex2f 0 -6; +#X obj 258 479 GEMglVertex2f 0 6; +#X obj 258 502 GEMglEnd; +#X obj 258 525 GEMglLineWidth 1; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 5 0; @@ -1461,11 +1419,12 @@ #X connect 9 0 7 0; #X connect 10 0 9 0; #X connect 11 0 12 0; -#X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; #X restore 95 360 pd stereoline; #X obj 163 120 t l l; #X obj 156 312 r \$0-stereoLine; @@ -2799,9 +2758,9 @@ #X connect 10 0 8 0; #X connect 10 1 9 0; #X restore 258 606 pd CrystalEyeStereo; -#X obj 131 746 GEMglReportError; -#X msg 390 149 1000 \$1; -#X obj 390 171 /; +#X obj 131 836 GEMglReportError; +#X msg 505 215 1000 \$1; +#X obj 505 237 /; #X obj 131 202 metro 20; #N canvas 272 224 751 300 GemState 0; #X obj 138 134 gemlist; @@ -2833,7 +2792,7 @@ #X connect 11 1 12 0; #X connect 12 0 5 0; #X restore 131 476 pd GemState; -#X obj 390 126 r \$0-rate; +#X obj 466 113 r \$0-rate; #X obj 131 155 r \$0-render; #X obj 131 563 t a a; #X obj 163 699 t a; @@ -3167,6 +3126,26 @@ #X obj 131 268 list split 1; #X obj 131 291 list trim; #X obj 131 245 t a s; +#N canvas 735 459 450 300 flush 0; +#X obj 48 49 inlet; +#X obj 48 72 t a a; +#X obj 48 95 outlet; +#X obj 132 158 GEMglFlush; +#X obj 132 137 spigot; +#X obj 139 71 r \$0-buffer; +#X obj 139 93 t f f; +#X obj 171 115 == 1; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 4 0; +#X connect 4 0 3 0; +#X connect 5 0 6 0; +#X connect 6 1 7 0; +#X connect 7 0 4 1; +#X restore 131 795 pd flush; +#X obj 466 134 moses 0; +#X obj 505 157 sel 0; +#X msg 505 187 20; #X connect 0 0 37 0; #X connect 4 0 48 0; #X connect 4 1 39 0; @@ -3188,9 +3167,9 @@ #X connect 18 0 19 1; #X connect 19 0 35 0; #X connect 20 0 28 0; -#X connect 21 0 17 0; +#X connect 21 0 55 0; #X connect 22 0 30 0; -#X connect 23 0 16 0; +#X connect 23 0 54 0; #X connect 23 1 13 0; #X connect 24 0 26 0; #X connect 25 0 26 1; @@ -3229,3 +3208,9 @@ #X connect 52 0 4 0; #X connect 53 0 51 0; #X connect 53 1 48 1; +#X connect 54 0 16 0; +#X connect 55 0 57 0; +#X connect 55 1 56 0; +#X connect 56 0 57 0; +#X connect 56 1 17 0; +#X connect 57 0 17 0; diff --git a/abstractions/glsl.pd b/abstractions/glsl.pd new file mode 100644 index 000000000..85f8c377a --- /dev/null +++ b/abstractions/glsl.pd @@ -0,0 +1,85 @@ +#N canvas 791 129 668 783 10; +#X msg 72 338 print; +#X obj 118 626 glsl_program; +#X msg 72 620 print; +#X obj 118 21 inlet; +#X obj 118 662 outlet; +#X obj 577 95 inlet; +#X obj 118 192 t a; +#X floatatom 197 662 3 0 0 0 ID - - 0; +#X obj 197 690 outlet programID; +#X obj 383 104 gemargs; +#X obj 383 68 loadbang; +#X obj 422 128 route bang; +#X obj 167 258 list prepend \$1; +#X obj 227 189 t b a; +#X msg 33 124 print; +#X obj 33 103 t b; +#X msg 72 468 print; +#X msg 72 498 print; +#X obj 118 469 _glsl.compile geometry geom, f 30; +#X obj 223 578 list prepend link; +#X obj 223 601 list trim; +#X listbox 286 601 23 0 0 0 - - - 0; +#X obj 118 44 route print bang symbol open; +#X obj 33 295 t a a a a a a; +#X text 270 193 This abstraction can be useful to load a vertex+fragment shader. Shader location is relative to this abstraction parent patch path.; +#X obj 383 361 t a; +#X obj 118 339 _glsl.compile vertex vert, f 30; +#X msg 72 399 print; +#X obj 118 399 _glsl.compile tesscontrol tesc; +#X obj 118 422 _glsl.compile tesseval tese, f 30; +#X msg 72 422 print; +#X obj 223 556 pack 0 0 0 0 0; +#X obj 118 499 _glsl.compile fragment frag, f 30; +#X connect 0 0 26 0; +#X connect 1 0 4 0; +#X connect 1 1 7 0; +#X connect 2 0 1 0; +#X connect 3 0 22 0; +#X connect 5 0 25 0; +#X connect 6 0 26 0; +#X connect 7 0 8 0; +#X connect 9 0 25 0; +#X connect 9 1 11 0; +#X connect 10 0 9 0; +#X connect 11 1 13 0; +#X connect 12 0 26 1; +#X connect 13 0 12 0; +#X connect 13 1 12 1; +#X connect 14 0 23 0; +#X connect 15 0 14 0; +#X connect 16 0 18 0; +#X connect 17 0 32 0; +#X connect 18 0 32 0; +#X connect 18 1 31 1; +#X connect 18 2 32 1; +#X connect 19 0 20 0; +#X connect 19 0 21 0; +#X connect 20 0 1 0; +#X connect 22 0 15 0; +#X connect 22 1 12 0; +#X connect 22 2 13 0; +#X connect 22 3 13 0; +#X connect 22 4 6 0; +#X connect 23 0 1 0; +#X connect 23 1 32 0; +#X connect 23 2 18 0; +#X connect 23 3 29 0; +#X connect 23 4 28 0; +#X connect 23 5 26 0; +#X connect 25 0 1 0; +#X connect 26 0 28 0; +#X connect 26 1 31 4; +#X connect 26 2 28 1; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 28 1 31 3; +#X connect 28 2 29 1; +#X connect 29 0 18 0; +#X connect 29 1 31 2; +#X connect 29 2 18 1; +#X connect 30 0 29 0; +#X connect 31 0 19 0; +#X connect 32 0 1 0; +#X connect 32 1 31 0; diff --git a/abstractions/part_info.pd b/abstractions/part_info.pd new file mode 100644 index 000000000..1e930148c --- /dev/null +++ b/abstractions/part_info.pd @@ -0,0 +1,22 @@ +#N canvas 2334 557 868 224 12; +#X obj 55 72 part_move; +#X obj 55 97 part_information, f 94; +#X obj 55 161 outlet gemlist; +#X obj 55 47 inlet gemlist; +#X obj 164 161 outlet num; +#X obj 273 161 outlet position; +#X obj 382 161 outlet color; +#X obj 491 161 outlet velocity; +#X obj 600 161 outlet size; +#X obj 710 161 outlet age; +#X text 208 51 compatibility abstraction; +#X text 581 20 © 2025 IOhannes m zmölnig \; part of GEM \; see LICENSE.txt for license information; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 4 0; +#X connect 1 2 5 0; +#X connect 1 3 6 0; +#X connect 1 4 7 0; +#X connect 1 5 8 0; +#X connect 1 6 9 0; +#X connect 3 0 0 0; diff --git a/abstractions/pix_buffer_filmopen.pd b/abstractions/pix_buffer_filmopen.pd index 28301e159..0209ba00c 100644 --- a/abstractions/pix_buffer_filmopen.pd +++ b/abstractions/pix_buffer_filmopen.pd @@ -1,7 +1,6 @@ #N canvas 1416 206 863 652 10; #X obj 79 77 inlet; #X obj 122 240 gemhead; -#A saved init; #X msg 153 263 open \$1; #X obj 122 288 pix_film; #X obj 180 382 until; @@ -57,10 +56,11 @@ #X connect 5 1 6 0; #X connect 6 0 4 1; #X restore 3 77 pd initbang; -#X obj 3 121 t a; -#X msg 33 121 set \$1; +#X obj 3 221 t a; +#X msg 13 191 set \$1; #X obj 122 503 pix_buffer_write; #X text 414 478 part of GEM \; see LICENSE.txt for license information; +#X obj 13 169 route bang; #X connect 0 0 10 0; #X connect 1 0 3 0; #X connect 2 0 3 0; @@ -98,7 +98,8 @@ #X connect 35 0 30 0; #X connect 35 1 31 0; #X connect 37 0 39 0; -#X connect 37 1 40 0; +#X connect 37 1 43 0; #X connect 38 0 37 0; #X connect 39 0 10 0; #X connect 40 0 39 0; +#X connect 43 1 40 0; diff --git a/configure.ac b/configure.ac index 15004565f..d4de9246a 100644 --- a/configure.ac +++ b/configure.ac @@ -22,50 +22,54 @@ AC_CONFIG_FILES([src/Output/Makefile ]) AC_CONFIG_FILES([src/deprecated/Makefile ]) ## plugins that use this autoconf instance for configuration -AC_CONFIG_FILES([plugins/Makefile]) - -AC_CONFIG_FILES([plugins/ASSIMP2/Makefile]) -AC_CONFIG_FILES([plugins/ASSIMP3/Makefile]) -AC_CONFIG_FILES([plugins/AVI/Makefile]) -AC_CONFIG_FILES([plugins/AVIPLAY/Makefile]) -AC_CONFIG_FILES([plugins/DC1394/Makefile]) -AC_CONFIG_FILES([plugins/DECKLINK/Makefile]) -AC_CONFIG_FILES([plugins/DV4L/Makefile]) -AC_CONFIG_FILES([plugins/FFMPEG/Makefile]) -AC_CONFIG_FILES([plugins/GMERLIN/Makefile]) -AC_CONFIG_FILES([plugins/imageIO/Makefile]) -AC_CONFIG_FILES([plugins/imageMAGICK/Makefile]) -AC_CONFIG_FILES([plugins/JPEG/Makefile]) -AC_CONFIG_FILES([plugins/MPEG1/Makefile]) -AC_CONFIG_FILES([plugins/MPEG3/Makefile]) -AC_CONFIG_FILES([plugins/NDI/Makefile]) -AC_CONFIG_FILES([plugins/OBJ/Makefile]) -AC_CONFIG_FILES([plugins/OptiTrack/Makefile]) -AC_CONFIG_FILES([plugins/PNM/Makefile]) -AC_CONFIG_FILES([plugins/PIPEWIRE/Makefile]) -AC_CONFIG_FILES([plugins/QT4L/Makefile]) -AC_CONFIG_FILES([plugins/QuickTime/Makefile]) -AC_CONFIG_FILES([plugins/SGI/Makefile]) -AC_CONFIG_FILES([plugins/STB/Makefile]) -AC_CONFIG_FILES([plugins/TEST/Makefile]) -AC_CONFIG_FILES([plugins/TIFF/Makefile]) -AC_CONFIG_FILES([plugins/UNICAP/Makefile]) -AC_CONFIG_FILES([plugins/V4L/Makefile]) -AC_CONFIG_FILES([plugins/V4L2/Makefile]) -AC_CONFIG_FILES([plugins/VFW/Makefile]) -AC_CONFIG_FILES([plugins/VIDS/Makefile]) -AC_CONFIG_FILES([plugins/VLC/Makefile]) -AC_CONFIG_FILES([plugins/VNC/Makefile]) - -AC_CONFIG_FILES([plugins/filmAVF/Makefile]) -AC_CONFIG_FILES([plugins/filmDS/Makefile]) -AC_CONFIG_FILES([plugins/filmDSATL/Makefile]) -AC_CONFIG_FILES([plugins/filmDarwin/Makefile]) - -AC_CONFIG_FILES([plugins/videoAVF/Makefile]) -AC_CONFIG_FILES([plugins/videoDS/Makefile]) -AC_CONFIG_FILES([plugins/videoDarwin/Makefile]) -AC_CONFIG_FILES([plugins/videoSGI/Makefile]) +AS_IF([test "$enable_plugins" != "no" ], [ + AC_CONFIG_FILES([plugins/Makefile]) + + AC_CONFIG_FILES([plugins/ASSIMP2/Makefile]) + AC_CONFIG_FILES([plugins/ASSIMP3/Makefile]) + AC_CONFIG_FILES([plugins/AVI/Makefile]) + AC_CONFIG_FILES([plugins/AVIPLAY/Makefile]) + AC_CONFIG_FILES([plugins/DC1394/Makefile]) + AC_CONFIG_FILES([plugins/DECKLINK/Makefile]) + AC_CONFIG_FILES([plugins/DV4L/Makefile]) + AC_CONFIG_FILES([plugins/FFMPEG/Makefile]) + AC_CONFIG_FILES([plugins/GMERLIN/Makefile]) + AC_CONFIG_FILES([plugins/imageIO/Makefile]) + AC_CONFIG_FILES([plugins/imageMAGICK/Makefile]) + AC_CONFIG_FILES([plugins/JPEG/Makefile]) + AC_CONFIG_FILES([plugins/MPEG1/Makefile]) + AC_CONFIG_FILES([plugins/MPEG3/Makefile]) + AC_CONFIG_FILES([plugins/NDI/Makefile]) + AC_CONFIG_FILES([plugins/OBJ/Makefile]) + AC_CONFIG_FILES([plugins/OptiTrack/Makefile]) + AC_CONFIG_FILES([plugins/PNM/Makefile]) + AC_CONFIG_FILES([plugins/PIPEWIRE/Makefile]) + AC_CONFIG_FILES([plugins/QT4L/Makefile]) + AC_CONFIG_FILES([plugins/QuickTime/Makefile]) + AC_CONFIG_FILES([plugins/SGI/Makefile]) + AC_CONFIG_FILES([plugins/STB/Makefile]) + AC_CONFIG_FILES([plugins/TEST/Makefile]) + AC_CONFIG_FILES([plugins/TIFF/Makefile]) + AC_CONFIG_FILES([plugins/UNICAP/Makefile]) + AC_CONFIG_FILES([plugins/V4L/Makefile]) + AC_CONFIG_FILES([plugins/V4L2/Makefile]) + AC_CONFIG_FILES([plugins/VFW/Makefile]) + AC_CONFIG_FILES([plugins/VIDS/Makefile]) + AC_CONFIG_FILES([plugins/VLC/Makefile]) + AC_CONFIG_FILES([plugins/VNC/Makefile]) + + AC_CONFIG_FILES([plugins/filmAVF/Makefile]) + AC_CONFIG_FILES([plugins/filmDS/Makefile]) + AC_CONFIG_FILES([plugins/filmDSATL/Makefile]) + AC_CONFIG_FILES([plugins/filmDarwin/Makefile]) + + AC_CONFIG_FILES([plugins/videoAVF/Makefile]) + AC_CONFIG_FILES([plugins/videoDS/Makefile]) + AC_CONFIG_FILES([plugins/videoDarwin/Makefile]) + AC_CONFIG_FILES([plugins/videoSGI/Makefile]) +]) +AM_CONDITIONAL([PLUGINS], [test "${enable_plugins}" != "no"]) + ## extra holds additional objects/libraries @@ -92,10 +96,11 @@ AC_CONFIG_HEADERS([src/Gem/GemGLconfig.h]) AC_CONFIG_SRCDIR([src/Base/GemBase.h]) AC_CONFIG_SUBDIRS([extra]) - -AS_IF([test -d "$srcdir/plugins/AVT"], [AC_CONFIG_SUBDIRS([plugins/AVT])]) -AS_IF([test -d "$srcdir/plugins/HALCON"], [AC_CONFIG_SUBDIRS([plugins/HALCON])]) -AS_IF([test -d "$srcdir/plugins/PYLON"], [AC_CONFIG_SUBDIRS([plugins/PYLON])]) +AS_IF([test "$enable_plugins" != "no" ], [ + AS_IF([test -d "$srcdir/plugins/AVT"], [AC_CONFIG_SUBDIRS([plugins/AVT])]) + AS_IF([test -d "$srcdir/plugins/HALCON"], [AC_CONFIG_SUBDIRS([plugins/HALCON])]) + AS_IF([test -d "$srcdir/plugins/PYLON"], [AC_CONFIG_SUBDIRS([plugins/PYLON])]) +]) AC_LANG(C++) @@ -182,7 +187,7 @@ AS_CASE([$enable_debug], ]) -AC_ARG_WITH([GLU], AC_HELP_STRING([--without-GLU], [force building without GLU (*not* recommended!)])) +AC_ARG_WITH([GLU], AS_HELP_STRING([--without-GLU], [force building without GLU (*not* recommended!)])) GEM_ARG_ENABLE([mmx], [MMX-support]) dnl disabled SSE2 by default, since there are still few chips around that fully support it dnl unlike MMX or SSE @@ -203,10 +208,12 @@ GEM_TARGET(Particles) GEM_TARGET(Pixes) GEM_TARGET(openGL) GEM_TARGET_DISABLED(Vertex) +GEM_ARG_ENABLE([plugins], [configure/build/install optional parts]) -AC_ARG_ENABLE([experimental], AC_HELP_STRING([--enable-experimental], [enable experimental objects (if any)])) +AC_ARG_ENABLE([experimental], AS_HELP_STRING([--enable-experimental], [enable experimental objects (if any)])) AM_CONDITIONAL(EXPERIMENTAL, [test "x$enable_experimental" = "xyes"]) + # checks for default headers IEM_CHECK_INCLUDES_DEFAULT([windows.h]) @@ -391,6 +398,10 @@ GEM_CHECK_LIB([avifile], [aviplay],[avifile.h], [CreateIAviReadFile],,,,[movie l GEM_CHECK_LIB([gmerlin_avdec], [gmerlin_avdec],[gmerlin/avdec.h], [gavl_start],,,,[movie loader]) AS_IF([test "x$have_gmerlin_avdec" = "xyes"], [ AC_CHECK_HEADERS([gavl/log.h]) + IEM_CHECK_FUNCS([bgav_seek_to_video_frame bgav_num_video_frames],[],[], + [$GEM_LIB_GMERLIN_AVDEC_CFLAGS], + [$GEM_LIB_GMERLIN_AVDEC_LIBS], + ) ]) GEM_CHECK_LIB([mpeg], [mpeg],[mpeg.h], [OpenMPEG],,,,[movie loader]) GEM_CHECK_LIB([libmpeg3], [mpeg3],[libmpeg3.h], [mpeg3_check_sig],,,,[movie loader]) @@ -415,15 +426,10 @@ AC_SUBST([GEM_LIB_FFMPEG_LIBS]) AM_CONDITIONAL(HAVE_FFMPEG, [test "x${have_ffmpeg}" = "xyes"]) # special function in libquicktime -old_cflags=${CFLAGS} -old_libs=${LIBS} -CFLAGS="${CFLAGS} $GEM_LIB_LIBQUICKTIME_CFLAGS $GEM_LIB_LQT_CFLAGS" -LIBS="${LIBS} $GEM_LIB_LIBQUICKTIME_LIBS $GEM_LIB_LQT_LIBS" -AC_CHECK_FUNCS([lqt_seek_video]) -AC_CHECK_FUNCS([lqt_open_write]) -CFLAGS=${old_cflags} -LIBS=${old_libs} - +IEM_CHECK_FUNCS([lqt_seek_video lqt_open_write],[],[], + [$GEM_LIB_LIBQUICKTIME_CFLAGS $GEM_LIB_LQT_CFLAGS], + [$GEM_LIB_LIBQUICKTIME_LIBS $GEM_LIB_LQT_LIBS] + ) #video GEM_CHECK_LIB([libdc1394-2], [dc1394],[dc1394/dc1394.h], [dc1394_new],,,, [video input]) GEM_CHECK_LIB([libdv], [dv],[libdv/dv.h], [dv_cleanup],,,, [video input]) @@ -595,7 +601,7 @@ AC_SUBST([GEM_DECKLINK_USE_DLOPEN]) # NDI-support AC_ARG_WITH([ndi], - AC_HELP_STRING([--with-ndi=], + AS_HELP_STRING([--with-ndi=], [enable NDI video capturing (use 'local' to use an embedded copy of the SDK)])) have_ndi="no" @@ -717,7 +723,8 @@ AS_CASE(["$with_defaultwindow"], [GEM_DEFAULT_WINDOW=""]) AS_IF([test "x${GEM_DEFAULT_WINDOW}" = "x"], [ - AS_IF([test "x$WINDOWS" = "xyes"], [GEM_DEFAULT_WINDOW="gemw32window"], + AS_IF([test "x${have_glfw3}" = "xyes"], [GEM_DEFAULT_WINDOW="gemglfw3window"], + [test "x$WINDOWS" = "xyes"], [GEM_DEFAULT_WINDOW="gemw32window"], [test "x$DARWIN" = "xyes"], [GEM_DEFAULT_WINDOW="gemcocoawindow"], [test "x$no_glx" != "xyes"], [GEM_DEFAULT_WINDOW="gemglxwindow"], [test "x$no_glut" != "xyes"], [GEM_DEFAULT_WINDOW="gemglutwindow"] @@ -728,7 +735,7 @@ AC_CONFIG_FILES([abstractions/gemdefaultwindow.pd]) ## allow us to override the build date string AC_ARG_WITH([build-date], - AC_HELP_STRING([--with-build-date=], + AS_HELP_STRING([--with-build-date=], [alternative date string])) AC_MSG_CHECKING([build-date]) AS_IF([test "x$with_build_date" = "xyes" ],[with_build_date=""]) @@ -815,6 +822,7 @@ Configuration: Install path : ${prefix} RTE (${GEM_RTE}): + executable : ${GEM_RTE_EXE} external-extension : ${GEM_RTE_EXTENSION} CFLAGS : ${GEM_RTE_CFLAGS} LIBS : ${GEM_RTE_LIBS} @@ -823,7 +831,11 @@ Configuration: font-rendering : ${have_font} default font : ${GEM_DEFAULT_FONT} - +]) +AS_IF([test "$enable_plugins" != "no" ], [ + AC_MSG_RESULT([ +PLUGINS +======= image-support use ImageIO : ${have_imageio_framework} use JPEG : ${have_jpeg} @@ -868,6 +880,12 @@ Configuration: use OBJ : YES (local) use ASSIMP2 : ${have_assimp2} use ASSIMP3 : ${have_assimp3} + ])],[ + AC_MSG_RESULT([ +PLUGINS +======= + NONE + ]) ]) AS_IF([test "x$have_pd" = "xno"], [ diff --git a/devgem.sh.in b/devgem.sh.in index 3aec0b4fe..b498a3d6e 100755 --- a/devgem.sh.in +++ b/devgem.sh.in @@ -43,6 +43,26 @@ else fi gempath=${gempath%:} + +# help paths +helppath="" +if [ -d "${srcdir}/help" ]; then + helppath="${helppath}:${srcdir}/help" +fi +for d in $(for pd in "${srcdir}/plugins"/*/*.pd "${builddir}/plugins"/*/*.pd; do + if [ -f "${pd}" ]; then + echo "${pd%/*}" + fi +done | uniq); do + helppath="${helppath}:${d}" +done +helppath=${helppath#:} +helppath=${helppath%:} +if [ -n "${helppath}" ]; then + gempath="${gempath}:${helppath}" + gempath="${gempath#:}" +fi + if [ "x${gempath}" = "x" ]; then gempath=${builddir} fi diff --git a/examples/02.advanced/04.Fog.pd b/examples/02.advanced/04.Fog.pd index 327fdb943..32d68bcbc 100644 --- a/examples/02.advanced/04.Fog.pd +++ b/examples/02.advanced/04.Fog.pd @@ -1,8 +1,8 @@ -#N canvas 275 99 721 506 10; +#N canvas 659 128 721 506 10; #X declare -lib Gem; -#X floatatom 414 85 0 0 0 0 - - -; +#X floatatom 414 85 0 0 0 0 - - - 0; #X obj 385 44 gemhead; -#X floatatom 403 165 0 0 0 0 - - -; +#X floatatom 403 165 0 0 0 0 - - - 0; #X obj 268 149 gemhead 1; #X obj 268 187 world_light; #X obj 385 279 model ../data/venus.obj; @@ -10,24 +10,18 @@ #X obj 385 205 rotateXYZ; #X obj 385 238 scale 3; #X obj 40 198 r fogmess; -#X msg 335 395 \; fogmess fogmode 2 \; fogmess fog 0.1; -#X msg 11 394 \; fogmess fogmode 0; -#X msg 172 393 \; fogmess fogmode 1 \; fogmess fog 0.7; #X text 39 349 no fog; #X text 190 354 linear fog; #X text 371 353 exp fog; #X text 520 357 exp^2 fog; -#X msg 485 399 \; fogmess fogmode 3 \; fogmess fog 0.1; #X text 184 21 various fog types; -#X obj 522 132 gemhead; -#X floatatom 458 97 5 0 0 0 - - -; -#X obj 522 170 rotateXYZ 0 -117 0; -#X obj 522 189 square 5; -#X obj 522 151 translateXYZ -3.5 0 -6.57; -#X obj 385 22 tgl 15 1 empty empty empty 20 8 0 8 -262144 -1 -1 1 1 -; -#X obj 522 113 tgl 15 1 empty empty empty 20 8 0 8 -262144 -1 -1 1 -1; +#X obj 552 212 gemhead; +#X floatatom 458 97 5 0 0 0 - - - 0; +#X obj 552 250 rotateXYZ 0 -117 0; +#X obj 552 269 square 5; +#X obj 552 231 translateXYZ -3.5 0 -6.57; +#X obj 385 22 tgl 15 1 empty empty empty 20 8 0 8 #fcfcfc #000000 #000000 1 1; +#X obj 552 193 tgl 15 1 empty empty empty 20 8 0 8 #fcfcfc #000000 #000000 1 1; #N canvas 26 40 290 300 Gem.init 0; #X obj 71 191 outlet; #X obj 71 81 loadbang; @@ -44,8 +38,7 @@ #X connect 5 0 0 0; #X restore 59 219 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -84,6 +77,16 @@ #X coords 0 -1 1 1 85 40 1 100 100; #X restore 40 258 pd gemwin; #X obj 608 8 declare -lib Gem; +#X msg 11 394 \; fogmess fogmode 0; +#X msg 505 393 \; fogmess fogcolor 0 0 1 \; fogmess fogmode 3 \; fogmess fog 0.1; +#X msg 335 393 \; fogmess fogcolor 0 1 0 \; fogmess fogmode 2 \; fogmess fog 0.1; +#X msg 172 393 \; fogmess fogcolor 1 0 0 \; fogmess fogmode 1 \; fogmess fog 0.7; +#X obj 536 10 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 536 33 metro 2000; +#X obj 536 56 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 536 79 * -8; +#X msg 536 102 \$1 1000; +#X obj 536 125 line; #X connect 0 0 6 3; #X connect 1 0 6 0; #X connect 2 0 7 1; @@ -91,11 +94,17 @@ #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 5 0; -#X connect 9 0 27 0; -#X connect 19 0 23 0; -#X connect 20 0 6 1; -#X connect 21 0 22 0; -#X connect 23 0 21 0; -#X connect 24 0 1 0; -#X connect 25 0 19 0; -#X connect 26 0 27 0; +#X connect 9 0 23 0; +#X connect 15 0 19 0; +#X connect 16 0 6 1; +#X connect 17 0 18 0; +#X connect 19 0 17 0; +#X connect 20 0 1 0; +#X connect 21 0 15 0; +#X connect 22 0 23 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 0 0; diff --git a/examples/02.advanced/05.Stereo.pd b/examples/02.advanced/05.Stereo.pd index f2e9113df..97ca09659 100644 --- a/examples/02.advanced/05.Stereo.pd +++ b/examples/02.advanced/05.Stereo.pd @@ -1,7 +1,7 @@ -#N canvas 31 61 600 504 10; +#N canvas 1237 37 600 504 10; #X declare -lib Gem; #X obj 426 54 gemhead; -#X floatatom 464 134 0 0 0 0 - - -; +#X floatatom 464 134 0 0 0 0 - - - 0; #X obj 464 307 gemhead 1; #X obj 464 332 world_light; #X obj 426 181 model ../data/venus.obj; @@ -9,13 +9,12 @@ #X obj 426 81 translateXYZ 0 0 2; #X obj 426 157 rotateXYZ; #X text 149 40 and display it stereoscopically; -#X msg 221 130 stereoSep \$1; -#X msg 318 129 stereoFoc \$1; -#X floatatom 221 92 0 0 0 0 - - -; -#X floatatom 318 87 0 0 0 0 - - -; +#X msg 221 113 stereoSep \$1; +#X msg 318 112 stereoFoc \$1; +#X floatatom 221 92 0 0 0 0 - - - 0; +#X floatatom 318 87 0 0 0 0 - - - 0; #X text 23 295 The default stereoSep is -15; -#X text 23 315 The model may appear inside out depending on what viewing -method you use.; +#X text 23 315 The model may appear inside out depending on what viewing method you use.; #X text 23 350 If it does \, change the stereoSep to 15; #N canvas 30 60 290 300 Gem.init 0; #X obj 71 191 outlet; @@ -40,11 +39,9 @@ method you use.; #X text 336 273 no stereo; #X msg 271 248 stereo 3; #X text 338 250 crystal eyes stereo; -#X text 32 402 NOTE: you need special hardware to use "crystal eyes -stereo"; +#X text 32 402 NOTE: you need special hardware to use "crystal eyes stereo"; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -83,6 +80,9 @@ stereo"; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 58 207 pd gemwin; #X obj 488 8 declare -lib Gem; +#X obj 230 149 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 230 172 stereoLine \$1; +#X text 255 154 for mode#1; #X connect 0 0 6 0; #X connect 1 0 7 2; #X connect 2 0 3 0; @@ -97,3 +97,5 @@ stereo"; #X connect 18 0 26 0; #X connect 19 0 26 0; #X connect 23 0 26 0; +#X connect 28 0 29 0; +#X connect 29 0 26 0; diff --git a/examples/02.advanced/19.pointer.pd b/examples/02.advanced/19.pointer.pd index 25f571309..4058882b6 100644 --- a/examples/02.advanced/19.pointer.pd +++ b/examples/02.advanced/19.pointer.pd @@ -1,4 +1,4 @@ -#N canvas 102 61 864 638 10; +#N canvas 716 191 864 638 10; #X declare -lib Gem; #X obj 209 223 gemhead; #X obj 241 277 t a a a; @@ -17,12 +17,9 @@ #X obj 595 288 gemlist; #X obj 595 223 gemhead; #X obj 595 250 t b b a; -#X obj 37 202 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; -#X obj 209 198 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 595 198 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 37 202 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 1 1; +#X obj 209 198 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 595 198 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 37 342 translateXYZ 2 0 0; #X obj 37 449 translateXYZ 2 0 0; #X obj 241 341 translateXYZ 2 0 0; @@ -33,44 +30,31 @@ #X obj 595 410 rotateXYZ 60 30 0; #X obj 595 452 translateXYZ 2 0 0; #X obj 595 431 sphere 1.6 4; -#X text 29 498 example #1 is the usual way to use Gem \, but the technique -shown in example #2 can be more flexible...; -#N canvas 186 321 446 463 more_interating_1 0; +#X text 29 498 example #1 is the usual way to use Gem \, but the technique shown in example #2 can be more flexible...; +#N canvas 952 333 446 463 more_interating_1 0; #X obj 22 64 gemhead; #X obj 22 351 rotateXYZ 0 0 12; #X obj 22 274 scaleXYZ 0.97 0.9 1; #X obj 22 296 translateXYZ 0.5 0 0; #X obj 22 376 circle 0.2; -#X floatatom 131 331 5 0 0 0 - - -; -#X obj 22 226 gemlist; -#X obj 22 204 until; -#X msg 22 180 100; -#X obj 22 158 t b a; +#X floatatom 131 331 5 0 0 0 - - - 0; #X obj 22 111 translateXYZ -3 0 0; -#X obj 22 43 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X text 85 198 "repeat" 100 times the same "gemlist"; -#X connect 0 0 10 0; +#X obj 22 43 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 118 201 "repeat" 100 times the same "gemlist"; +#X obj 22 197 gemrepeat 100; +#X connect 0 0 6 0; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 1 3; -#X connect 6 0 2 0; -#X connect 7 0 6 0; -#X connect 8 0 7 0; -#X connect 9 0 8 0; -#X connect 9 1 6 1; -#X connect 10 0 9 0; -#X connect 11 0 0 0; +#X connect 6 0 9 0; +#X connect 7 0 0 0; +#X connect 9 0 2 0; #X restore 32 561 pd more_interating_1; -#N canvas 178 159 464 582 more_interating_2 0; +#N canvas 804 223 464 582 more_interating_2 0; #X obj 22 69 gemhead; #X obj 22 377 scaleXYZ 0.97 0.9 1; #X obj 22 505 circle 0.2; -#X obj 22 235 gemlist; -#X obj 22 213 until; -#X msg 22 189 100; -#X obj 22 167 t b a; #X obj 185 322 f; #X obj 277 309 random 1000; #X obj 22 480 rotateXYZ 0 0 0; @@ -79,50 +63,45 @@ shown in example #2 can be more flexible...; #X obj 22 264 t a b b; #X msg 277 283 seed \$1; #X obj 277 256 f; -#X floatatom 295 234 5 0 0 0 - - -; +#X floatatom 295 234 5 0 0 0 - - - 0; #X obj 277 334 - 500; #X obj 185 441 / 1000; #X obj 22 400 translateXYZ -0.5 0 0; #X obj 22 103 translateXYZ 3 0 0; -#X obj 22 42 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; +#X obj 22 42 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 343 233 <- change random; #X text 276 356 rotation angle is random; #X text 200 390 amplitude decrease; #X msg 203 296 100; #X obj 222 351 - 1; -#X connect 0 0 19 0; -#X connect 1 0 18 0; -#X connect 3 0 12 0; -#X connect 4 0 3 0; -#X connect 5 0 4 0; -#X connect 6 0 5 0; -#X connect 6 1 3 1; -#X connect 7 0 25 0; -#X connect 7 0 10 0; -#X connect 8 0 16 0; -#X connect 9 0 2 0; -#X connect 10 0 17 0; -#X connect 11 0 6 0; -#X connect 11 1 24 0; -#X connect 11 1 14 0; -#X connect 12 0 1 0; -#X connect 12 1 7 0; -#X connect 12 2 8 0; -#X connect 13 0 8 0; -#X connect 14 0 13 0; -#X connect 15 0 14 1; -#X connect 16 0 10 1; -#X connect 17 0 9 3; -#X connect 18 0 9 0; -#X connect 19 0 11 0; -#X connect 20 0 0 0; -#X connect 24 0 7 1; -#X connect 25 0 7 1; +#X obj 22 190 gemrepeat 100; +#X connect 0 0 15 0; +#X connect 1 0 14 0; +#X connect 3 0 21 0; +#X connect 3 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 2 0; +#X connect 6 0 13 0; +#X connect 7 0 22 0; +#X connect 7 1 20 0; +#X connect 7 1 10 0; +#X connect 8 0 1 0; +#X connect 8 1 3 0; +#X connect 8 2 4 0; +#X connect 9 0 4 0; +#X connect 10 0 9 0; +#X connect 11 0 10 1; +#X connect 12 0 6 1; +#X connect 13 0 5 3; +#X connect 14 0 5 0; +#X connect 15 0 7 0; +#X connect 16 0 0 0; +#X connect 20 0 3 1; +#X connect 21 0 3 1; +#X connect 22 0 8 0; #X restore 32 581 pd more_interating_2; #X obj 445 223 gemhead; -#X obj 445 198 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 445 198 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 443 178 #3:; #X obj 445 410 rotateXYZ 60 30 0; #X obj 445 452 translateXYZ 2 0 0; @@ -130,15 +109,11 @@ shown in example #2 can be more flexible...; #X text 593 178 #4:; #X text 611 314 [gemlist] stores the current state; #X text 613 330 and outputs it when banged; -#X text 30 528 The example #4 can easily be extended to use many primitives. -; -#X text 31 122 [gemhead]'s output is a special message describing the -"state" of the system. This state is changed by the GEM objects. This -means that the examples below are equivalent:; +#X text 30 528 The example #4 can easily be extended to use many primitives.; +#X text 31 122 [gemhead]'s output is a special message describing the "state" of the system. This state is changed by the GEM objects. This means that the examples below are equivalent:; #X obj 445 431 teapot 1; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; diff --git a/examples/02.advanced/20.double-gemhead_vs_repeat.pd b/examples/02.advanced/20.double-gemhead_vs_repeat.pd index 4b553286c..3f72422f5 100644 --- a/examples/02.advanced/20.double-gemhead_vs_repeat.pd +++ b/examples/02.advanced/20.double-gemhead_vs_repeat.pd @@ -1,9 +1,8 @@ -#N canvas 265 100 742 519 10; +#N canvas 833 124 742 519 10; #X declare -lib Gem; #X obj 93 144 gemhead; #X obj 93 205 b; -#X obj 93 124 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 93 124 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 1 1; #X obj 93 336 gemhead; #X msg 25 305 0; #X obj 25 285 loadbang; @@ -16,8 +15,7 @@ #X obj 93 426 circle 0.2; #X text 40 25 the "double [gemhead] idiom" vs. [repeat]; #X obj 438 146 gemhead; -#X obj 438 128 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 438 128 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 1 1; #X obj 479 375 unpack 0 0 0; #X text 525 206 two messages in one; #X obj 438 425 square 0.2; @@ -33,10 +31,8 @@ #X msg 479 328 0 -2 0; #X msg 511 348 0 2 0; #X obj 508 284 + 1; -#X text 258 65 The gemhead object resets the states for OpenGL and -also some pix_ settings. Anything after it is starts as a clean state -similar to combining [separator] and [pix_separator]. (cc); -#N canvas 220 0 701 555 more_on_the_"repeat"_technics 0; +#X text 258 65 The gemhead object resets the states for OpenGL and also some pix_ settings. Anything after it is starts as a clean state similar to combining [separator] and [pix_separator]. (cc); +#N canvas 853 316 701 555 more_on_the_"repeat"_technics 0; #X obj 21 54 gemhead; #X obj 21 281 separator; #X obj 21 128 t a b; @@ -53,24 +49,17 @@ similar to combining [separator] and [pix_separator]. (cc); #X obj 21 310 t a b b; #X obj 118 313 spigot 0; #X obj 199 312 spigot 0; -#X obj 278 276 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X text 311 274 <- if you reset the random at the beginning of each -frame \, then all frames look the same.; +#X obj 278 276 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 311 274 <- if you reset the random at the beginning of each frame \, then all frames look the same.; #X obj 21 101 scaleXYZ 1 1 1; -#X floatatom 52 80 5 0 0 0 - - -; -#X floatatom 95 80 5 0 0 0 - - -; -#X obj 21 230 gemlist; -#X obj 21 208 until; -#X msg 21 184 100; -#X obj 21 162 t b a; -#X text 23 504 This patch shows how to draw the same primitive with -the a single [gemhead] many times; -#X obj 21 35 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; +#X floatatom 52 80 5 0 0 0 - - - 0; +#X floatatom 95 80 5 0 0 0 - - - 0; +#X text 23 504 This patch shows how to draw the same primitive with the a single [gemhead] many times; +#X obj 21 35 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 21 200 gemrepeat 100; #X connect 0 0 18 0; #X connect 1 0 13 0; -#X connect 2 0 24 0; +#X connect 2 0 23 0; #X connect 2 1 3 0; #X connect 2 1 12 0; #X connect 3 0 14 0; @@ -92,21 +81,16 @@ the a single [gemhead] many times; #X connect 18 0 2 0; #X connect 19 0 18 1; #X connect 20 0 18 2; -#X connect 21 0 1 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 24 1 21 1; -#X connect 26 0 0 0; +#X connect 22 0 0 0; +#X connect 23 0 1 0; #X restore 370 469 pd more_on_the_"repeat"_technics; #X obj 93 186 translateXYZ; -#X floatatom 120 168 5 0 0 0 - - -; +#X floatatom 120 168 5 0 0 0 - - - 0; #X text 168 167 <- fun!; #X obj 438 187 translateXYZ; -#X floatatom 465 169 5 0 0 0 - - -; +#X floatatom 465 169 5 0 0 0 - - - 0; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; diff --git a/examples/02.advanced/22.double-iterative.pd b/examples/02.advanced/22.double-iterative.pd index fd6a48d47..613781134 100644 --- a/examples/02.advanced/22.double-iterative.pd +++ b/examples/02.advanced/22.double-iterative.pd @@ -1,45 +1,31 @@ -#N canvas 6 61 473 588 10; +#N canvas 778 250 473 588 10; #X declare -lib Gem; -#X obj 32 103 gemhead; -#X obj 106 235 gemlist; -#X msg 106 192 20; -#X obj 106 213 until; -#X obj 32 149 route gem_state; -#X obj 32 171 route float; -#X obj 32 127 t a a; -#X obj 106 259 rotateXYZ 10 20 30; -#X obj 180 413 gemlist; -#X msg 180 370 20; -#X obj 180 391 until; -#X obj 106 327 route gem_state; -#X obj 106 349 route float; -#X obj 106 305 t a a; -#X obj 180 437 rotateXYZ 10 20 30; -#X obj 180 497 cube 0.1; -#X obj 106 280 separator; +#X obj 29 134 gemhead; +#X obj 29 248 rotateXYZ 10 20 30; +#X obj 29 393 rotateXYZ 10 20 30; +#X obj 29 477 cube 0.1; +#X obj 29 271 separator; #N canvas 0 0 450 300 light 0; #X obj 225 45 gemhead 10; -#X floatatom 258 78 5 0 0 0 - - -; -#X floatatom 299 77 5 0 0 0 - - -; -#X floatatom 341 78 5 0 0 0 - - -; +#X floatatom 258 78 5 0 0 0 - - - 0; +#X floatatom 299 77 5 0 0 0 - - - 0; +#X floatatom 341 78 5 0 0 0 - - - 0; #X msg 319 150 1 0 0; #X obj 225 227 world_light; #X msg 333 173 0.4 0.4 0.4; #X msg 309 127 0 0 0; -#X obj 228 160 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 228 160 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 228 181 debug \$1; #X obj 225 103 rotateXYZ 0 30 0; #X obj 27 51 gemhead 10; -#X floatatom 60 84 5 0 0 0 - - -; -#X floatatom 101 83 5 0 0 0 - - -; -#X floatatom 143 84 5 0 0 0 - - -; +#X floatatom 60 84 5 0 0 0 - - - 0; +#X floatatom 101 83 5 0 0 0 - - - 0; +#X floatatom 143 84 5 0 0 0 - - - 0; #X msg 121 156 1 0 0; #X obj 27 233 world_light; #X msg 130 173 0.4 0.4 0.4; #X msg 111 133 0 0 0; -#X obj 30 166 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; +#X obj 30 166 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 30 187 debug \$1; #X obj 27 109 rotateXYZ 0 -90 0; #X msg 362 225 0.8 0.8 0.8; @@ -74,47 +60,37 @@ #X restore 300 152 pd light; #X obj 300 131 gemwin; #X msg 300 104 lighting 1 \, create \, 1; -#X obj 180 477 translateXYZ 0.3 0 0; -#X floatatom 252 414 5 0 0 0 - - -; -#X floatatom 292 415 5 0 0 0 - - -; -#X floatatom 334 415 5 0 0 0 - - -; -#X floatatom 254 456 5 0 0 0 - - -; -#X floatatom 300 456 5 0 0 0 - - -; -#X floatatom 342 457 5 0 0 0 - - -; -#X floatatom 176 236 5 0 0 0 - - -; -#X floatatom 216 237 5 0 0 0 - - -; -#X floatatom 258 237 5 0 0 0 - - -; -#X text 309 238 <- fun 1; -#X text 386 416 <- fun 2; -#X text 389 457 <- fun 3; +#X obj 29 453 translateXYZ 0.3 0 0; +#X floatatom 64 367 5 0 0 0 - - - 0; +#X floatatom 104 368 5 0 0 0 - - - 0; +#X floatatom 146 368 5 0 0 0 - - - 0; +#X floatatom 68 427 5 0 0 0 - - - 0; +#X floatatom 114 427 5 0 0 0 - - - 0; +#X floatatom 156 428 5 0 0 0 - - - 0; +#X floatatom 64 221 5 0 0 0 - - - 0; +#X floatatom 104 222 5 0 0 0 - - - 0; +#X floatatom 146 222 5 0 0 0 - - - 0; +#X text 197 223 <- fun 1; +#X text 198 369 <- fun 2; +#X text 203 428 <- fun 3; #X text 136 30 double iterative process; #X obj 368 8 declare -lib Gem; -#X connect 0 0 6 0; -#X connect 1 0 7 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 4 0 5 0; -#X connect 5 1 2 0; -#X connect 6 0 4 0; -#X connect 6 1 1 1; -#X connect 7 0 16 0; -#X connect 8 0 14 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 12 0; -#X connect 12 1 9 0; -#X connect 13 0 11 0; -#X connect 13 1 8 1; -#X connect 14 0 20 0; -#X connect 16 0 13 0; -#X connect 19 0 18 0; -#X connect 20 0 15 0; -#X connect 21 0 14 1; -#X connect 22 0 14 2; -#X connect 23 0 14 3; -#X connect 24 0 20 1; -#X connect 25 0 20 2; -#X connect 26 0 20 3; -#X connect 27 0 7 1; -#X connect 28 0 7 2; -#X connect 29 0 7 3; +#X obj 29 167 gemrepeat 20; +#X obj 29 328 gemrepeat 20; +#X connect 0 0 23 0; +#X connect 1 0 4 0; +#X connect 2 0 8 0; +#X connect 4 0 24 0; +#X connect 7 0 6 0; +#X connect 8 0 3 0; +#X connect 9 0 2 1; +#X connect 10 0 2 2; +#X connect 11 0 2 3; +#X connect 12 0 8 1; +#X connect 13 0 8 2; +#X connect 14 0 8 3; +#X connect 15 0 1 1; +#X connect 16 0 1 2; +#X connect 17 0 1 3; +#X connect 23 0 1 0; +#X connect 24 0 2 0; diff --git a/examples/02.advanced/23.SplitScreen.pd b/examples/02.advanced/23.SplitScreen.pd index a1f6406aa..7e115c10c 100644 --- a/examples/02.advanced/23.SplitScreen.pd +++ b/examples/02.advanced/23.SplitScreen.pd @@ -1,4 +1,4 @@ -#N canvas 26 61 799 698 10; +#N canvas 26 61 920 708 10; #X declare -lib Gem; #N canvas 22 50 213 300 Gem.init 0; #X obj 71 191 outlet; @@ -13,8 +13,7 @@ #X connect 4 0 0 0; #X restore 24 75 pd Gem.init; #N canvas 330 97 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -55,15 +54,13 @@ #X connect 18 0 7 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 24 99 pd gemwin; -#X obj 36 576 rotateXYZ; -#X obj 36 499 t a b; #X obj 88 501 i; #X obj 141 501 + 1; #X obj 141 523 % 360; #X obj 36 669 teapot; #X obj 142 101 gemhead; #X obj 142 123 world_light; -#X obj 36 417 gemreceive framehead 50; +#X obj 36 407 gemreceive framehead 50; #X obj 36 648 scale 1; #N canvas 223 51 450 300 scale 0; #X obj 114 26 inlet bang; @@ -101,18 +98,17 @@ #X obj 88 523 t f f; #X obj 88 545 t f f; #X obj 120 574 select 0; -#X obj 36 439 separator; -#X obj 246 459 separator; -#X obj 246 525 t a b; -#X obj 298 527 i; -#X obj 351 527 + 1; -#X obj 351 549 % 360; -#X obj 298 549 t f f; -#X obj 298 571 t f f; -#X obj 246 437 gemreceive framehead 60; -#X obj 246 602 rotateXYZ 45 0 0; -#X obj 246 481 color 0 0 1; -#X obj 36 461 color 1 1 1; +#X obj 36 429 separator; +#X obj 246 499 separator; +#X obj 298 567 i; +#X obj 351 567 + 1; +#X obj 351 589 % 360; +#X obj 298 589 t f f; +#X obj 298 611 t f f; +#X obj 246 477 gemreceive framehead 60; +#X obj 246 642 rotateXYZ 45 0 0; +#X obj 246 521 color 0 0 1; +#X obj 36 451 color 1 1 1; #X obj 423 474 gemreceive framehead 70; #X obj 423 496 separator; #X obj 423 518 color 0 1 0; @@ -140,13 +136,12 @@ #X msg 255 187 0; #X msg 290 185 0; #X obj 133 78 loadbang; -#X obj 202 83 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; #X obj 133 122 random 6; #X obj 133 100 metro 500; #X msg 129 251 \$1 1000; #X msg 223 223 \$1 1000; #X msg 297 222 \$1 1000; +#X obj 202 78 inlet; #X connect 1 0 3 0; #X connect 1 1 4 0; #X connect 1 2 5 0; @@ -168,19 +163,19 @@ #X connect 12 3 15 0; #X connect 12 4 17 0; #X connect 12 5 18 0; -#X connect 13 0 23 0; -#X connect 14 0 24 0; -#X connect 15 0 25 0; -#X connect 16 0 24 0; -#X connect 17 0 23 0; -#X connect 18 0 25 0; -#X connect 19 0 22 0; -#X connect 20 0 22 0; -#X connect 21 0 12 0; -#X connect 22 0 21 0; -#X connect 23 0 6 0; -#X connect 24 0 8 0; -#X connect 25 0 10 0; +#X connect 13 0 22 0; +#X connect 14 0 23 0; +#X connect 15 0 24 0; +#X connect 16 0 23 0; +#X connect 17 0 22 0; +#X connect 18 0 24 0; +#X connect 19 0 21 0; +#X connect 20 0 12 0; +#X connect 21 0 20 0; +#X connect 22 0 6 0; +#X connect 23 0 8 0; +#X connect 24 0 10 0; +#X connect 25 0 21 0; #X restore 517 558 pd move; #X obj 423 584 translateXYZ; #X obj 517 580 unpack 0 0 0; @@ -190,25 +185,26 @@ #X obj 630 522 gemreceive framehead1; #X obj 630 544 separator; #X text 38 23 split-screen; -#X obj 260 13 cnv 15 500 240 empty empty SplitScreen1 20 12 0 14 -233017 --66577 0; -#X obj 260 260 cnv 15 500 140 empty empty SplitScreen2 20 12 0 14 -233017 --66577 0; -#X obj 276 286 gemhead 1; -#X obj 588 346 pix_texture; -#X obj 276 308 gemframebuffer; -#X obj 276 372 s framehead; -#X obj 588 301 gemhead 60; -#X obj 588 322 translateXYZ 2 0 0; -#X obj 276 330 rotateXYZ 90 0 0; -#X obj 276 350 translateXYZ 0 -4 0; -#X obj 588 368 square 1.9; -#X obj 277 41 gemhead 1; -#X obj 588 117 pix_texture; -#X obj 277 141 translateXYZ 0 0 -4; -#X obj 588 71 gemhead 50; -#X obj 588 93 translateXYZ -2 0 0; -#X obj 309 185 s framehead; +#X obj 260 166 cnv 15 300 140 empty empty SplitScreenY 20 12 0 14 #e0e0e0 #404040 0; +#X obj 276 192 gemhead 1; +#X obj 428 252 pix_texture; +#X obj 276 214 gemframebuffer; +#X obj 276 278 s framehead; +#X obj 428 207 gemhead 60; +#X obj 428 274 square 1.9; +#X obj 263 169 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 428 184 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 423 540 ortho; +#X obj 246 664 square 1; +#X obj 246 543 translateXYZ 3 -2 0; +#X floatatom 141 549 5 0 0 0 - - - 0; +#X obj 38 298 declare -lib Gem; +#X obj 600 43 cnv 15 300 240 empty empty SplitScreenXYZ 20 12 0 14 #e0e0e0 #404040 0; +#X obj 617 71 gemhead 1; +#X obj 768 217 pix_texture; +#X obj 617 171 translateXYZ 0 0 -4; +#X obj 768 171 gemhead 50; +#X obj 649 215 s framehead; #N canvas 1 51 450 300 view 0; #X obj 89 284 outlet rotate; #X obj 237 283 outlet translate; @@ -220,125 +216,174 @@ #X obj 81 94 pack 0 0 0 0 0; #X obj 89 222 f; #X obj 89 199 t b f; +#X obj 139 173 + 12; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 4 0 5 0; #X connect 4 1 5 1; #X connect 4 2 5 2; #X connect 4 3 9 0; -#X connect 4 4 8 1; +#X connect 4 4 10 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 4 0; #X connect 8 0 6 0; #X connect 9 0 8 0; #X connect 9 1 6 1; -#X restore 454 64 pd view; -#X obj 277 63 gemframebuffer; -#X obj 588 139 square 1.9; -#X obj 277 163 t a a; -#X obj 326 121 unpack 0 0 0; -#X obj 305 82 unpack 0 0 0; -#X obj 277 102 rotateXYZ 0 0 0; -#X msg 454 40 view 0 0 -4 \$1; -#X obj 277 213 s framehead1; -#X obj 588 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 263 17 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 263 263 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 588 278 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 423 540 ortho; -#X obj 246 664 square 1; -#X obj 246 503 translateXYZ 3 -2 0; -#X text 14 161 this will render a single scene; -#X text 13 189 from two different view-points; -#X text 13 175 into two framebuffers.; -#X text 16 224 the red sphere is only rendered; -#X text 18 240 in the left-hand "screen".; -#X obj 454 23 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 --262144 -1 -1 0 256; -#X floatatom 141 549 5 0 0 0 - - -; -#X obj 38 298 declare -lib Gem; +#X connect 10 0 8 1; +#X restore 764 94 pd view; +#X obj 617 93 gemframebuffer; +#X obj 768 239 square 1.9; +#X obj 617 193 t a a; +#X obj 666 151 unpack 0 0 0; +#X obj 645 112 unpack 0 0 0; +#X obj 617 132 rotateXYZ 0 0 0; +#X obj 617 243 s framehead1; +#X obj 768 150 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 603 47 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 764 53 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 260 20 cnv 15 300 140 empty empty SplitScreenX 20 12 0 14 #e0e0e0 #404040 0; +#X obj 276 46 gemhead 1; +#X obj 428 106 pix_texture; +#X obj 276 68 gemframebuffer; +#X obj 276 132 s framehead; +#X obj 428 61 gemhead 60; +#X obj 428 128 square 1.9; +#X obj 263 23 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 428 38 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 260 311 cnv 15 300 140 empty empty SplitScreenZ 20 12 0 14 #e0e0e0 #404040 0; +#X obj 276 337 gemhead 1; +#X obj 428 397 pix_texture; +#X obj 276 359 gemframebuffer; +#X obj 276 423 s framehead; +#X obj 428 352 gemhead 60; +#X obj 428 419 square 1.9; +#X obj 263 314 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 428 329 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 428 82 translateXYZ -2 2 0; +#X obj 428 228 translateXYZ 2 2 0; +#X obj 428 373 translateXYZ -2 -2 0; +#X obj 276 110 translateXYZ -4 0 0; +#X obj 276 401 translateXYZ 0 0 -4; +#X obj 768 193 translateXYZ 2 -2 0; +#X obj 276 381 rotateXYZ 0 0 0; +#X floatatom 352 42 5 0 0 0 - - - 0; +#X obj 36 576 rotateXYZ; +#X obj 276 90 rotateXYZ 0 -90 0; +#X obj 276 256 translateXYZ 0 -4 0; +#X obj 276 236 rotateXYZ 90 0 0; +#X obj 170 502 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 765 71 view 0 -2 8 200 \$1; +#X obj 377 567 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 568 557 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X text 14 161 this will render a single scene into multiple framebuffers from different viewpoints., f 31; +#X text 16 224 the red sphere is only rendered in the XYZ "screen", f 33; +#X obj 675 346 gemhead 1; +#X obj 675 369 t b; +#X obj 675 392 s rendertick; +#X obj 88 477 r rendertick; +#X obj 321 521 r rendertick; #X connect 0 0 1 0; -#X connect 2 0 11 0; -#X connect 3 0 2 0; -#X connect 3 1 4 0; -#X connect 4 0 14 0; -#X connect 5 0 6 0; -#X connect 6 0 4 1; -#X connect 8 0 9 0; -#X connect 10 0 17 0; -#X connect 11 0 7 0; -#X connect 12 0 11 1; -#X connect 13 0 12 0; -#X connect 14 0 15 0; -#X connect 14 1 5 0; -#X connect 15 0 2 1; -#X connect 15 1 16 0; -#X connect 16 0 13 0; -#X connect 17 0 28 0; -#X connect 18 0 27 0; -#X connect 19 0 26 0; -#X connect 19 1 20 0; -#X connect 20 0 23 0; -#X connect 21 0 22 0; -#X connect 22 0 20 1; -#X connect 23 0 24 0; -#X connect 23 1 21 0; -#X connect 24 0 26 3; -#X connect 25 0 18 0; -#X connect 26 0 75 0; -#X connect 27 0 76 0; -#X connect 28 0 3 0; -#X connect 29 0 30 0; -#X connect 30 0 31 0; -#X connect 31 0 74 0; -#X connect 33 0 36 0; -#X connect 34 0 32 0; -#X connect 35 0 37 0; -#X connect 36 0 34 0; -#X connect 37 0 36 1; -#X connect 37 1 36 2; -#X connect 37 2 36 3; -#X connect 39 0 38 0; -#X connect 40 0 39 0; -#X connect 41 0 42 0; -#X connect 42 0 40 0; -#X connect 46 0 48 0; -#X connect 47 0 54 0; -#X connect 48 0 52 0; -#X connect 48 1 47 1; -#X connect 50 0 51 0; -#X connect 51 0 47 0; -#X connect 52 0 53 0; -#X connect 53 0 49 0; -#X connect 55 0 62 0; -#X connect 56 0 63 0; -#X connect 57 0 64 0; -#X connect 58 0 59 0; -#X connect 59 0 56 0; +#X connect 2 0 12 0; +#X connect 3 0 4 0; +#X connect 4 0 2 1; +#X connect 6 0 7 0; +#X connect 8 0 15 0; +#X connect 9 0 5 0; +#X connect 10 0 9 1; +#X connect 11 0 10 0; +#X connect 12 0 13 0; +#X connect 12 1 3 0; +#X connect 13 0 98 1; +#X connect 13 1 14 0; +#X connect 14 0 11 0; +#X connect 15 0 25 0; +#X connect 16 0 24 0; +#X connect 17 0 20 0; +#X connect 18 0 19 0; +#X connect 19 0 17 1; +#X connect 20 0 21 0; +#X connect 20 1 18 0; +#X connect 21 0 23 3; +#X connect 22 0 16 0; +#X connect 23 0 51 0; +#X connect 24 0 52 0; +#X connect 25 0 98 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 50 0; +#X connect 30 0 33 0; +#X connect 31 0 29 0; +#X connect 32 0 34 0; +#X connect 33 0 31 0; +#X connect 34 0 33 1; +#X connect 34 1 33 2; +#X connect 34 2 33 3; +#X connect 36 0 35 0; +#X connect 37 0 36 0; +#X connect 38 0 39 0; +#X connect 39 0 37 0; +#X connect 42 0 44 0; +#X connect 43 0 47 0; +#X connect 44 0 101 0; +#X connect 44 1 43 1; +#X connect 46 0 91 0; +#X connect 48 0 42 0; +#X connect 49 0 46 0; +#X connect 50 0 30 0; +#X connect 52 0 23 0; +#X connect 53 0 98 2; +#X connect 56 0 62 0; +#X connect 57 0 63 0; +#X connect 58 0 64 0; +#X connect 59 0 95 0; #X connect 61 0 66 0; #X connect 61 1 65 0; #X connect 62 0 67 0; -#X connect 62 1 56 1; -#X connect 64 0 69 0; +#X connect 62 1 57 1; +#X connect 64 0 68 0; #X connect 64 1 60 0; -#X connect 65 0 57 1; -#X connect 65 1 57 2; -#X connect 65 2 57 3; +#X connect 65 0 58 1; +#X connect 65 1 58 2; +#X connect 65 2 58 3; #X connect 66 0 67 1; #X connect 66 1 67 2; #X connect 66 2 67 3; -#X connect 67 0 57 0; -#X connect 68 0 61 0; -#X connect 70 0 58 0; -#X connect 71 0 55 0; -#X connect 72 0 46 0; -#X connect 73 0 50 0; -#X connect 74 0 33 0; -#X connect 76 0 19 0; -#X connect 82 0 68 0; -#X connect 83 0 2 2; +#X connect 67 0 58 0; +#X connect 69 0 59 0; +#X connect 70 0 56 0; +#X connect 71 0 103 0; +#X connect 73 0 75 0; +#X connect 74 0 78 0; +#X connect 75 0 99 0; +#X connect 75 1 74 1; +#X connect 77 0 90 0; +#X connect 79 0 73 0; +#X connect 80 0 77 0; +#X connect 82 0 84 0; +#X connect 83 0 87 0; +#X connect 84 0 96 0; +#X connect 84 1 83 1; +#X connect 86 0 92 0; +#X connect 88 0 82 0; +#X connect 89 0 86 0; +#X connect 90 0 74 0; +#X connect 91 0 43 0; +#X connect 92 0 83 0; +#X connect 93 0 76 0; +#X connect 94 0 85 0; +#X connect 95 0 57 0; +#X connect 96 0 94 0; +#X connect 97 0 99 1; +#X connect 98 0 9 0; +#X connect 99 0 93 0; +#X connect 100 0 45 0; +#X connect 101 0 100 0; +#X connect 102 0 3 1; +#X connect 103 0 61 0; +#X connect 104 0 18 1; +#X connect 105 0 32 0; +#X connect 108 0 109 0; +#X connect 109 0 110 0; +#X connect 111 0 2 0; +#X connect 112 0 17 0; diff --git a/examples/02.advanced/24.query_GPU.pd b/examples/02.advanced/24.query_GPU.pd new file mode 100644 index 000000000..414b4aa9f --- /dev/null +++ b/examples/02.advanced/24.query_GPU.pd @@ -0,0 +1,81 @@ +#N canvas 795 186 742 548 12; +#X obj 30 65 gemwin; +#X obj 37 171 GEMglGetIntegerv GL_MAX_VIEWPORT_DIMS; +#X obj 37 141 gemhead; +#X msg 30 14 create \, 1; +#X msg 49 41 destroy; +#X msg 453 170 \$1 \$2; +#X listbox 510 170 20 0 0 0 - - - 0; +#X obj 37 195 GEMglGetIntegerv GL_MAX_TEXTURE_SIZE; +#X obj 37 220 GEMglGetIntegerv GL_MAX_TEXTURE_IMAGE_UNITS; +#X obj 37 246 GEMglGetIntegerv GL_MAX_VERTEX_ATTRIBS; +#X obj 37 272 GEMglGetIntegerv GL_MAX_VERTEX_UNIFORM_COMPONENTS; +#X obj 37 297 GEMglGetIntegerv GL_MAX_VARYING_FLOATS; +#X msg 453 193 \$1; +#X listbox 510 193 20 0 0 0 - - - 0; +#X listbox 510 220 20 0 0 0 - - - 0; +#X listbox 510 243 20 0 0 0 - - - 0; +#X listbox 510 273 20 0 0 0 - - - 0; +#X listbox 510 303 20 0 0 0 - - - 0; +#X msg 453 220 \$1; +#X msg 453 243 \$1; +#X msg 453 273 \$1; +#X msg 453 296 \$1; +#X listbox 510 320 20 0 0 0 - - - 0; +#X listbox 510 343 20 0 0 0 - - - 0; +#X listbox 510 370 20 0 0 0 - - - 0; +#X listbox 510 393 20 0 0 0 - - - 0; +#X listbox 510 423 20 0 0 0 - - - 0; +#X listbox 510 453 20 0 0 0 - - - 0; +#X msg 453 370 \$1; +#X msg 453 393 \$1; +#X msg 453 423 \$1; +#X msg 453 453 \$1; +#X obj 37 321 GEMglGetIntegerv GL_MAX_GEOMETRY_INPUT_COMPONENTS; +#X msg 453 343 \$1; +#X obj 37 345 GEMglGetIntegerv GL_MAX_GEOMETRY_OUTPUT_COMPONENTS; +#X obj 37 370 GEMglGetIntegerv GL_MAX_GEOMETRY_OUTPUT_VERTICES; +#X obj 37 396 GEMglGetIntegerv GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS; +#X obj 37 422 GEMglGetIntegerv GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS; +#X obj 37 447 GEMglGetIntegerv GL_MAX_UNIFORM_BLOCK_SIZE; +#X msg 453 320 \$1; +#X text 190 21 This patch queries your GPU for its limitations.; +#X text 191 51 All GPUs have different hardware limitations.; +#X connect 1 0 7 0; +#X connect 1 1 5 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 7 0 8 0; +#X connect 7 1 12 0; +#X connect 8 0 9 0; +#X connect 8 1 18 0; +#X connect 9 0 10 0; +#X connect 9 1 19 0; +#X connect 10 0 11 0; +#X connect 10 1 20 0; +#X connect 11 0 32 0; +#X connect 11 1 21 0; +#X connect 12 0 13 0; +#X connect 18 0 14 0; +#X connect 19 0 15 0; +#X connect 20 0 16 0; +#X connect 21 0 17 0; +#X connect 28 0 24 0; +#X connect 29 0 25 0; +#X connect 30 0 26 0; +#X connect 31 0 27 0; +#X connect 32 0 34 0; +#X connect 32 1 39 0; +#X connect 33 0 23 0; +#X connect 34 0 35 0; +#X connect 34 1 33 0; +#X connect 35 0 36 0; +#X connect 35 1 28 0; +#X connect 36 0 37 0; +#X connect 36 1 29 0; +#X connect 37 0 38 0; +#X connect 37 1 30 0; +#X connect 38 1 31 0; +#X connect 39 0 22 0; diff --git a/examples/02.advanced/25.feedback.pd b/examples/02.advanced/25.feedback.pd new file mode 100644 index 000000000..a6dfb1c81 --- /dev/null +++ b/examples/02.advanced/25.feedback.pd @@ -0,0 +1,119 @@ +#N canvas 550 258 1097 614 12; +#X declare -lib Gem; +#X text 120 105 <----- 1; +#N canvas 87 154 247 179 Gem.init 0; +#X obj 118 46 loadbang; +#X msg 118 81 reset; +#X obj 118 113 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 27 54 pd Gem.init; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 27 82 pd gemwin; +#X obj 28 547 circle; +#X floatatom 69 490 5 0 0 0 - - - 0; +#X floatatom 110 491 5 0 0 0 - - - 0; +#X obj 28 252 t a a; +#X obj 60 355 square 4; +#X obj 60 330 pix_texture; +#X obj 28 225 translateXYZ 0 0 -4; +#X obj 446 300 translateXYZ 0 0 -4; +#X obj 446 514 pix_texture; +#X obj 787 263 gemhead 30; +#X text 862 262 rendering in the Gem window; +#X obj 787 297 pix_texture; +#X obj 787 322 square 4; +#X obj 28 152 gemhead 10; +#X obj 446 191 gemhead 20; +#X obj 27 17 declare -lib Gem; +#N canvas 0 0 450 300 clearZ 0; +#X obj 120 48 loadbang; +#X obj 55 95 GEMglClear; +#X obj 120 72 GLdefine GL_DEPTH_BUFFER_BIT; +#X obj 55 19 inlet; +#X obj 55 141 outlet; +#X obj 182 50 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 1; +#X connect 3 0 1 0; +#X connect 5 0 2 0; +#X restore 28 410 pd clearZ; +#X obj 28 519 translateXYZ 0 0 0; +#X obj 446 269 alpha; +#X obj 28 180 gemframebuffer \; dimen 400 400; +#X obj 446 219 gemframebuffer \; dimen 400 400; +#X floatatom 526 543 5 0 0 0 - - - 0; +#X obj 446 542 square 4.1; +#X text 168 490 <----- 2; +#X text 105 395 "Clear the Z buffer in order to enforce the render on top of the feedback texture", f 25; +#X text 156 332 feedback texture; +#X text 104 548 render somthing simple; +#X text 460 342 A shader can be inserted here for more complex feedback loop, f 21; +#X text 608 426 change the color of the feedback loop for a simple effect, f 33; +#X text 581 541 <----- 3; +#X text 654 542 zoom effect; +#X obj 446 432 colorRGB 0.9 1 0 0.95; +#X text 109 152 main render in a framebuffer; +#X text 529 191 feedback render; +#X text 309 15 A framebuffer image is persistent \, so you can use it to create feedback in an efficient way.; +#X connect 1 0 2 0; +#X connect 4 0 20 1; +#X connect 5 0 20 2; +#X connect 6 0 19 0; +#X connect 6 1 8 0; +#X connect 8 0 7 0; +#X connect 9 0 6 0; +#X connect 10 0 34 0; +#X connect 11 0 25 0; +#X connect 12 0 14 0; +#X connect 14 0 15 0; +#X connect 16 0 22 0; +#X connect 17 0 23 0; +#X connect 19 0 20 0; +#X connect 20 0 3 0; +#X connect 21 0 10 0; +#X connect 22 0 9 0; +#X connect 22 1 11 1; +#X connect 22 1 14 1; +#X connect 23 0 21 0; +#X connect 23 1 8 1; +#X connect 24 0 25 1; +#X connect 34 0 11 0; diff --git a/examples/07.texture/12.floatingpoint_framebuffer.pd b/examples/07.texture/12.floatingpoint_framebuffer.pd new file mode 100644 index 000000000..bfa467416 --- /dev/null +++ b/examples/07.texture/12.floatingpoint_framebuffer.pd @@ -0,0 +1,73 @@ +#N canvas 589 308 889 620 12; +#X obj 54 142 _gemwin; +#X obj 549 390 pix_texture; +#X obj 549 455 square 4; +#X obj 408 182 translateXYZ 0 0 -4; +#X obj 408 266 t a a; +#X obj 408 352 t a b; +#X obj 549 423 colorRGB 1 1 1; +#X obj 427 524 output~; +#X obj 548 267 +~ 1; +#X obj 548 292 *~ 0.5; +#X msg 82 210 \; pd dsp 1; +#X obj 598 105 gemhead; +#X obj 598 130 pix_texture; +#X obj 598 155 square 3; +#X floatatom 656 393 5 0 0 0 - - - 0; +#X obj 548 242 osc~ 750; +#X obj 408 99 gemframebuffer \; dimen 64 64 \; type FLOAT \; format RGBA32F; +#X obj 673 249 sig~ 180.5; +#X obj 673 274 /~ 255; +#X obj 562 513 snapshot~; +#X obj 672 474 loadbang; +#X obj 672 499 metro 50; +#X obj 736 473 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X obj 562 490 *~ 255; +#X obj 676 198 hsl 170 20 100 255 0 0 empty empty empty -2 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X floatatom 673 223 5 0 0 0 - - - 0; +#X obj 408 377 pix_snap 64 1 \; type FLOAT; +#X text 82 21 RGBA32F is needed for floating point pixels; +#X obj 549 320 pix_sig2pix~ 64 1 \; type FLOAT; +#X obj 408 447 pix_pix2sig~; +#X obj 408 29 bang~; +#X obj 408 55 gemhead 20 \; 0; +#X floatatom 549 208 5 0 0 0 - - - 0; +#X obj 562 538 nbx 5 18 -1e+37 1e+37 0 0 empty empty empty 0 -10 0 12 #c6ffc7 #000000 #000000 0 256; +#X obj 146 38 cnv 20 133 80 empty empty empty 20 12 0 12 #c6ffc7 #404040 0; +#X msg 157 79 format RGBA; +#X msg 157 54 format RGBA32F; +#X connect 1 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 1 28 0; +#X connect 5 0 26 0; +#X connect 5 1 26 0; +#X connect 6 0 2 0; +#X connect 8 0 9 0; +#X connect 9 0 28 0; +#X connect 9 0 28 1; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 14 0 6 1; +#X connect 15 0 8 0; +#X connect 16 0 3 0; +#X connect 16 1 12 1; +#X connect 17 0 18 0; +#X connect 18 0 28 2; +#X connect 19 0 33 0; +#X connect 20 0 21 0; +#X connect 21 0 19 0; +#X connect 22 0 21 0; +#X connect 23 0 19 0; +#X connect 24 0 25 0; +#X connect 25 0 17 0; +#X connect 26 0 29 0; +#X connect 28 0 1 0; +#X connect 29 1 7 0; +#X connect 29 2 7 1; +#X connect 29 3 23 0; +#X connect 30 0 31 0; +#X connect 31 0 16 0; +#X connect 32 0 15 0; +#X connect 35 0 16 0; +#X connect 36 0 16 0; diff --git a/examples/09.openGL/03.stencilBuffer.pd b/examples/09.openGL/03.stencilBuffer.pd index 94f49674d..219c342ad 100644 --- a/examples/09.openGL/03.stencilBuffer.pd +++ b/examples/09.openGL/03.stencilBuffer.pd @@ -1,73 +1,54 @@ #N canvas 431 61 849 900 10; #X declare -lib Gem; -#X obj 39 337 GEMglEnable; -#X floatatom 125 339 5 0 0 0 - - -; -#X obj 111 289 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 111 312 GLdefine GL_STENCIL_TEST; -#X obj 129 287 loadbang; #X obj 104 389 GLdefine GL_STENCIL_BUFFER_BIT; -#X obj 166 368 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 119 414 5 0 0 0 - - -; +#X obj 166 368 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X floatatom 229 415 5 0 0 0 - - - 0; #X obj 104 366 loadbang; #X obj 39 256 GEMglClearStencil 0; #X obj 39 414 GEMglClear; #X obj 39 40 gemhead 45; #X obj 39 513 GEMglStencilFunc; #X msg 146 487 1; -#X obj 75 443 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 75 443 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 74 466 GLdefine GL_ALWAYS; #X obj 96 443 loadbang; -#X floatatom 100 487 5 0 0 0 - - -; +#X floatatom 100 487 5 0 0 0 - - - 0; #X obj 39 593 GEMglStencilOp; -#X floatatom 156 588 5 0 0 0 - - -; -#X obj 70 493 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X floatatom 156 588 5 0 0 0 - - - 0; +#X obj 70 493 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 70 559 GLdefine GL_REPLACE; #X obj 95 537 loadbang; -#X obj 239 750 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 239 750 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 170 749 loadbang; #X obj 39 817 GEMglClear; -#X floatatom 156 819 5 0 0 0 - - -; +#X floatatom 156 819 5 0 0 0 - - - 0; #X obj 145 795 GLdefine GL_DEPTH_BUFFER_BIT; #X obj 126 750 t b b; #X obj 490 294 GEMglStencilFunc; #X msg 597 270 1; -#X obj 525 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 525 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 546 225 loadbang; -#X floatatom 535 271 5 0 0 0 - - -; +#X floatatom 535 271 5 0 0 0 - - - 0; #X obj 525 248 GLdefine GL_NOTEQUAL; #X obj 490 403 color 1 0 0; #X obj 490 666 GEMglStencilFunc; #X msg 597 641 1; -#X obj 525 601 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 525 601 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 547 599 loadbang; -#X floatatom 536 645 5 0 0 0 - - -; +#X floatatom 536 645 5 0 0 0 - - - 0; #X obj 490 716 rotateXYZ 0 0 45; #X obj 525 622 GLdefine GL_EQUAL; #X obj 490 692 color 1 1 0; #X obj 126 773 GLdefine GL_COLOR_BUFFER_BIT; #X obj 490 372 GEMglStencilOp; -#X floatatom 601 371 5 0 0 0 - - -; -#X obj 521 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X floatatom 601 371 5 0 0 0 - - - 0; +#X obj 521 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 544 314 loadbang; #X obj 521 338 GLdefine GL_KEEP; -#X floatatom 58 151 5 0 0 0 - - -; -#X floatatom 97 151 5 0 0 0 - - -; +#X floatatom 58 151 5 0 0 0 - - - 0; +#X floatatom 97 151 5 0 0 0 - - - 0; #X obj 39 194 colorRGB 0 0 1; #X obj 126 817 |; -#X floatatom 587 837 5 0 0 0 - - -; -#X obj 569 789 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 569 812 GLdefine GL_STENCIL_TEST; -#X obj 587 787 loadbang; -#X obj 490 837 GEMglDisable; #X text 67 219 allow \, clear and configure stencil buffer; #X obj 39 702 circle 1.5; #X text 131 692 draw in all buffer; @@ -76,9 +57,9 @@ #X obj 490 430 square 3; #X text 522 572 draw where the stencil buffer is 1; #X obj 529 28 gemhead 10; -#X floatatom 562 48 5 0 0 0 - - -; -#X floatatom 602 48 5 0 0 0 - - -; -#X floatatom 642 48 5 0 0 0 - - -; +#X floatatom 562 48 5 0 0 0 - - - 0; +#X floatatom 602 48 5 0 0 0 - - - 0; +#X floatatom 642 48 5 0 0 0 - - - 0; #X obj 529 94 world_light; #X obj 529 69 rotateXYZ 0 0 0; #X obj 39 174 rotateXYZ; @@ -86,8 +67,7 @@ #X text 238 865 (c) Cyrille Henry 2006; #X obj 39 63 t a b; #X obj 74 85 i; -#X obj 122 63 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; +#X obj 122 63 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X obj 103 85 + 0; #X obj 74 130 t f f; #X obj 74 107 spigot; @@ -95,14 +75,12 @@ #X obj 39 664 spigot; #X obj 104 661 spigot; #X obj 79 617 loadbang; -#X obj 147 639 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 147 639 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X obj 82 641 == 0; #X msg 147 618 0; #X obj 131 84 % 360; #X obj 490 761 sphere 1.2 25; -#X obj 39 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; +#X obj 39 13 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X obj 118 113 outlet; @@ -111,8 +89,7 @@ #X connect 2 0 1 0; #X restore 372 45 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -151,104 +128,98 @@ #X coords 0 -1 1 1 85 40 1 100 100; #X restore 342 62 pd gemwin; #X obj 716 16 declare -lib Gem; -#X connect 0 0 10 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 3 0 0 1; -#X connect 4 0 3 0; +#X obj 39 337 GEMglEnable GL_STENCIL_TEST; +#X obj 490 827 GEMglDisable GL_STENCIL_TEST; +#X connect 0 0 2 0; +#X connect 0 0 5 1; +#X connect 1 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 84 0; #X connect 5 0 7 0; -#X connect 5 0 10 1; -#X connect 6 0 5 0; -#X connect 8 0 5 0; -#X connect 9 0 0 0; +#X connect 6 0 65 0; +#X connect 7 0 13 0; +#X connect 8 0 7 3; +#X connect 8 0 7 2; +#X connect 9 0 10 0; +#X connect 9 0 8 0; +#X connect 10 0 7 1; #X connect 10 0 12 0; -#X connect 11 0 75 0; -#X connect 12 0 18 0; -#X connect 13 0 12 3; -#X connect 13 0 12 2; -#X connect 14 0 15 0; -#X connect 14 0 13 0; -#X connect 15 0 12 1; -#X connect 15 0 17 0; -#X connect 16 0 13 0; -#X connect 16 0 15 0; -#X connect 18 0 82 0; -#X connect 18 0 83 0; -#X connect 20 0 21 0; -#X connect 21 0 19 0; -#X connect 21 0 18 1; -#X connect 21 0 18 2; -#X connect 21 0 18 3; -#X connect 22 0 20 0; -#X connect 23 0 28 0; -#X connect 24 0 28 0; -#X connect 25 0 29 0; -#X connect 27 0 53 1; -#X connect 28 0 44 0; -#X connect 28 1 27 0; -#X connect 29 0 45 0; -#X connect 30 0 29 3; -#X connect 30 0 29 2; -#X connect 31 0 34 0; -#X connect 32 0 30 0; -#X connect 32 0 34 0; -#X connect 34 0 29 1; -#X connect 34 0 33 0; -#X connect 35 0 64 0; -#X connect 36 0 43 0; -#X connect 37 0 36 3; -#X connect 37 0 36 2; -#X connect 38 0 42 0; -#X connect 39 0 37 0; -#X connect 39 0 42 0; -#X connect 41 0 89 0; -#X connect 42 0 36 1; -#X connect 42 0 40 0; -#X connect 43 0 41 0; -#X connect 44 0 53 0; -#X connect 45 0 35 0; -#X connect 47 0 49 0; -#X connect 48 0 47 0; -#X connect 49 0 46 0; -#X connect 49 0 45 1; -#X connect 49 0 45 2; -#X connect 49 0 45 3; -#X connect 50 0 72 1; -#X connect 51 0 72 2; -#X connect 52 0 9 0; -#X connect 53 0 26 0; -#X connect 53 0 25 1; -#X connect 55 0 56 0; -#X connect 56 0 54 0; -#X connect 56 0 58 1; -#X connect 57 0 56 0; -#X connect 60 0 25 0; -#X connect 64 0 36 0; -#X connect 66 0 71 0; -#X connect 67 0 71 1; -#X connect 68 0 71 2; -#X connect 69 0 71 3; -#X connect 71 0 70 0; -#X connect 72 0 52 0; -#X connect 75 0 72 0; -#X connect 75 1 76 0; -#X connect 76 0 78 0; -#X connect 76 0 80 0; -#X connect 77 0 78 1; -#X connect 77 0 80 1; -#X connect 78 0 88 0; -#X connect 79 0 50 0; -#X connect 79 1 51 0; -#X connect 80 0 79 0; -#X connect 81 0 25 0; -#X connect 82 0 60 0; -#X connect 83 0 81 0; -#X connect 84 0 87 0; -#X connect 85 0 83 1; -#X connect 85 0 86 0; -#X connect 86 0 82 1; -#X connect 87 0 85 0; -#X connect 88 0 76 1; -#X connect 89 0 58 0; -#X connect 90 0 11 0; -#X connect 91 0 92 0; +#X connect 11 0 8 0; +#X connect 11 0 10 0; +#X connect 13 0 72 0; +#X connect 13 0 73 0; +#X connect 15 0 16 0; +#X connect 16 0 14 0; +#X connect 16 0 13 1; +#X connect 16 0 13 2; +#X connect 16 0 13 3; +#X connect 17 0 15 0; +#X connect 18 0 23 0; +#X connect 19 0 23 0; +#X connect 20 0 24 0; +#X connect 22 0 48 1; +#X connect 23 0 39 0; +#X connect 23 1 22 0; +#X connect 24 0 40 0; +#X connect 25 0 24 3; +#X connect 25 0 24 2; +#X connect 26 0 29 0; +#X connect 27 0 25 0; +#X connect 27 0 29 0; +#X connect 29 0 24 1; +#X connect 29 0 28 0; +#X connect 30 0 54 0; +#X connect 31 0 38 0; +#X connect 32 0 31 3; +#X connect 32 0 31 2; +#X connect 33 0 37 0; +#X connect 34 0 32 0; +#X connect 34 0 37 0; +#X connect 36 0 79 0; +#X connect 37 0 31 1; +#X connect 37 0 35 0; +#X connect 38 0 36 0; +#X connect 39 0 48 0; +#X connect 40 0 30 0; +#X connect 42 0 44 0; +#X connect 43 0 42 0; +#X connect 44 0 41 0; +#X connect 44 0 40 1; +#X connect 44 0 40 2; +#X connect 44 0 40 3; +#X connect 45 0 62 1; +#X connect 46 0 62 2; +#X connect 47 0 4 0; +#X connect 48 0 21 0; +#X connect 48 0 20 1; +#X connect 50 0 20 0; +#X connect 54 0 31 0; +#X connect 56 0 61 0; +#X connect 57 0 61 1; +#X connect 58 0 61 2; +#X connect 59 0 61 3; +#X connect 61 0 60 0; +#X connect 62 0 47 0; +#X connect 65 0 62 0; +#X connect 65 1 66 0; +#X connect 66 0 68 0; +#X connect 66 0 70 0; +#X connect 67 0 68 1; +#X connect 67 0 70 1; +#X connect 68 0 78 0; +#X connect 69 0 45 0; +#X connect 69 1 46 0; +#X connect 70 0 69 0; +#X connect 71 0 20 0; +#X connect 72 0 50 0; +#X connect 73 0 71 0; +#X connect 74 0 77 0; +#X connect 75 0 73 1; +#X connect 75 0 76 0; +#X connect 76 0 72 1; +#X connect 77 0 75 0; +#X connect 78 0 66 1; +#X connect 79 0 85 0; +#X connect 80 0 6 0; +#X connect 81 0 82 0; +#X connect 84 0 5 0; diff --git a/examples/09.openGL/06.clear_framebuffer.pd b/examples/09.openGL/06.clear_framebuffer.pd new file mode 100644 index 000000000..d305b7b4e --- /dev/null +++ b/examples/09.openGL/06.clear_framebuffer.pd @@ -0,0 +1,50 @@ +#N canvas 684 195 706 671 12; +#X obj 42 172 gemhead; +#X obj 42 323 translateXYZ 0 0 -4; +#X obj 42 637 circle 1; +#X obj 524 191 gemhead; +#X obj 524 479 square 4; +#X obj 524 405 pix_texture; +#X obj 42 483 t a b; +#X obj 42 553 accumrotate 0 0 0; +#X obj 42 584 translateXYZ 2 0 0; +#X msg 74 510 10; +#X obj 42 199 alpha; +#X obj 42 612 colorRGB 1 1 1 1; +#X msg 146 172 clear \$1; +#X obj 146 138 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X obj 524 439 pix_coordinate; +#X floatatom 124 510 5 0 0 0 - - - 0; +#X obj 42 349 color 0 0 0 0.1; +#X obj 42 373 square 4; +#X obj 107 397 loadbang; +#X obj 42 444 GEMglClear; +#X obj 107 421 GLdefine GL_DEPTH_BUFFER_BIT; +#X obj 169 399 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X text 132 445 <- depth is not cleared in "clear 0" mode; +#X obj 42 224 gemframebuffer \; format RGBA \; dimen 400 400 \; color 0 0 0 0.5 \; clear 0; +#X text 240 24 This is an example of simple remanence: the buffer is not cleared between 2 images. A black \, mostly transparent square is drawn in order to darken the old image.; +#X obj 43 45 _gemwin; +#X connect 0 0 10 0; +#X connect 1 0 16 0; +#X connect 3 0 5 0; +#X connect 5 0 14 0; +#X connect 6 0 7 0; +#X connect 6 1 9 0; +#X connect 7 0 8 0; +#X connect 8 0 11 0; +#X connect 9 0 7 3; +#X connect 10 0 23 0; +#X connect 11 0 2 0; +#X connect 12 0 23 0; +#X connect 13 0 12 0; +#X connect 14 0 4 0; +#X connect 15 0 7 3; +#X connect 16 0 17 0; +#X connect 17 0 19 0; +#X connect 18 0 20 0; +#X connect 19 0 6 0; +#X connect 20 0 19 1; +#X connect 21 0 20 0; +#X connect 23 0 1 0; +#X connect 23 1 5 1; diff --git a/examples/10.glsl/01.simple_texture.pd b/examples/10.glsl/01.simple_texture.pd index 7ee3de6f8..ccea1917c 100644 --- a/examples/10.glsl/01.simple_texture.pd +++ b/examples/10.glsl/01.simple_texture.pd @@ -1,34 +1,26 @@ #N canvas 486 82 722 633 10; #X declare -lib Gem; #X obj 76 22 gemhead; -#X obj 76 367 glsl_program; -#X obj 169 329 print linking; #X obj 76 411 rotateXYZ; -#X floatatom 96 389 5 0 0 0 - - -; -#X floatatom 140 389 5 0 0 0 - - -; -#X floatatom 182 389 5 0 0 0 - - -; +#X floatatom 96 389 5 0 0 0 - - - 0; +#X floatatom 140 389 5 0 0 0 - - - 0; +#X floatatom 182 389 5 0 0 0 - - - 0; #X obj 76 580 pix_texture; #X msg 548 116 color 1 0 0; -#X obj 106 69 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 106 154 open texture.frag; -#X obj 76 197 glsl_fragment; -#X text 215 459 <- load texture; -#X obj 106 535 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 76 489 pix_image img1.jpg; -#X msg 103 460 open img2.jpg; -#X msg 243 154 open texture_rect.frag; -#X msg 114 114 0; -#X obj 243 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 275 70 <-load an other shader; -#X text 279 84 (using rectangular texturing); -#X msg 254 113 1; +#X obj 106 69 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X text 245 459 <- load texture; +#X obj 106 535 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 76 489 pix_image ../data/img1.jpg; +#X msg 103 460 open ../data/img2.jpg; +#X msg 114 113 0; +#X obj 283 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X text 315 70 <-load an other shader; +#X text 319 84 (using rectangular texturing); +#X msg 294 113 1; #X msg 351 258 B \$1; #X msg 364 297 C \$1; -#X floatatom 351 241 5 0 0 0 - - -; -#X floatatom 364 280 5 0 0 0 - - -; +#X floatatom 351 241 5 0 0 0 - - - 0; +#X floatatom 364 280 5 0 0 0 - - - 0; #X text 408 280 <- adjust Contrast; #X text 400 240 <- adjust Brightness; #X text 138 67 <- load shader; @@ -41,8 +33,7 @@ #X connect 1 0 2 0; #X restore 566 142 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -81,46 +72,42 @@ #X coords 0 -1 1 1 85 40 1 100 100; #X restore 548 163 pd gemwin; #X msg 106 555 rectangle \$1; -#X obj 254 134 s rectangle; -#X obj 114 135 s rectangle; +#X obj 294 134 s rectangle; +#X obj 114 134 s rectangle; #X obj 106 512 r rectangle; -#X msg 32 167 print; -#X msg 39 340 print; -#X floatatom 192 372 0 0 0 0 - - -; -#X msg 151 308 link \$1; -#X obj 151 259 change; +#X msg 34 277 print; +#X floatatom 97 300 0 0 0 0 - - - 0; #X obj 604 13 declare -lib Gem; -#X connect 0 0 11 0; -#X connect 1 0 3 0; -#X connect 1 1 38 0; -#X connect 3 0 14 0; -#X connect 4 0 3 1; -#X connect 5 0 3 2; -#X connect 6 0 3 3; -#X connect 7 0 29 0; -#X connect 8 0 31 0; -#X connect 9 0 10 0; -#X connect 9 0 17 0; -#X connect 10 0 11 0; -#X connect 11 0 1 0; -#X connect 11 1 40 0; -#X connect 13 0 32 0; -#X connect 14 0 7 0; -#X connect 15 0 14 0; -#X connect 16 0 11 0; -#X connect 17 0 34 0; -#X connect 18 0 16 0; -#X connect 18 0 21 0; -#X connect 21 0 33 0; -#X connect 22 0 1 0; -#X connect 23 0 1 0; -#X connect 24 0 22 0; -#X connect 25 0 23 0; -#X connect 30 0 31 0; -#X connect 32 0 7 0; -#X connect 35 0 13 0; -#X connect 36 0 11 0; -#X connect 37 0 1 0; -#X connect 39 0 1 0; -#X connect 39 0 2 0; -#X connect 40 0 39 0; +#X obj 106 46 loadbang; +#X obj 76 277 glsl; +#X msg 106 154 open shader/texture; +#X msg 283 154 open shader/texture_rect; +#X connect 0 0 35 0; +#X connect 1 0 10 0; +#X connect 2 0 1 1; +#X connect 3 0 1 2; +#X connect 4 0 1 3; +#X connect 5 0 24 0; +#X connect 6 0 26 0; +#X connect 7 0 36 0; +#X connect 7 0 12 0; +#X connect 9 0 27 0; +#X connect 10 0 5 0; +#X connect 11 0 10 0; +#X connect 12 0 29 0; +#X connect 13 0 37 0; +#X connect 13 0 16 0; +#X connect 16 0 28 0; +#X connect 17 0 35 1; +#X connect 18 0 35 1; +#X connect 19 0 17 0; +#X connect 20 0 18 0; +#X connect 25 0 26 0; +#X connect 27 0 5 0; +#X connect 30 0 9 0; +#X connect 31 0 35 0; +#X connect 34 0 7 0; +#X connect 35 0 1 0; +#X connect 35 1 32 0; +#X connect 36 0 35 0; +#X connect 37 0 35 0; diff --git a/examples/10.glsl/02.primitive_distortion.pd b/examples/10.glsl/02.primitive_distortion.pd index 07a3180a4..3eda95136 100644 --- a/examples/10.glsl/02.primitive_distortion.pd +++ b/examples/10.glsl/02.primitive_distortion.pd @@ -1,48 +1,16 @@ -#N canvas 228 61 587 690 10; +#N canvas 545 64 587 514 10; #X declare -lib Gem; #X obj 74 19 gemhead; -#X msg 29 100 print; -#X obj 74 362 glsl_program; -#X obj 215 141 change; -#X msg 98 333 print; -#X floatatom 215 164 2 0 0 0 ID - -; -#X obj 164 312 print linking; -#X obj 74 122 glsl_vertex; -#X obj 74 551 pix_texture; #X obj 74 44 alpha; -#X obj 101 497 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X floatatom 292 302 5 0 0 0 - - -; -#X msg 101 475 0; -#X msg 292 323 K \$1; -#X obj 74 594 sphere 2 30; -#N canvas 0 50 450 300 load_shader 0; -#X obj 89 99 t b b; -#X msg 119 126 0; -#X obj 89 154 outlet; -#X obj 89 71 gemhead 1; -#X connect 0 0 2 0; -#X connect 0 1 1 0; -#X connect 1 0 3 0; -#X connect 3 0 0 0; -#X restore 166 14 pd load_shader; -#N canvas 50 82 450 300 init_shader 0; -#X obj 89 154 outlet; -#X obj 89 45 inlet; -#X obj 89 73 change; -#X obj 89 100 t b; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 0 0; -#X restore 153 386 pd init_shader; -#X obj 101 454 loadbang; -#X text 347 301 <- 2; -#X msg 103 405 open texture.jpg; -#X obj 74 571 rotateXYZ -90 0 0; -#X msg 292 277 0.1; -#X obj 74 428 pix_image img3.jpg; -#X text 69 627 this shader create a dirty pseudo random value \, and -move all vertices separately; +#X floatatom 203 160 5 0 0 0 - - - 0; +#X msg 203 181 K \$1; +#X obj 74 394 sphere 2 30; +#X text 258 159 <- 2; +#X msg 103 255 open texture.jpg; +#X obj 74 371 rotateXYZ -90 0 0; +#X msg 203 135 0.1; +#X obj 74 278 pix_image ../data/img3.jpg; +#X text 69 427 this shader create a dirty pseudo random value \, and move all vertices separately; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; @@ -51,8 +19,7 @@ move all vertices separately; #X connect 1 0 2 0; #X restore 389 61 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -90,51 +57,22 @@ move all vertices separately; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 359 78 pd gemwin; -#X msg 101 517 rectangle \$1; -#X obj 74 180 glsl_fragment; -#X obj 162 202 change; -#X floatatom 162 225 2 0 0 0 ID - -; -#X obj 162 244 pack 0 0; -#X msg 162 291 link \$1 \$2; -#X msg 198 100 open \$1.frag; -#X msg 166 43 symbol P_distord; -#X obj 166 63 t s s; -#X msg 88 100 open \$1.vert; -#X text 423 651 ch 2007; +#X text 423 451 ch 2007; #X obj 389 43 declare -lib Gem; -#X connect 0 0 9 0; -#X connect 1 0 7 0; -#X connect 2 0 22 0; -#X connect 2 1 16 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 30 1; -#X connect 7 0 27 0; -#X connect 7 1 3 0; -#X connect 8 0 20 0; -#X connect 9 0 7 0; -#X connect 10 0 26 0; -#X connect 11 0 13 0; -#X connect 12 0 10 0; -#X connect 13 0 2 0; -#X connect 15 0 33 0; -#X connect 16 0 21 0; -#X connect 17 0 12 0; -#X connect 19 0 22 0; -#X connect 20 0 14 0; -#X connect 21 0 11 0; -#X connect 22 0 8 0; -#X connect 24 0 25 0; -#X connect 26 0 8 0; -#X connect 27 0 2 0; -#X connect 27 1 28 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 30 0 31 0; -#X connect 31 0 2 0; -#X connect 31 0 6 0; -#X connect 32 0 27 0; -#X connect 33 0 34 0; -#X connect 34 0 35 0; -#X connect 34 1 32 0; -#X connect 35 0 7 0; +#X msg 84 178 print; +#X obj 74 311 pix_texture \; rectangle 0; +#X obj 203 110 loadbang; +#X obj 74 201 glsl shader/P_distord; +#X connect 0 0 1 0; +#X connect 1 0 18 0; +#X connect 2 0 3 0; +#X connect 3 0 18 1; +#X connect 6 0 9 0; +#X connect 7 0 4 0; +#X connect 8 0 2 0; +#X connect 9 0 16 0; +#X connect 11 0 12 0; +#X connect 15 0 18 0; +#X connect 16 0 7 0; +#X connect 17 0 8 0; +#X connect 18 0 9 0; diff --git a/examples/10.glsl/03.texture_distortion.pd b/examples/10.glsl/03.texture_distortion.pd index 33e3c6422..09948b303 100644 --- a/examples/10.glsl/03.texture_distortion.pd +++ b/examples/10.glsl/03.texture_distortion.pd @@ -1,61 +1,17 @@ -#N canvas 10 61 552 667 10; +#N canvas 495 82 552 547 10; #X declare -lib Gem; -#X text 381 660 ch 20007; -#X obj 74 -1 gemhead; -#X msg 29 80 print; -#X obj 74 382 glsl_program; -#X obj 147 281 pack 0 0; -#X msg 31 162 print; -#X obj 168 261 t b f; -#X obj 168 216 change; -#X obj 146 121 change; -#X msg 147 304 link \$1 \$2; -#X msg 98 353 print; -#X floatatom 168 242 2 0 0 0 ID - -; -#X floatatom 146 144 2 0 0 0 ID - -; -#X obj 165 325 print linking; -#X obj 74 196 glsl_fragment; -#X obj 74 102 glsl_vertex; -#X obj 74 571 pix_texture; -#X obj 124 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 74 24 alpha; -#X obj 124 522 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X floatatom 361 352 5 0 0 0 - - -; -#X floatatom 476 353 5 0 0 0 - - -; -#X msg 124 500 0; -#N canvas 0 0 450 300 load_shader 0; -#X obj 89 99 t b b; -#X msg 119 126 0; -#X obj 89 154 outlet; -#X obj 89 71 gemhead 1; -#X connect 0 0 2 0; -#X connect 0 1 1 0; -#X connect 1 0 3 0; -#X connect 3 0 0 0; -#X restore 124 38 pd load_shader; -#N canvas 0 0 450 300 init_shader 0; -#X obj 89 154 outlet; -#X obj 89 45 inlet; -#X obj 89 73 change; -#X obj 89 100 t b; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 0 0; -#X restore 155 405 pd init_shader; -#X obj 124 479 loadbang; -#X text 416 351 <- 2; -#X msg 92 431 open texture.jpg; -#X msg 361 373 K1 \$1; -#X msg 361 327 1; -#X msg 476 375 seed \$1; -#X msg 88 80 open T_distord.vert; -#X msg 85 166 open T_distord.frag; -#X obj 74 458 pix_image img3.jpg; -#X obj 74 596 rectangle 4 4; -#X text 73 627 This shader compute a dirty pseudo random number \, -and distort the texture this with value; +#X obj 74 189 gemhead; +#X obj 74 214 alpha; +#X floatatom 203 170 5 0 0 0 - - - 0; +#X floatatom 318 171 5 0 0 0 - - - 0; +#X text 258 169 <- 2; +#X msg 92 331 open texture.jpg; +#X msg 203 191 K1 \$1; +#X msg 203 145 1; +#X msg 318 193 seed \$1; +#X obj 74 358 pix_image ../data/img3.jpg; +#X obj 74 446 rectangle 4 4; +#X text 73 487 This shader compute a dirty pseudo random number \, and distort the texture this with value; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; @@ -64,8 +20,7 @@ and distort the texture this with value; #X connect 1 0 2 0; #X restore 384 41 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -103,44 +58,21 @@ and distort the texture this with value; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 354 58 pd gemwin; -#X msg 124 542 rectangle \$1; #X obj 384 23 declare -lib Gem; -#X connect 1 0 18 0; -#X connect 2 0 15 0; -#X connect 3 0 33 0; -#X connect 3 1 24 0; -#X connect 4 0 9 0; -#X connect 5 0 14 0; -#X connect 6 0 4 0; -#X connect 6 1 4 1; -#X connect 7 0 11 0; -#X connect 8 0 12 0; -#X connect 9 0 3 0; -#X connect 9 0 13 0; -#X connect 10 0 3 0; -#X connect 11 0 6 0; -#X connect 12 0 4 0; -#X connect 14 0 3 0; -#X connect 14 1 7 0; -#X connect 15 0 14 0; -#X connect 15 1 8 0; -#X connect 16 0 34 0; -#X connect 17 0 31 0; -#X connect 17 0 32 0; -#X connect 18 0 15 0; -#X connect 19 0 38 0; -#X connect 20 0 28 0; -#X connect 21 0 30 0; -#X connect 22 0 19 0; -#X connect 23 0 17 0; -#X connect 24 0 29 0; -#X connect 25 0 22 0; -#X connect 27 0 33 0; -#X connect 28 0 3 0; -#X connect 29 0 20 0; -#X connect 30 0 3 0; -#X connect 31 0 15 0; -#X connect 32 0 14 0; -#X connect 33 0 16 0; -#X connect 36 0 37 0; -#X connect 38 0 16 0; +#X obj 74 257 glsl shader/T_distord; +#X obj 203 119 loadbang; +#X obj 74 391 pix_texture \; rectangle 0; +#X text 431 480 ch 2007; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 6 0; +#X connect 3 0 8 0; +#X connect 5 0 9 0; +#X connect 6 0 15 1; +#X connect 7 0 2 0; +#X connect 8 0 15 1; +#X connect 9 0 17 0; +#X connect 12 0 13 0; +#X connect 15 0 9 0; +#X connect 16 0 7 0; +#X connect 17 0 10 0; diff --git a/examples/10.glsl/04.game_of_life.pd b/examples/10.glsl/04.game_of_life.pd index 1aced3e96..dc6f62fcf 100644 --- a/examples/10.glsl/04.game_of_life.pd +++ b/examples/10.glsl/04.game_of_life.pd @@ -1,50 +1,25 @@ -#N canvas 10 61 599 681 10; +#N canvas 713 71 599 512 10; #X declare -lib Gem; -#X obj 316 488 pix_snap2tex; -#X msg 356 461 0 0; -#X msg 402 460 500 500; -#X obj 356 438 t b b; -#X obj 316 513 alpha; -#X obj 316 563 square 4; +#X obj 316 323 alpha; +#X obj 316 373 square 4; #X msg 52 75 frame \$1; -#X floatatom 52 57 5 0 0 0 - - -; -#X obj 356 419 loadbang; -#X msg 271 95 print; -#X obj 316 370 glsl_program; -#X obj 389 296 pack 0 0; -#X msg 273 177 print; -#X obj 410 276 t b f; -#X obj 410 231 change; -#X obj 388 136 change; -#X msg 389 321 link \$1 \$2; -#X msg 272 333 print; -#X floatatom 410 257 2 0 0 0 ID - -; -#X floatatom 388 159 2 0 0 0 ID - -; -#X obj 407 342 print linking; -#X obj 316 211 glsl_fragment; -#X obj 316 117 glsl_vertex; -#X obj 338 68 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X floatatom 52 57 5 0 0 0 - - - 0; +#X msg 328 84 print; #X obj 316 37 gemhead -1; -#X obj 316 537 colorRGB 1 1 1 1; -#X msg 330 95 open game.vert; -#X msg 327 181 open game.frag; -#X obj 39 259 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 316 347 colorRGB 1 1 1 1; +#X obj 39 259 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 39 281 gemhead 50; #X obj 39 311 translateXYZ 0 0 1; #X obj 39 409 rectangle; #X obj 39 216 loadbang; #X msg 39 237 0; #X text 157 261 <- 3; -#X text 375 69 <- 2 : load shader; -#X obj 316 392 t b a; -#X floatatom 69 362 5 0 0 0 - - -; -#X floatatom 124 363 5 0 0 0 - - -; +#X obj 316 202 t b a; +#X floatatom 69 362 5 0 0 0 - - - 0; +#X floatatom 124 363 5 0 0 0 - - - 0; #X obj 69 381 / 100; #X obj 124 384 / 100; -#X text 13 634 This is an example of iterative process : the output -of the shader is used for next frame input; +#X text 13 454 This is an example of iterative process : the output of the shader is used for next frame input; #X text 145 140 <----- 1; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; @@ -54,8 +29,7 @@ of the shader is used for next frame input; #X connect 1 0 2 0; #X restore 82 100 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -94,47 +68,25 @@ of the shader is used for next frame input; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 52 117 pd gemwin; #X obj 484 13 declare -lib Gem; -#X connect 0 0 4 0; -#X connect 1 0 0 1; -#X connect 2 0 0 2; -#X connect 3 0 1 0; -#X connect 3 1 2 0; -#X connect 4 0 25 0; -#X connect 6 0 44 0; -#X connect 7 0 6 0; -#X connect 8 0 3 0; -#X connect 9 0 22 0; -#X connect 10 0 36 0; -#X connect 11 0 16 0; -#X connect 12 0 21 0; -#X connect 13 0 11 0; -#X connect 13 1 11 1; -#X connect 14 0 18 0; -#X connect 15 0 19 0; -#X connect 16 0 10 0; -#X connect 16 0 20 0; -#X connect 17 0 10 0; -#X connect 18 0 13 0; -#X connect 19 0 11 0; -#X connect 21 0 10 0; -#X connect 21 1 14 0; -#X connect 22 0 21 0; -#X connect 22 1 15 0; -#X connect 23 0 26 0; -#X connect 23 0 27 0; -#X connect 24 0 22 0; -#X connect 25 0 5 0; -#X connect 26 0 22 0; -#X connect 27 0 21 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 30 0 31 0; -#X connect 32 0 33 0; -#X connect 33 0 28 0; -#X connect 36 0 0 0; -#X connect 36 1 0 0; -#X connect 37 0 39 0; -#X connect 38 0 40 0; -#X connect 39 0 31 1; -#X connect 40 0 31 2; -#X connect 43 0 44 0; +#X obj 316 106 glsl shader/game; +#X obj 316 298 pix_snap2tex 500 500; +#X connect 0 0 6 0; +#X connect 2 0 22 0; +#X connect 3 0 2 0; +#X connect 4 0 24 0; +#X connect 5 0 24 0; +#X connect 6 0 1 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 11 0 12 0; +#X connect 12 0 7 0; +#X connect 14 0 25 0; +#X connect 14 1 25 0; +#X connect 15 0 17 0; +#X connect 16 0 18 0; +#X connect 17 0 10 1; +#X connect 18 0 10 2; +#X connect 21 0 22 0; +#X connect 24 0 14 0; +#X connect 25 0 0 0; diff --git a/examples/10.glsl/04.game_of_life_bis.pd b/examples/10.glsl/04.game_of_life_bis.pd new file mode 100644 index 000000000..42b089725 --- /dev/null +++ b/examples/10.glsl/04.game_of_life_bis.pd @@ -0,0 +1,107 @@ +#N canvas 597 250 1243 650 10; +#X declare -lib Gem; +#X obj 438 310 alpha; +#X obj 438 360 square 4; +#X msg 450 214 print; +#X obj 438 334 colorRGB 1 1 1 1; +#X obj 411 489 rectangle; +#X floatatom 441 442 5 0 0 0 - - - 0; +#X floatatom 496 443 5 0 0 0 - - - 0; +#X obj 441 461 / 100; +#X obj 496 464 / 100; +#X text 142 91 <----- 1; +#N canvas 87 154 247 179 Gem.init 0; +#X obj 118 46 loadbang; +#X msg 118 81 reset; +#X obj 118 113 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 49 42 pd Gem.init; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 49 68 pd gemwin; +#X obj 47 8 declare -lib Gem; +#X obj 438 236 glsl shader/game; +#X obj 411 70 gemframebuffer \; dimen 500 500 \; rectangle 0; +#X obj 438 186 translateXYZ 0 0 -4; +#X obj 411 42 gemhead 10; +#X obj 411 414 spigot 0; +#X obj 456 389 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 736 266 square 4; +#X obj 736 127 gemframebuffer \; dimen 500 500 \; rectangle 0; +#X obj 736 185 translateXYZ 0 0 -4; +#X obj 736 96 gemhead 20; +#X obj 438 272 pix_texture \; rectangle 0; +#X obj 736 218 pix_texture \; rectangle 0; +#X obj 882 481 square 4; +#X obj 882 433 pix_texture \; rectangle 0; +#X obj 882 311 gemhead 30; +#X text 43 129 This is the same as previous example \, but it uses a framebuffer to avoid the slow snap2text object, f 50; +#X text 45 178 Rendering is made in a framebuffer that is used as texture to render in an other framebuffer \, that is used as a texture for next frame (it is not possible to use the rendering framebuffer as a texture to the render because it is cleared before the rendering), f 52; +#X obj 411 120 t a a; +#X text 483 390 <- render any primitive to initialize the process; +#X text 816 96 feedback; +#X text 958 310 rendering in the Gem window; +#X text 462 124 The trigger allows us to detach the texture for the 2nd part of the rendering, f 39; +#X connect 0 0 3 0; +#X connect 2 0 13 0; +#X connect 3 0 1 0; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 4 1; +#X connect 8 0 4 2; +#X connect 10 0 11 0; +#X connect 13 0 23 0; +#X connect 14 0 30 0; +#X connect 14 1 24 1; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 17 0 4 0; +#X connect 18 0 17 1; +#X connect 20 0 21 0; +#X connect 20 1 23 1; +#X connect 20 1 26 1; +#X connect 21 0 24 0; +#X connect 22 0 20 0; +#X connect 23 0 0 0; +#X connect 24 0 19 0; +#X connect 26 0 25 0; +#X connect 27 0 26 0; +#X connect 30 0 17 0; +#X connect 30 1 15 0; diff --git a/examples/10.glsl/05.multitexture.pd b/examples/10.glsl/05.multitexture.pd index c329a7de2..61b25cfa4 100644 --- a/examples/10.glsl/05.multitexture.pd +++ b/examples/10.glsl/05.multitexture.pd @@ -1,88 +1,33 @@ -#N canvas 10 61 930 667 10; +#N canvas 562 91 926 563 10; #X declare -lib Gem; #X obj 76 5 gemhead; -#X obj 75 429 glsl_program; -#X obj 149 268 pack 0 0; -#X obj 170 248 t b f; -#X obj 164 203 change; -#X msg 149 294 link \$1 \$2; -#X floatatom 170 229 2 0 0 0 ID - -; -#X floatatom 148 121 2 0 0 0 ID - -; -#X obj 167 315 print linking; #X msg 365 23 color 1 0 0; -#X obj 142 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 76 79 glsl_vertex; -#X obj 76 183 glsl_fragment; -#X obj 463 464 pix_texture; #X obj 546 271 openpanel; -#X obj 546 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X msg 90 57 open multitexture.vert; -#X msg 86 153 open multitexture.frag; +#X obj 546 248 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 463 230 gemhead 11; -#X obj 463 204 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 463 204 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 463 90 1) turn on rendering; -#X msg 503 432 texunit 1; -#X obj 687 467 pix_texture; #X obj 768 271 openpanel; -#X obj 768 250 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 687 204 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X msg 725 430 texunit 0; -#X obj 462 488 translateXYZ -2 0 0; -#X obj 685 490 translateXYZ 2 0 0; -#X msg 187 406 MyTex 0; -#X obj 75 644 pix_texture; -#X obj 218 498 openpanel; -#X obj 218 477 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X msg 254 381 MyTex1 1; -#X msg 255 406 MyTex 1; -#X msg 186 381 MyTex1 0; -#X msg 321 382 MyTex1 2; -#X msg 326 407 MyTex 2; -#N canvas 0 0 450 300 load_shader 0; -#X obj 89 99 t b b; -#X msg 119 126 0; -#X obj 89 154 outlet; -#X obj 89 71 gemhead 1; -#X connect 0 0 2 0; -#X connect 0 1 1 0; -#X connect 1 0 3 0; -#X connect 3 0 0 0; -#X restore 142 5 pd load_shader; -#N canvas 0 0 450 300 init_shader 0; -#X obj 89 154 outlet; -#X obj 89 45 inlet; -#X obj 89 73 change; -#X obj 89 100 t b; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 0 0; -#X restore 156 450 pd init_shader; +#X obj 768 250 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 687 204 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 463 488 translateXYZ -2 0 0; +#X obj 687 490 translateXYZ 2 0 0; +#X obj 219 298 openpanel; +#X obj 219 277 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X msg 546 296 set open \$1 \, bang; -#X obj 491 387 loadbang; -#X msg 218 519 set open \$1 \, bang; +#X msg 219 319 set open \$1 \, bang; #X msg 768 294 set open \$1 \, bang; #X obj 482 295 loadbang; -#X obj 153 519 loadbang; +#X obj 154 319 loadbang; #X obj 704 294 loadbang; -#X obj 220 569 loadbang; -#X obj 716 388 loadbang; #X obj 687 229 gemhead 22; -#X text 187 360 2) change shader texunit; -#X msg 482 320 open img2.jpg; -#X obj 463 349 pix_image img2.jpg; -#X obj 687 346 pix_image img3.jpg; -#X msg 704 318 open img3.jpg; -#X msg 153 544 open img1.jpg; -#X obj 75 613 pix_image img1.jpg; -#X obj 148 98 change; -#X text 343 147 This is an example of multitexturing \, this shader -mixes 2 textures; +#X msg 482 320 open ../data/img2.jpg; +#X obj 463 349 pix_image ../data/img2.jpg; +#X obj 687 346 pix_image ../data/img3.jpg; +#X msg 704 318 open ../data/img3.jpg; +#X msg 154 344 open ../data/img1.jpg; +#X obj 76 373 pix_image ../data/img1.jpg; +#X text 343 147 This is an example of multitexturing \, this shader mixes 2 textures; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; @@ -91,8 +36,7 @@ mixes 2 textures; #X connect 1 0 2 0; #X restore 395 47 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -130,74 +74,64 @@ mixes 2 textures; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 365 64 pd gemwin; -#X obj 75 670 rectangle 3 3; -#X obj 462 514 square 2; -#X obj 685 516 square 2; -#X msg 220 591 texunit 2 \, rectangle 0; -#X msg 491 409 texunit 0 \, rectangle 0; -#X msg 716 409 texunit 1 \, rectangle 0; +#X obj 76 470 rectangle 3 3; +#X obj 463 514 square 2; +#X obj 687 516 square 2; #X obj 793 7 declare -lib Gem; -#X connect 0 0 11 0; -#X connect 1 0 56 0; -#X connect 1 1 39 0; -#X connect 2 0 5 0; +#X obj 463 424 pix_texture \; rectangle 0 \; texunit 0; +#X obj 687 427 pix_texture \; rectangle 0 \; texunit 1; +#X msg 473 402 texunit \$1; +#X obj 473 379 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 698 403 texunit \$1; +#X obj 698 380 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 76 414 pix_texture \; rectangle 0 \; texunit 2; +#X obj 76 179 glsl shader/multitexture \; MyTex 0 \; MyTex1 1; +#X msg 143 82 0; +#X msg 143 105 1; +#X msg 143 128 2; +#X msg 133 151 MyTex \$1; +#X msg 203 82 0; +#X msg 203 105 1; +#X msg 203 128 2; +#X msg 193 151 MyTex1 \$1; +#X connect 0 0 41 0; +#X connect 1 0 29 0; +#X connect 2 0 14 0; #X connect 3 0 2 0; -#X connect 3 1 2 1; -#X connect 4 0 6 0; -#X connect 5 0 1 0; -#X connect 5 0 8 0; -#X connect 6 0 3 0; -#X connect 7 0 2 0; -#X connect 9 0 60 0; -#X connect 10 0 16 0; -#X connect 10 0 17 0; -#X connect 11 0 12 0; -#X connect 11 1 57 0; -#X connect 12 0 1 0; -#X connect 12 1 4 0; -#X connect 13 0 27 0; -#X connect 14 0 40 0; -#X connect 15 0 14 0; -#X connect 16 0 11 0; -#X connect 17 0 12 0; -#X connect 18 0 52 0; -#X connect 19 0 18 0; -#X connect 21 0 13 0; -#X connect 22 0 28 0; -#X connect 23 0 43 0; +#X connect 4 0 22 0; +#X connect 5 0 4 0; +#X connect 7 0 16 0; +#X connect 8 0 7 0; +#X connect 9 0 20 0; +#X connect 12 0 15 0; +#X connect 13 0 12 0; +#X connect 14 0 21 0; +#X connect 15 0 25 0; +#X connect 16 0 24 0; +#X connect 17 0 21 0; +#X connect 18 0 25 0; +#X connect 19 0 24 0; +#X connect 20 0 23 0; +#X connect 21 0 22 0; +#X connect 22 0 34 0; +#X connect 23 0 35 0; #X connect 24 0 23 0; -#X connect 25 0 49 0; -#X connect 26 0 22 0; -#X connect 29 0 1 0; -#X connect 30 0 61 0; -#X connect 31 0 42 0; -#X connect 32 0 31 0; -#X connect 33 0 1 0; -#X connect 34 0 1 0; -#X connect 35 0 1 0; -#X connect 36 0 1 0; -#X connect 37 0 1 0; -#X connect 38 0 10 0; -#X connect 39 0 33 0; -#X connect 39 0 29 0; -#X connect 40 0 51 0; -#X connect 41 0 65 0; -#X connect 42 0 55 0; -#X connect 43 0 54 0; -#X connect 44 0 51 0; -#X connect 45 0 55 0; -#X connect 46 0 54 0; -#X connect 47 0 64 0; -#X connect 48 0 66 0; -#X connect 49 0 53 0; -#X connect 51 0 52 0; -#X connect 52 0 13 0; -#X connect 53 0 22 0; -#X connect 54 0 53 0; -#X connect 55 0 56 0; -#X connect 56 0 30 0; -#X connect 57 0 7 0; -#X connect 59 0 60 0; -#X connect 64 0 30 0; -#X connect 65 0 13 0; -#X connect 66 0 22 0; +#X connect 25 0 26 0; +#X connect 26 0 40 0; +#X connect 28 0 29 0; +#X connect 34 0 10 0; +#X connect 35 0 11 0; +#X connect 36 0 34 0; +#X connect 37 0 36 0; +#X connect 38 0 35 0; +#X connect 39 0 38 0; +#X connect 40 0 30 0; +#X connect 41 0 26 0; +#X connect 42 0 45 0; +#X connect 43 0 45 0; +#X connect 44 0 45 0; +#X connect 45 0 41 1; +#X connect 46 0 49 0; +#X connect 47 0 49 0; +#X connect 48 0 49 0; +#X connect 49 0 41 1; diff --git a/examples/10.glsl/05.multitexture_basic.pd b/examples/10.glsl/05.multitexture_basic.pd new file mode 100644 index 000000000..9e8ec67e3 --- /dev/null +++ b/examples/10.glsl/05.multitexture_basic.pd @@ -0,0 +1,89 @@ +#N canvas 507 4 716 614 10; +#X declare -lib Gem; +#X obj 76 5 gemhead; +#X msg 365 63 color 1 0 0; +#X obj 159 195 openpanel; +#X obj 137 197 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X text 463 130 1) turn on rendering; +#X msg 159 220 set open \$1 \, bang; +#X obj 95 219 loadbang; +#X msg 95 244 open ../data/img2.jpg; +#X obj 76 273 pix_image ../data/img2.jpg; +#X text 343 187 This is an example of multitexturing \, this shader mixes 2 textures; +#N canvas 87 154 247 179 Gem.init 0; +#X obj 118 46 loadbang; +#X msg 118 81 reset; +#X obj 118 113 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 395 87 pd Gem.init; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 365 104 pd gemwin; +#X obj 76 568 rectangle 3 3; +#X obj 159 406 openpanel; +#X obj 139 407 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X msg 159 431 set open \$1 \, bang; +#X obj 95 430 loadbang; +#X msg 95 455 open ../data/img1.jpg; +#X obj 76 484 pix_image ../data/img1.jpg; +#X obj 365 21 declare -lib Gem; +#X obj 76 513 pix_texture \; rectangle 0 \; texunit 1; +#X obj 76 344 pix_texture \; rectangle 0 \; texunit 0; +#X obj 76 104 glsl shader/multitexture \; MyTex 0 \; MyTex1 1; +#X msg 33 115 print; +#X connect 0 0 22 0; +#X connect 1 0 11 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 5 0 7 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 21 0; +#X connect 10 0 11 0; +#X connect 13 0 15 0; +#X connect 14 0 13 0; +#X connect 15 0 17 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 20 0; +#X connect 20 0 12 0; +#X connect 21 0 18 0; +#X connect 22 0 8 0; +#X connect 23 0 22 0; diff --git a/examples/10.glsl/05.multitexture_bis.pd b/examples/10.glsl/05.multitexture_bis.pd index 2ec6887d6..e362856cc 100644 --- a/examples/10.glsl/05.multitexture_bis.pd +++ b/examples/10.glsl/05.multitexture_bis.pd @@ -1,73 +1,26 @@ -#N canvas 207 200 1100 637 10; +#N canvas 619 198 1100 637 10; #X declare -lib Gem; -#X obj 76 5 gemhead; -#X obj 75 429 glsl_program; -#X obj 149 268 pack 0 0; -#X obj 170 248 t b f; -#X obj 164 203 change; -#X msg 149 294 link \$1 \$2; -#X floatatom 170 229 2 0 0 0 ID - -; -#X floatatom 148 121 2 0 0 0 ID - -; -#X obj 167 315 print linking; +#X obj 75 275 gemhead; #X msg 365 23 color 1 0 0; -#X obj 142 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 76 79 glsl_vertex; -#X obj 76 183 glsl_fragment; #X obj 749 262 openpanel; -#X obj 749 239 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X msg 90 57 open multitexture.vert; -#X msg 86 153 open multitexture.frag; +#X obj 749 239 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 666 221 gemhead 11; -#X obj 666 195 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 666 195 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 463 90 1) turn on rendering; #X obj 971 262 openpanel; -#X obj 971 241 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 890 195 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X msg 187 406 MyTex 0; -#X msg 254 381 MyTex1 1; -#X msg 255 406 MyTex 1; -#X msg 186 381 MyTex1 0; -#X msg 321 382 MyTex1 2; -#X msg 326 407 MyTex 2; -#N canvas 0 0 450 300 load_shader 0; -#X obj 89 99 t b b; -#X msg 119 126 0; -#X obj 89 154 outlet; -#X obj 89 71 gemhead 1; -#X connect 0 0 2 0; -#X connect 0 1 1 0; -#X connect 1 0 3 0; -#X connect 3 0 0 0; -#X restore 142 5 pd load_shader; -#N canvas 0 0 450 300 init_shader 0; -#X obj 89 154 outlet; -#X obj 89 45 inlet; -#X obj 89 73 change; -#X obj 89 100 t b; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 0 0; -#X restore 156 450 pd init_shader; +#X obj 971 241 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 890 195 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 749 287 set open \$1 \, bang; -#X obj 694 378 loadbang; #X msg 971 285 set open \$1 \, bang; #X obj 685 286 loadbang; #X obj 907 285 loadbang; -#X obj 919 379 loadbang; #X obj 890 220 gemhead 22; -#X text 187 360 2) change shader texunit; -#X msg 685 311 open img2.jpg; -#X obj 666 340 pix_image img2.jpg; -#X obj 890 337 pix_image img3.jpg; -#X msg 907 309 open img3.jpg; -#X obj 148 98 change; -#X text 343 147 This is an example of multitexturing \, this shader -mixes 2 textures; +#X text 115 300 2) change shader texunit; +#X msg 685 311 open ../data/img2.jpg; +#X obj 666 340 pix_image ../data/img2.jpg; +#X obj 890 337 pix_image ../data/img3.jpg; +#X msg 907 309 open ../data/img3.jpg; +#X text 343 147 This is an example of multitexturing \, this shader mixes 2 textures; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; @@ -76,8 +29,7 @@ mixes 2 textures; #X connect 1 0 2 0; #X restore 395 47 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -117,86 +69,64 @@ mixes 2 textures; #X restore 365 64 pd gemwin; #X obj 75 550 rectangle 3 3; #X obj 75 520 pix_multitexture 3; -#X obj 666 425 pix_texture; -#X obj 890 428 pix_texture; -#X msg 694 400 rectangle 0; -#X msg 919 400 rectangle 0; #X obj 526 264 openpanel; -#X obj 526 241 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 526 241 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 443 223 gemhead 11; -#X obj 443 197 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 443 197 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 526 289 set open \$1 \, bang; -#X obj 471 380 loadbang; #X obj 462 288 loadbang; -#X obj 443 427 pix_texture; -#X msg 471 402 rectangle 0; -#X msg 462 313 open img1.jpg; -#X obj 443 342 pix_image img1.jpg; +#X msg 462 313 open ../data/img1.jpg; +#X obj 443 342 pix_image ../data/img1.jpg; #X obj 983 7 declare -lib Gem; -#X connect 0 0 11 0; -#X connect 1 0 48 0; -#X connect 1 1 30 0; -#X connect 2 0 5 0; +#X obj 443 427 pix_texture \; rectangle 0; +#X obj 666 425 pix_texture \; rectangle 0; +#X obj 890 428 pix_texture \; rectangle 0; +#X msg 113 389 MyTex \$1; +#X msg 123 328 0; +#X msg 123 348 1; +#X msg 123 368 2; +#X msg 232 340 0; +#X msg 232 360 1; +#X msg 232 380 2; +#X msg 222 401 MyTex1 \$1; +#X obj 75 429 glsl shader/multitexture \; MyTex 0 \; MyTex1 1; +#X connect 0 0 45 0; +#X connect 1 0 22 0; +#X connect 2 0 10 0; #X connect 3 0 2 0; -#X connect 3 1 2 1; -#X connect 4 0 6 0; -#X connect 5 0 1 0; -#X connect 5 0 8 0; -#X connect 6 0 3 0; -#X connect 7 0 2 0; -#X connect 9 0 46 0; -#X connect 10 0 15 0; +#X connect 4 0 17 0; +#X connect 5 0 4 0; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 14 0; #X connect 10 0 16 0; -#X connect 11 0 12 0; -#X connect 11 1 43 0; -#X connect 12 0 1 0; -#X connect 12 1 4 0; -#X connect 13 0 31 0; -#X connect 14 0 13 0; -#X connect 15 0 11 0; -#X connect 16 0 12 0; -#X connect 17 0 40 0; -#X connect 18 0 17 0; -#X connect 20 0 33 0; -#X connect 21 0 20 0; -#X connect 22 0 37 0; -#X connect 23 0 1 0; -#X connect 24 0 1 0; -#X connect 25 0 1 0; -#X connect 26 0 1 0; -#X connect 27 0 1 0; -#X connect 28 0 1 0; -#X connect 29 0 10 0; -#X connect 30 0 24 0; -#X connect 30 0 23 0; -#X connect 31 0 39 0; -#X connect 32 0 51 0; -#X connect 33 0 42 0; -#X connect 34 0 39 0; -#X connect 35 0 42 0; -#X connect 36 0 52 0; -#X connect 37 0 41 0; -#X connect 39 0 40 0; -#X connect 40 0 49 0; -#X connect 41 0 50 0; -#X connect 42 0 41 0; -#X connect 43 0 7 0; -#X connect 45 0 46 0; -#X connect 48 0 47 0; -#X connect 49 1 48 2; -#X connect 50 1 48 3; -#X connect 51 0 49 0; -#X connect 52 0 50 0; -#X connect 53 0 57 0; -#X connect 54 0 53 0; -#X connect 55 0 63 0; -#X connect 56 0 55 0; -#X connect 57 0 62 0; -#X connect 58 0 61 0; -#X connect 59 0 62 0; -#X connect 60 1 48 1; -#X connect 61 0 60 0; -#X connect 62 0 63 0; -#X connect 63 0 60 0; +#X connect 11 0 19 0; +#X connect 12 0 16 0; +#X connect 13 0 19 0; +#X connect 14 0 18 0; +#X connect 16 0 17 0; +#X connect 17 0 35 0; +#X connect 18 0 36 0; +#X connect 19 0 18 0; +#X connect 21 0 22 0; +#X connect 24 0 23 0; +#X connect 25 0 29 0; +#X connect 26 0 25 0; +#X connect 27 0 32 0; +#X connect 28 0 27 0; +#X connect 29 0 31 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 34 0; +#X connect 34 1 24 1; +#X connect 35 1 24 2; +#X connect 36 1 24 3; +#X connect 37 0 45 1; +#X connect 38 0 37 0; +#X connect 39 0 37 0; +#X connect 40 0 37 0; +#X connect 41 0 44 0; +#X connect 42 0 44 0; +#X connect 43 0 44 0; +#X connect 44 0 45 1; +#X connect 45 0 24 0; diff --git a/examples/10.glsl/06.rectangle_multitexture.pd b/examples/10.glsl/06.rectangle_multitexture.pd index ce2c58b63..054f53a62 100644 --- a/examples/10.glsl/06.rectangle_multitexture.pd +++ b/examples/10.glsl/06.rectangle_multitexture.pd @@ -1,23 +1,14 @@ -#N canvas 511 97 648 675 10; +#N canvas 953 0 648 785 10; #X declare -lib Gem; -#X obj 279 76 gemhead; -#X obj 295 208 loadbang; -#X obj 279 251 pix_texture; -#X msg 295 231 rectangle 1 \, texunit 1; -#X obj 334 97 openpanel; -#X msg 334 118 open \$1; -#X obj 334 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -257985 -1 --1; -#X obj 459 76 gemhead; -#X obj 475 208 loadbang; -#X obj 459 251 pix_texture; -#X obj 514 97 openpanel; -#X msg 514 118 open \$1; -#X obj 514 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -257985 -1 --1; -#X msg 475 231 rectangle 1 \, texunit 2; -#X obj 279 275 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 163 518 gemhead; +#X obj 218 539 openpanel; +#X msg 218 560 open \$1; +#X obj 218 518 bng 15 250 50 0 empty empty empty 17 7 0 10 #f8fc00 #000000 #000000; +#X obj 343 518 gemhead; +#X obj 398 539 openpanel; +#X msg 398 560 open \$1; +#X obj 398 518 bng 15 250 50 0 empty empty empty 17 7 0 10 #f8fc00 #000000 #000000; +#X obj 383 79 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #N canvas 0 0 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; @@ -36,39 +27,14 @@ #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; -#X restore 284 314 pd gemwin; -#X msg 284 295 create; -#X text 280 274 Create window:; -#X obj 101 358 cnv 15 100 120 empty empty empty 20 12 0 14 -4034 -66577 -0; -#X obj 37 538 glsl_program; -#X obj 100 259 pack 0 0; -#X obj 118 236 t b f; -#X obj 118 194 change; -#X msg 100 285 link \$1 \$2; -#X floatatom 118 217 2 0 0 0 ID - -; -#X floatatom 100 133 2 0 0 0 ID - -; -#X obj 105 309 print linking; -#X obj 124 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 37 88 glsl_vertex; -#X obj 37 174 glsl_fragment; -#N canvas 0 0 450 300 load_shader 0; -#X msg 116 126 0; -#X obj 89 154 outlet; -#X obj 89 71 gemhead 1; -#X obj 89 100 t b b; -#X connect 0 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 3 1 0 0; -#X restore 124 21 pd load_shader; -#X obj 100 110 change; -#X obj 106 581 loadbang; -#X obj 37 21 gemhead 51; -#X msg 109 371 add; -#X msg 109 431 multiply; -#X msg 109 451 mix; +#X restore 388 118 pd gemwin; +#X msg 388 99 create; +#X text 384 78 Create window:; +#X obj 107 147 cnv 15 120 120 empty empty empty 20 12 0 14 #00fc04 #404040 0; +#X obj 37 381 gemhead 51; +#X msg 119 160 add; +#X msg 119 220 multiply; +#X msg 119 240 mix; #N canvas 0 0 450 300 route 0; #X obj 113 53 inlet; #X msg 113 95 0; @@ -89,113 +55,60 @@ #X connect 7 2 3 0; #X connect 7 3 4 0; #X connect 7 4 6 0; -#X restore 72 486 pd route; -#X msg 184 540 Ttex1 1; -#X msg 240 540 Ttex2 2; -#X msg 72 507 style \$1; -#X obj 109 337 loadbang; -#X obj 37 625 pix_texture; -#X msg 106 603 rectangle 1 \, texunit 0; -#X obj 37 598 pix_set; -#X obj 142 457 hsl 50 10 0 1 0 0 empty empty MIX_FACTOR -2 -4 0 7 -262144 --1 -1 0 1; -#X msg 51 66 open GLSL_mix.vert; -#X msg 51 151 open GLSL_mix.frag; -#X msg 109 411 diff; -#X text 383 295 <- 1 : create GEM window; -#X text 248 375 add : add two texture together (it is easy to get a -white out); -#X msg 109 391 subtract; -#X text 277 16 This shader program give you the possibility to mix -two sources of different size. You can add \, subtract \, diff \, multiply -and mix the two sources.; -#X text 248 401 subtract : subtract two texture together (it is easy -to get a black out); -#X text 248 427 diff : subtract two texture together (get absolute -value); -#X text 248 441 multiply : multiply two texture together; -#X text 248 455 mix : mix two texture together (use the mix factor -for crossfading); -#N canvas 242 260 450 300 onebang 0; -#X obj 120 71 inlet; -#X obj 120 151 outlet; -#X obj 120 120 t b; -#X obj 120 100 change; -#X msg 161 71 set -1; -#X obj 161 11 gemhead; -#X obj 161 51 route 0; -#X obj 161 31 route gem_state; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 2 0; -#X connect 4 0 3 0; -#X connect 5 0 7 0; -#X connect 6 0 4 0; -#X connect 7 0 6 0; -#X restore 106 559 pd onebang; -#X text 206 357 <- 2 : test different mix; -#X obj 459 167 pix_resize 512 512; -#X obj 279 167 pix_resize 234 543; -#X obj 279 147 pix_image img3.jpg; -#X obj 459 147 pix_image img2.jpg; -#X text 292 186 images have different sizes; -#X msg 139 507 mix_factor \$1; -#X obj 37 646 square 4; -#X obj 543 647 declare -lib Gem; -#X connect 0 0 61 0; -#X connect 1 0 3 0; -#X connect 3 0 2 0; -#X connect 4 0 5 0; -#X connect 5 0 61 0; -#X connect 6 0 4 0; -#X connect 7 0 62 0; -#X connect 8 0 13 0; -#X connect 10 0 11 0; -#X connect 11 0 62 0; -#X connect 12 0 10 0; -#X connect 13 0 9 0; -#X connect 15 0 16 0; -#X connect 16 0 15 0; -#X connect 19 0 44 0; -#X connect 19 1 57 0; -#X connect 20 0 23 0; -#X connect 21 0 20 0; -#X connect 21 1 20 1; -#X connect 22 0 24 0; -#X connect 23 0 19 0; -#X connect 23 0 26 0; -#X connect 24 0 21 0; -#X connect 25 0 20 0; -#X connect 27 0 46 0; -#X connect 27 0 47 0; -#X connect 28 0 29 0; -#X connect 28 1 31 0; -#X connect 29 0 19 0; -#X connect 29 1 22 0; -#X connect 30 0 27 0; -#X connect 31 0 25 0; -#X connect 32 0 43 0; -#X connect 33 0 28 0; -#X connect 34 0 37 0; -#X connect 35 0 37 0; -#X connect 36 0 37 0; -#X connect 37 0 40 0; -#X connect 38 0 19 0; -#X connect 39 0 19 0; -#X connect 40 0 19 0; -#X connect 41 0 34 0; -#X connect 42 0 65 0; -#X connect 43 0 42 0; -#X connect 44 0 42 0; -#X connect 45 0 64 0; -#X connect 46 0 28 0; -#X connect 47 0 29 0; -#X connect 48 0 37 0; -#X connect 51 0 37 0; -#X connect 57 0 38 0; -#X connect 57 0 39 0; -#X connect 59 0 9 0; -#X connect 60 0 2 0; -#X connect 61 0 60 0; -#X connect 62 0 59 0; -#X connect 64 0 19 0; +#X restore 82 275 pd route; +#X msg 82 296 style \$1; +#X obj 119 126 loadbang; +#X obj 37 508 pix_set; +#X obj 163 246 hsl 50 10 0 1 0 1 empty empty MIX_FACTOR -2 -4 0 7 #fcfcfc #000000 #000000 3400 1; +#X msg 119 200 diff; +#X text 487 99 <- 1 : create GEM window; +#X text 276 209 add : add two texture together (it is easy to get a white out); +#X msg 119 180 subtract; +#X text 29 24 This shader program give you the possibility to mix two sources of different size. You can add \, subtract \, diff \, multiply and mix the two sources.; +#X text 276 235 subtract : subtract two texture together (it is easy to get a black out); +#X text 276 261 diff : subtract two texture together (get absolute value); +#X text 276 275 multiply : multiply two texture together; +#X text 276 289 mix : mix two texture together (use the mix factor for crossfading); +#X text 234 191 <- 2 : test different mix; +#X obj 343 609 pix_resize 512 512; +#X obj 163 609 pix_resize 234 543; +#X obj 163 589 pix_image ../data/img3.jpg; +#X obj 343 589 pix_image ../data/img2.jpg; +#X text 176 628 images have different sizes; +#X msg 160 296 mix_factor \$1; +#X obj 37 586 square 4; +#X obj 533 6 declare -lib Gem; +#X obj 37 535 pix_texture \; rectangle 1 \; texunit 0; +#X obj 163 693 pix_texture \; rectangle 1 \; texunit 1; +#X obj 343 693 pix_texture \; rectangle 1 \; texunit 2; +#X msg 60 417 bang; +#X obj 37 452 glsl shader/GLSL_mix \; Ttex1 1 \; Ttex2 2; +#X connect 0 0 34 0; +#X connect 1 0 2 0; +#X connect 2 0 34 0; +#X connect 3 0 1 0; +#X connect 4 0 35 0; +#X connect 5 0 6 0; +#X connect 6 0 35 0; +#X connect 7 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 9 0; +#X connect 13 0 44 0; +#X connect 14 0 17 0; +#X connect 15 0 17 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 44 1; +#X connect 19 0 14 0; +#X connect 20 0 40 0; +#X connect 21 0 37 0; +#X connect 22 0 17 0; +#X connect 25 0 17 0; +#X connect 32 0 42 0; +#X connect 33 0 41 0; +#X connect 34 0 33 0; +#X connect 35 0 32 0; +#X connect 37 0 44 1; +#X connect 40 0 38 0; +#X connect 43 0 44 0; +#X connect 44 0 20 0; diff --git a/examples/10.glsl/07.framebuffer_and_shader.pd b/examples/10.glsl/07.framebuffer_and_shader.pd index 5a5fa7b69..02c1bf0fe 100644 --- a/examples/10.glsl/07.framebuffer_and_shader.pd +++ b/examples/10.glsl/07.framebuffer_and_shader.pd @@ -1,233 +1,60 @@ -#N canvas 30 77 1126 659 10; +#N canvas 686 69 1126 659 10; #X declare -lib Gem; #X obj 9 470 translateXYZ 0 0 -4; #X obj 9 234 ortho; -#X floatatom 83 538 5 0 0 0 - - -; -#X msg 83 515 \$1; -#X obj 9 365 gemframebuffer; -#X obj 9 494 pix_texture; +#X floatatom 93 518 5 0 0 0 - - - 0; +#X msg 93 495 \$1; #X obj 218 474 translateXYZ 0 0 -4; -#X obj 218 501 pix_texture; -#X floatatom 484 153 5 0 0 0 - - -; -#X msg 484 131 \$1; -#X floatatom 325 550 5 0 0 0 - - -; -#X msg 325 528 \$1; -#X floatatom 104 412 5 0 0 0 - - -; -#X msg 104 389 \$1; -#X floatatom 294 411 5 0 0 0 - - -; -#X msg 294 388 \$1; -#X obj 435 58 loadbang; -#X obj 199 364 gemframebuffer; -#N canvas 573 206 496 427 shader 0; -#X obj 32 294 glsl_program; -#X obj 126 137 change; -#X obj 126 183 print linking; -#X obj 32 117 glsl_fragment; -#X floatatom 130 239 5 0 0 0 - - -; -#X floatatom 232 239 5 0 0 0 - - -; -#X floatatom 181 239 5 0 0 0 - - -; -#X msg 130 260 K1 \$1; -#X msg 181 260 K3 \$1; -#X msg 232 260 D1 \$1; -#X msg 130 214 0.25; -#X msg 126 158 link \$1; -#N canvas 0 0 450 300 load_shader 0; -#X obj 89 99 t b b; -#X msg 119 126 0; -#X obj 89 154 outlet; -#X obj 89 71 gemhead 1; -#X connect 0 0 2 0; -#X connect 0 1 1 0; -#X connect 1 0 3 0; -#X connect 3 0 0 0; -#X restore 42 70 pd load_shader; -#X obj 32 36 inlet; -#X obj 32 363 outlet; -#X obj 304 38 inlet; -#X obj 139 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#N canvas 0 0 450 300 init_shader 0; -#X obj 89 154 outlet; -#X obj 89 45 inlet; -#X obj 89 73 change; -#X obj 89 100 t b; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 0 0; -#X restore 113 318 pd init_shader; -#X obj 112 341 t b; -#X obj 395 43 inlet; -#X msg 181 213 0; -#X msg 232 215 0; -#X msg 193 151 text 0; -#X msg 42 93 open wave.frag; -#X connect 0 0 14 0; -#X connect 0 1 17 0; -#X connect 1 0 11 0; -#X connect 3 0 0 0; -#X connect 3 1 1 0; -#X connect 4 0 7 0; -#X connect 5 0 9 0; -#X connect 6 0 8 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 0 0; -#X connect 10 0 4 0; -#X connect 11 0 0 0; -#X connect 11 0 2 0; -#X connect 12 0 23 0; -#X connect 13 0 3 0; -#X connect 15 0 23 0; -#X connect 16 0 18 0; -#X connect 17 0 18 0; -#X connect 18 0 10 0; -#X connect 18 0 20 0; -#X connect 18 0 21 0; -#X connect 18 0 22 0; -#X connect 19 0 16 0; -#X connect 20 0 6 0; -#X connect 21 0 5 0; -#X connect 22 0 0 0; -#X connect 23 0 3 0; -#X restore 9 274 pd shader; -#X obj 137 289 t a; -#X obj 137 197 t b; -#X obj 147 177 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 137 156 loadbang; +#X floatatom 504 130 5 0 0 0 - - - 0; +#X msg 504 108 \$1; +#X floatatom 305 523 5 0 0 0 - - - 0; +#X msg 305 501 \$1; +#X floatatom 96 404 5 0 0 0 - - - 0; +#X msg 96 381 \$1; +#X floatatom 317 371 5 0 0 0 - - - 0; +#X msg 317 348 \$1; #X obj 218 421 t a a; -#X obj 402 518 separator; +#X obj 390 518 separator; #X obj 218 447 separator; -#X obj 218 537 color 1 1 1; -#X obj 218 563 rectangle 4 4; +#X obj 218 547 color 1 1 1; +#X obj 218 573 rectangle 4 4; #X obj 9 563 rectangle 4 4; -#X obj 66 250 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 93 251 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 390 472 t a; -#N canvas 0 0 857 562 border 0; -#X obj 14 10 inlet; -#X obj 13 46 separator; -#X obj 13 68 translateXYZ 0 4 -3.9; -#X obj 13 115 rectangle 5 0.12; -#X obj 182 46 separator; -#X obj 182 115 rectangle 5 0.12; -#X obj 351 45 separator; -#X obj 182 68 translateXYZ 0 -4 -3.9; -#X obj 351 67 translateXYZ 4 0 -3.9; -#X obj 351 114 rectangle 0.12 5; -#X obj 528 39 separator; -#X obj 528 108 rectangle 0.12 5; -#X obj 528 61 translateXYZ -4 0 -3.9; -#X obj 528 85 color 0.5 0.5 0.5; -#X obj 351 91 color 0.5 0.5 0.5; -#X obj 181 93 color 0.5 0.5 0.5; -#X obj 13 92 color 0.5 0.5 0.5; -#X connect 0 0 1 0; -#X connect 0 0 4 0; -#X connect 0 0 6 0; -#X connect 0 0 10 0; +#N canvas 746 763 695 201 border 0; +#X obj 243 10 inlet; +#X obj 43 96 separator; +#X obj 43 118 translateXYZ 0 4 -3.9; +#X obj 43 165 rectangle 5 0.12; +#X obj 192 96 separator; +#X obj 351 95 separator; +#X obj 192 118 translateXYZ 0 -4 -3.9; +#X obj 351 117 translateXYZ 4 0 -3.9; +#X obj 351 164 rectangle 0.12 5; +#X obj 488 95 separator; +#X obj 488 117 translateXYZ -4 0 -3.9; +#X obj 243 53 t a a a a; +#X obj 243 32 color 0.5 0.5 0.5; +#X connect 0 0 12 0; #X connect 1 0 2 0; -#X connect 2 0 16 0; -#X connect 4 0 7 0; -#X connect 6 0 8 0; -#X connect 7 0 15 0; -#X connect 8 0 14 0; -#X connect 10 0 12 0; -#X connect 12 0 13 0; -#X connect 13 0 11 0; -#X connect 14 0 9 0; -#X connect 15 0 5 0; -#X connect 16 0 3 0; -#X restore 390 569 pd border; -#X obj 774 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X connect 2 0 3 0; +#X connect 4 0 6 0; +#X connect 5 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 8 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 11 0 1 0; +#X connect 11 1 4 0; +#X connect 11 2 5 0; +#X connect 11 3 9 0; +#X connect 12 0 11 0; +#X restore 479 497 pd border; +#X obj 774 148 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 774 172 gemhead 40; -#X floatatom 825 519 5 0 0 0 - - -; -#X obj 774 484 pix_texture; -#X floatatom 876 520 5 0 0 0 - - -; -#X obj 442 357 pix_texture; -#X floatatom 867 236 5 0 0 0 - - -; -#X obj 653 216 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 454 308 loadbang; -#X obj 786 442 loadbang; -#N canvas 93 153 804 667 _glsl 0; -#X obj 80 426 glsl_program; -#X obj 261 238 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#N canvas 0 22 450 300 open 0; -#X obj 75 103 openpanel; -#X obj 75 173 outlet; -#X obj 75 127 t b s; -#X msg 105 152 set open \$1; -#X obj 75 80 inlet; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 2 1 3 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X restore 204 237 pd open; -#X msg 33 296 print; -#X obj 166 331 change; -#X msg 34 420 print; -#X obj 80 310 glsl_fragment; -#X floatatom 166 355 2 0 0 0 ID - -; -#X obj 184 400 print linking; -#X obj 13 52 inlet; -#X obj 80 462 outlet; -#X msg 93 273 open \$1.frag; -#X msg 204 261 open \$1; -#X obj 422 77 inlet; -#X obj 13 75 route bang; -#X obj 140 83 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 140 109 t b b; -#X msg 140 202 symbol \$1/\$2; -#X obj 255 11 gemhead 1; -#X msg 255 33 1; -#X obj 255 57 change; -#X obj 255 81 t b; -#X obj 159 447 change; -#X obj 159 468 t b; -#X obj 159 491 outlet; -#X msg 166 379 link \$1; -#X obj 140 133 symbol vague; -#X connect 0 0 10 0; -#X connect 0 1 22 0; -#X connect 1 0 2 0; -#X connect 2 0 12 0; -#X connect 3 0 6 0; -#X connect 4 0 7 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 6 1 4 0; -#X connect 7 0 25 0; -#X connect 9 0 14 0; -#X connect 11 0 6 0; -#X connect 12 0 6 0; -#X connect 13 0 0 0; -#X connect 14 0 16 0; -#X connect 14 1 6 0; -#X connect 15 0 16 0; -#X connect 16 0 26 0; -#X connect 17 0 11 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 21 0; -#X connect 21 0 16 0; -#X connect 22 0 23 0; -#X connect 23 0 24 0; -#X connect 25 0 0 0; -#X connect 25 0 8 0; -#X connect 26 0 11 0; -#X restore 774 326 pd _glsl; -#X obj 743 302 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X msg 435 82 texunit 3; -#X obj 410 108 pix_texture; -#X obj 181 299 t a; +#X floatatom 825 519 5 0 0 0 - - - 0; +#X floatatom 876 520 5 0 0 0 - - - 0; +#X floatatom 867 236 5 0 0 0 - - - 0; +#X obj 743 302 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 182 240 t a; #N canvas 0 0 450 300 gouttes 0; #X obj 27 79 translateXYZ 0 0 -4; #X obj 27 101 t a b b; @@ -254,41 +81,22 @@ #X connect 8 0 2 2; #X connect 10 0 9 0; #X connect 11 0 0 0; -#X restore 402 542 pd gouttes; -#X msg 244 284 quality 0; +#X restore 390 542 pd gouttes; #X obj 774 541 rectangle 4 4; -#X obj 9 155 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X obj 220 180 delay 1000; -#N canvas 0 0 450 300 init 0; -#X obj 89 154 outlet; -#X obj 89 100 change; -#X obj 89 127 t b; -#X obj 91 52 gemhead; -#X msg 91 73 1; -#X connect 1 0 2 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 1 0; -#X restore 220 157 pd init; +#X obj 9 155 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 410 34 gemhead 16; -#X obj 199 342 gemhead 12; +#X obj 218 322 gemhead 12; #X obj 442 214 gemhead 17; #X obj 9 177 gemhead 10; -#X obj 442 240 pix_image img2.jpg; +#X obj 442 240 pix_image ../data/img2.jpg; #X msg 867 215 111; -#X text 33 612 This shader is rendered into a framebuffer \, in order -to use it in the next frame for a simple physical modeling simulation -; -#X text 345 168 This creates a texture (texunit 3) from the shaders' -output; -#X text 437 386 this loads a texture (texunit 2); +#X text 33 612 This shader is rendered into a framebuffer \, in order to use it in the next frame for a simple physical modeling simulation; +#X text 345 168 This creates a texture (texunit 3) from the shaders' output; +#X text 437 336 this loads a texture (texunit 2); #X text 691 411 not used \, just to set texture coordinate; -#X text 633 594 This uses the two textures (texunit 2 and 3) in order -to render the final images; -#X text 201 9 This is an example of rendering to texture (using framebuffer) -and multitextures; -#X obj 402 497 t a a a a a; +#X text 633 594 This uses the two textures (texunit 2 and 3) in order to render the final images; +#X text 201 9 This is an example of rendering to texture (using framebuffer) and multitextures; +#X obj 390 497 t a a a a a; #X obj 774 393 pix_set 512 512; #N canvas 87 154 452 208 Gem.init 0; #X obj 118 46 loadbang; @@ -298,8 +106,7 @@ and multitextures; #X connect 2 0 1 0; #X restore 760 47 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -337,84 +144,106 @@ and multitextures; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 730 64 pd gemwin; -#X msg 786 463 rectangle 1; -#X msg 454 331 texunit 2 \, quality 1 \, rectangle 1; -#X msg 137 222 type FLOAT \, dimen 512 512 \, rectangle 1; -#X msg 220 202 quality 1 \, rectangle 1; #X msg 867 255 K \$1 \, texture1 2 \, texture2 3; #X text 880 276 texture1==base; #X text 882 294 texture2==deformation; #X obj 1004 13 declare -lib Gem; -#X connect 0 0 5 0; -#X connect 1 0 18 0; +#X obj 442 267 pix_texture \; texunit 2 \; quality 1 \; rectangle 1; +#X obj 774 484 pix_texture \; rectangle 1; +#X obj 867 189 loadbang; +#X obj 9 315 gemframebuffer \; type FLOAT \; dimen 512 512 \; rectangle 1; +#X obj 218 344 gemframebuffer \; type FLOAT \; dimen 512 512 \; rectangle 1; +#X obj 774 326 glsl shader/vague; +#X floatatom 90 109 5 0 0 0 - \$0-K1 - 0; +#X floatatom 192 109 5 0 0 0 - \$0-D1 - 0; +#X floatatom 141 109 5 0 0 0 - \$0-K3 - 0; +#X msg 90 130 K1 \$1; +#X msg 141 130 K3 \$1; +#X msg 192 130 D1 \$1; +#N canvas 735 461 450 300 init 0; +#X obj 55 74 list prepend \$0; +#X msg 55 97 \; \$1-K1 0.25 \; \$1-K3 0 \; \$1-D1 0; +#X obj 55 51 inlet; +#X connect 0 0 1 0; +#X connect 2 0 0 0; +#X restore 990 483 pd init; +#X obj 990 456 loadbang; +#X obj 9 269 glsl shader/wave; +#X msg 182 216 quality \$1; +#X obj 182 192 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 9 494 pix_texture \; rectangle 1 \; quality 1; +#X obj 218 501 pix_texture \; rectangle 1 \; quality 1; +#X obj 410 108 pix_texture \; texunit 3; +#X obj 390 455 spigot 1; +#X obj 444 455 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 390 432 t a a; +#X obj 533 455 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 479 454 spigot 0; +#X connect 0 0 67 0; +#X connect 1 0 64 0; #X connect 3 0 2 0; -#X connect 4 0 0 0; -#X connect 4 1 7 1; -#X connect 4 1 13 0; -#X connect 5 0 28 0; -#X connect 5 1 3 0; -#X connect 6 0 7 0; -#X connect 7 0 26 0; -#X connect 7 1 11 0; -#X connect 7 1 46 1; -#X connect 9 0 8 0; -#X connect 11 0 10 0; -#X connect 13 0 12 0; -#X connect 15 0 14 0; -#X connect 16 0 45 0; -#X connect 17 0 23 0; -#X connect 17 1 5 1; -#X connect 17 1 15 0; -#X connect 18 0 4 0; -#X connect 19 0 4 0; -#X connect 19 0 17 0; -#X connect 20 0 72 0; -#X connect 21 0 20 0; -#X connect 22 0 20 0; -#X connect 23 0 25 0; -#X connect 23 1 31 0; -#X connect 24 0 48 0; -#X connect 25 0 6 0; -#X connect 26 0 27 0; -#X connect 29 0 18 1; -#X connect 30 0 18 2; -#X connect 31 0 66 0; -#X connect 33 0 34 0; -#X connect 34 0 43 0; -#X connect 35 0 50 1; -#X connect 36 0 50 0; -#X connect 37 0 50 2; -#X connect 39 0 74 0; -#X connect 40 0 59 0; -#X connect 41 0 71 0; -#X connect 42 0 70 0; -#X connect 43 0 67 0; -#X connect 43 1 40 0; -#X connect 44 0 43 0; -#X connect 45 0 46 0; -#X connect 46 1 9 0; -#X connect 47 0 5 0; -#X connect 47 0 46 0; -#X connect 47 0 7 0; -#X connect 49 0 47 0; -#X connect 51 0 57 0; -#X connect 52 0 73 0; -#X connect 53 0 52 0; -#X connect 54 0 46 0; -#X connect 55 0 17 0; -#X connect 56 0 58 0; -#X connect 57 0 1 0; -#X connect 58 0 38 0; -#X connect 59 0 39 0; -#X connect 66 0 24 0; -#X connect 66 1 24 0; -#X connect 66 2 24 0; -#X connect 66 3 24 0; -#X connect 66 4 24 0; -#X connect 67 0 36 0; -#X connect 68 0 69 0; -#X connect 70 0 36 0; -#X connect 71 0 38 0; -#X connect 72 0 19 0; -#X connect 73 0 47 0; -#X connect 74 0 43 1; +#X connect 4 0 68 0; +#X connect 6 0 5 0; +#X connect 8 0 7 0; +#X connect 10 0 9 0; +#X connect 12 0 11 0; +#X connect 13 0 15 0; +#X connect 13 1 72 0; +#X connect 14 0 27 0; +#X connect 15 0 4 0; +#X connect 16 0 17 0; +#X connect 20 0 21 0; +#X connect 21 0 55 0; +#X connect 22 0 28 1; +#X connect 23 0 28 2; +#X connect 24 0 46 0; +#X connect 25 0 55 0; +#X connect 26 0 67 0; +#X connect 26 0 68 0; +#X connect 26 0 69 0; +#X connect 29 0 33 0; +#X connect 30 0 69 0; +#X connect 31 0 54 0; +#X connect 32 0 34 0; +#X connect 33 0 1 0; +#X connect 34 0 50 0; +#X connect 35 0 24 0; +#X connect 42 0 14 0; +#X connect 42 1 14 0; +#X connect 42 2 14 0; +#X connect 42 3 14 0; +#X connect 42 4 14 0; +#X connect 43 0 51 0; +#X connect 44 0 45 0; +#X connect 46 0 55 1; +#X connect 51 0 28 0; +#X connect 52 0 35 0; +#X connect 53 0 0 0; +#X connect 53 1 10 0; +#X connect 53 1 68 1; +#X connect 54 0 13 0; +#X connect 54 1 12 0; +#X connect 54 1 67 1; +#X connect 55 0 43 0; +#X connect 56 0 59 0; +#X connect 57 0 61 0; +#X connect 58 0 60 0; +#X connect 59 0 64 1; +#X connect 60 0 64 1; +#X connect 61 0 64 1; +#X connect 63 0 62 0; +#X connect 64 0 53 0; +#X connect 65 0 26 0; +#X connect 66 0 65 0; +#X connect 67 0 18 0; +#X connect 67 1 3 0; +#X connect 68 0 16 0; +#X connect 68 1 8 0; +#X connect 68 1 69 1; +#X connect 69 1 6 0; +#X connect 70 0 42 0; +#X connect 71 0 70 1; +#X connect 72 0 70 0; +#X connect 72 1 74 0; +#X connect 73 0 74 1; +#X connect 74 0 19 0; diff --git a/examples/10.glsl/08.multi_pass_rendering.pd b/examples/10.glsl/08.multi_pass_rendering.pd index a0a004f8b..2c1412d9e 100644 --- a/examples/10.glsl/08.multi_pass_rendering.pd +++ b/examples/10.glsl/08.multi_pass_rendering.pd @@ -1,243 +1,26 @@ -#N canvas 208 184 980 477 10; +#N canvas 417 350 980 477 10; #X declare -lib Gem; -#X obj 42 315 square 4; -#X obj 42 199 translateXYZ 0 0 -4; -#X obj 671 399 pix_texture; -#X obj 671 419 square 4; -#N canvas 370 126 407 295 init 0; -#X obj 106 175 outlet; -#X msg 125 89 type FLOAT; -#X obj 124 68 loadbang; -#X msg 146 109 dimen 1024 1024; -#X msg 211 147 rectangle 0; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X connect 2 0 3 0; -#X connect 2 0 4 0; -#X connect 3 0 0 0; -#X connect 4 0 0 0; -#X restore 56 157 pd init; -#X obj 650 230 pix_texture; -#X obj 650 252 square 4; -#X floatatom 724 255 5 0 0 0 - - -; -#N canvas 157 111 392 206 init 0; -#X obj 93 68 t b; -#X obj 93 47 loadbang; -#X obj 93 159 outlet; -#X msg 93 118 type FLOAT \, dimen 1024 1024 \, rectangle 0; -#X connect 0 0 3 0; -#X connect 1 0 0 0; -#X connect 3 0 2 0; -#X restore 669 120 pd init; -#X obj 353 199 translateXYZ 0 0 -4; -#N canvas 70 0 407 295 init 0; -#X obj 106 175 outlet; -#X obj 106 68 loadbang; -#X msg 106 118 type FLOAT \, dimen 1024 1024 \, rectangle 0; -#X connect 1 0 2 0; -#X connect 2 0 0 0; -#X restore 373 156 pd init; +#X obj 42 335 square 4; +#X obj 42 249 translateXYZ 0 0 -4; +#X obj 671 359 square 4; +#X obj 650 232 square 4; +#X floatatom 724 265 5 0 0 0 - - - 0; +#X obj 353 259 translateXYZ 0 0 -4; #X text 6 4 first input \, render whatever in a framebuffer; -#X obj 691 357 loadbang; -#X obj 42 222 pix_image img1.jpg; +#X obj 42 272 pix_image ../data/img1.jpg; #X obj 42 54 gemhead 11; -#X obj 666 187 loadbang; -#X obj 650 166 translateXYZ 0 0 -4; -#X obj 650 142 gemframebuffer; -#X obj 353 177 gemframebuffer; -#N canvas 330 106 589 635 shader1 0; -#X obj 94 500 glsl_program; -#X obj 94 340 glsl_fragment; -#X obj 94 160 glsl_vertex; -#X obj 172 400 pack 0 0; -#X obj 162 200 change; -#X obj 182 375 change; -#X msg 172 420 link \$1 \$2; -#X obj 162 220 t b f; -#X obj 176 444 print linking; -#X obj 94 66 inlet; -#X obj 94 530 outlet; -#X obj 464 245 inlet; -#X floatatom 182 179 0 0 0 0 - - -; -#X floatatom 234 377 0 0 0 0 - - -; -#X msg 56 472 print; -#X msg 246 65 1; -#X obj 246 106 t b; -#X obj 246 46 gemhead 1; -#X obj 175 548 t b; -#X obj 175 571 outlet; -#X msg 246 135 open T_distord.vert; -#X msg 289 160 open T_distord.frag; -#X obj 246 86 change -1; -#X obj 175 524 change; -#X connect 0 0 10 0; -#X connect 0 1 23 0; -#X connect 1 0 0 0; -#X connect 1 1 5 0; -#X connect 1 1 13 0; -#X connect 2 0 1 0; -#X connect 2 1 4 0; -#X connect 2 1 12 0; -#X connect 3 0 6 0; -#X connect 4 0 7 0; -#X connect 5 0 3 0; -#X connect 6 0 0 0; -#X connect 6 0 8 0; -#X connect 7 0 3 0; -#X connect 7 1 3 1; -#X connect 9 0 2 0; -#X connect 11 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 22 0; -#X connect 16 0 20 0; -#X connect 16 0 21 0; -#X connect 17 0 15 0; -#X connect 18 0 19 0; -#X connect 20 0 2 0; -#X connect 21 0 1 0; -#X connect 22 0 16 0; -#X connect 23 0 18 0; -#X restore 42 81 pd shader1; -#N canvas 476 68 589 635 shader2 0; -#X obj 94 500 glsl_program; -#X obj 94 340 glsl_fragment; -#X obj 94 160 glsl_vertex; -#X obj 172 400 pack 0 0; -#X obj 162 200 change; -#X obj 182 375 change; -#X msg 172 420 link \$1 \$2; -#X obj 162 220 t b f; -#X obj 176 444 print linking; -#X obj 94 66 inlet; -#X obj 94 530 outlet; -#X obj 464 245 inlet; -#X floatatom 182 179 0 0 0 0 - - -; -#X floatatom 234 377 0 0 0 0 - - -; -#X msg 56 472 print; -#X msg 246 65 1; -#X obj 246 106 t b; -#X obj 246 46 gemhead 1; -#X obj 175 548 t b; -#X obj 175 571 outlet; -#X msg 246 135 open P_distord.vert; -#X msg 289 160 open P_distord.frag; -#X obj 246 86 change -1; -#X obj 175 524 change; -#X connect 0 0 10 0; -#X connect 0 1 23 0; -#X connect 1 0 0 0; -#X connect 1 1 5 0; -#X connect 1 1 13 0; -#X connect 2 0 1 0; -#X connect 2 1 4 0; -#X connect 2 1 12 0; -#X connect 3 0 6 0; -#X connect 4 0 7 0; -#X connect 5 0 3 0; -#X connect 6 0 0 0; -#X connect 6 0 8 0; -#X connect 7 0 3 0; -#X connect 7 1 3 1; -#X connect 9 0 2 0; -#X connect 11 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 22 0; -#X connect 16 0 20 0; -#X connect 16 0 21 0; -#X connect 17 0 15 0; -#X connect 18 0 19 0; -#X connect 20 0 2 0; -#X connect 21 0 1 0; -#X connect 22 0 16 0; -#X connect 23 0 18 0; -#X restore 353 78 pd shader2; -#N canvas 60 91 589 635 shader3 0; -#X obj 94 500 glsl_program; -#X obj 94 340 glsl_fragment; -#X obj 94 160 glsl_vertex; -#X obj 172 400 pack 0 0; -#X obj 162 200 change; -#X obj 182 375 change; -#X msg 172 420 link \$1 \$2; -#X obj 162 220 t b f; -#X obj 176 444 print linking; -#X obj 94 66 inlet; -#X obj 94 530 outlet; -#X obj 464 245 inlet; -#X floatatom 182 179 0 0 0 0 - - -; -#X floatatom 234 377 0 0 0 0 - - -; -#X msg 56 472 print; -#X msg 246 65 1; -#X obj 246 106 t b; -#X obj 246 46 gemhead 1; -#X obj 175 548 t b; -#X obj 175 571 outlet; -#X msg 326 429 MyTex 1; -#X msg 336 451 MyTex1 2; -#X msg 247 135 open multitexture.vert; -#X msg 291 160 open multitexture.frag; -#X obj 246 86 change -1; -#X obj 175 524 change; -#X connect 0 0 10 0; -#X connect 0 1 25 0; -#X connect 1 0 0 0; -#X connect 1 1 5 0; -#X connect 1 1 13 0; -#X connect 2 0 1 0; -#X connect 2 1 4 0; -#X connect 2 1 12 0; -#X connect 3 0 6 0; -#X connect 4 0 7 0; -#X connect 5 0 3 0; -#X connect 6 0 0 0; -#X connect 6 0 8 0; -#X connect 7 0 3 0; -#X connect 7 1 3 1; -#X connect 9 0 2 0; -#X connect 11 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 24 0; -#X connect 16 0 22 0; -#X connect 16 0 23 0; -#X connect 17 0 15 0; -#X connect 18 0 19 0; -#X connect 18 0 20 0; -#X connect 18 0 21 0; -#X connect 20 0 0 0; -#X connect 21 0 0 0; -#X connect 22 0 2 0; -#X connect 23 0 1 0; -#X connect 24 0 16 0; -#X connect 25 0 18 0; -#X restore 650 79 pd shader3; +#X obj 650 206 translateXYZ 0 0 -4; #X obj 650 54 gemhead 31; -#X obj 671 314 gemhead 32; -#X obj 56 248 loadbang; -#X obj 367 245 loadbang; -#X msg 56 270 rectangle 0; -#X msg 367 267 rectangle 0; -#X obj 42 295 pix_texture; -#X msg 55 135 texunit 1; -#X obj 55 113 loadbang; -#X obj 366 115 loadbang; -#X msg 366 136 texunit 2; -#X msg 141 48 1; -#X floatatom 141 69 5 0 0 0 - - -; -#X msg 141 88 K1 \$1; -#X text 183 69 change effect; +#X obj 671 284 gemhead 32; #X text 347 1 second input : same as 1st.; #X text 7 22 put framebuffer as texunit 1 \, for future use; #X text 348 17 render an image in framebuffer.; #X text 350 31 put framebuffer in texunit 2; #X text 632 8 finally :; #X text 631 23 shader mixing 2 textures in a framebuffer; -#X floatatom 449 79 5 0 0 0 - - -; -#X text 491 79 change effect; -#X msg 449 98 K \$1; -#X msg 449 58 0.1; #X text 161 433 <-------------------; -#X text 569 442 draw the final framebuffer (without shader); -#X obj 671 335 rotateXYZ -20 0 0; +#X text 569 382 draw the final framebuffer (without shader); +#X obj 671 305 rotateXYZ -20 0 0; #N canvas 87 154 247 179 Gem.init 0; #X obj 58 46 loadbang; #X obj 58 113 outlet; @@ -246,8 +29,7 @@ #X connect 2 0 1 0; #X restore 99 394 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -284,60 +66,56 @@ #X connect 15 0 16 0; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; -#X restore 69 411 pd gemwin; -#X obj 42 177 gemframebuffer; -#X obj 353 332 mesh_square 10 10; -#X obj 353 311 scaleXYZ 4 4 1; +#X restore 69 412 pd gemwin; +#X obj 353 372 mesh_square 10 10; +#X obj 353 351 scaleXYZ 4 4 1; #X obj 353 57 gemhead 21; -#X obj 353 222 pix_image img2.jpg; -#X obj 353 291 pix_texture; -#X msg 666 209 rectangle 0; -#X msg 691 378 rectangle 0; +#X obj 353 282 pix_image ../data/img2.jpg; #X obj 99 376 declare -lib Gem; -#X connect 1 0 13 0; -#X connect 2 0 3 0; -#X connect 4 0 52 0; -#X connect 5 0 6 0; -#X connect 5 1 7 0; -#X connect 8 0 17 0; -#X connect 9 0 56 0; -#X connect 10 0 18 0; -#X connect 12 0 59 0; -#X connect 13 0 28 0; -#X connect 14 0 19 0; -#X connect 15 0 58 0; -#X connect 16 0 5 0; -#X connect 17 0 16 0; -#X connect 17 1 2 1; -#X connect 18 0 9 0; -#X connect 19 0 52 0; -#X connect 19 1 33 0; -#X connect 20 0 18 0; -#X connect 20 1 46 0; -#X connect 21 0 17 0; -#X connect 22 0 21 0; -#X connect 23 0 49 0; -#X connect 24 0 26 0; -#X connect 25 0 27 0; -#X connect 26 0 28 0; -#X connect 27 0 57 0; +#X obj 42 295 pix_texture \; rectangle 0; +#X obj 42 177 gemframebuffer \; type FLOAT \; dimen 1024 1024 \; rectangle 0 \; texunit 1; +#X obj 353 311 pix_texture \; rectangle 0; +#X obj 353 177 gemframebuffer \; type FLOAT \; dimen 1024 1024 \; rectangle 0 \; texunit 2; +#X obj 650 142 gemframebuffer \; type FLOAT \; dimen 1024 1024 \; rectangle 0; +#X obj 671 326 pix_texture \; rectangle 0; +#X obj 42 154 glsl shader/T_distord; +#X obj 171 56 loadbang; +#X msg 171 79 1; +#X floatatom 171 102 5 0 0 0 - - - 0; +#X msg 171 124 K1 \$1; +#X obj 482 56 loadbang; +#X floatatom 482 102 5 0 0 0 - - - 0; +#X obj 353 154 glsl shader/P_distord; +#X msg 482 124 K \$1; +#X msg 482 79 0.1; +#X obj 650 87 glsl shader/multitexture \; MyTex 1 \; MyTex1 2; +#X connect 1 0 7 0; +#X connect 5 0 26 0; +#X connect 7 0 28 0; +#X connect 8 0 34 0; +#X connect 9 0 3 0; +#X connect 10 0 44 0; +#X connect 11 0 20 0; +#X connect 20 0 33 0; +#X connect 21 0 22 0; +#X connect 24 0 23 0; +#X connect 25 0 41 0; +#X connect 26 0 30 0; #X connect 28 0 0 0; -#X connect 29 0 52 0; -#X connect 30 0 29 0; -#X connect 31 0 32 0; -#X connect 32 0 18 0; -#X connect 33 0 34 0; -#X connect 34 0 35 0; -#X connect 35 0 19 1; -#X connect 43 0 45 0; -#X connect 45 0 20 1; -#X connect 46 0 43 0; -#X connect 49 0 2 0; -#X connect 50 0 51 0; -#X connect 52 0 1 0; -#X connect 54 0 53 0; -#X connect 55 0 20 0; -#X connect 56 0 57 0; -#X connect 57 0 54 0; -#X connect 58 0 5 0; -#X connect 59 0 2 0; +#X connect 29 0 1 0; +#X connect 30 0 24 0; +#X connect 31 0 5 0; +#X connect 32 0 9 0; +#X connect 32 1 33 1; +#X connect 33 0 2 0; +#X connect 34 0 29 0; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 37 0 38 0; +#X connect 38 0 34 1; +#X connect 39 0 43 0; +#X connect 40 0 42 0; +#X connect 41 0 31 0; +#X connect 42 0 41 1; +#X connect 43 0 40 0; +#X connect 44 0 32 0; diff --git a/examples/10.glsl/09.vertex_texture_fetching.pd b/examples/10.glsl/09.vertex_texture_fetching.pd index d03c0f61d..9228e563a 100644 --- a/examples/10.glsl/09.vertex_texture_fetching.pd +++ b/examples/10.glsl/09.vertex_texture_fetching.pd @@ -1,67 +1,30 @@ -#N canvas 239 61 690 677 10; +#N canvas 474 41 690 677 10; #X declare -lib Gem; -#X obj 504 69 gemhead; -#X obj 576 346 pack 0 0; -#X obj 597 326 t b f; -#X msg 576 369 link \$1 \$2; -#X floatatom 597 307 2 0 0 0 ID - -; -#X floatatom 576 206 2 0 0 0 ID - -; -#X obj 594 390 print linking; -#X obj 504 480 pix_texture; -#X obj 540 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 504 179 gemhead; #X obj 28 199 gemhead 1; -#X obj 28 311 gemframebuffer; -#X obj 28 485 pix_texture; -#X obj 28 336 translateXYZ 0 0 -4; -#X obj 28 510 square 4; -#X obj 504 261 glsl_fragment; -#X obj 504 164 glsl_vertex; -#X obj 576 183 change; -#X obj 597 281 change; -#X obj 504 409 glsl_program; -#X floatatom 542 505 5 0 0 0 - - -; -#X obj 49 231 loadbang; -#X obj 44 419 loadbang; -#X msg 520 456 quality 0; -#N canvas 70 231 450 300 load_glsl 0; -#X obj 51 22 gemhead; -#X obj 51 98 outlet; -#X obj 51 50 route gem_state; -#X obj 51 74 route 1; -#X connect 0 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X restore 540 93 pd load_glsl; -#X msg 514 231 open fetching.frag; -#X msg 518 142 open fetching.vert; +#X obj 28 396 translateXYZ 0 0 -4; +#X obj 28 600 square 4; +#X floatatom 542 505 5 0 0 0 - - - 0; #X obj 504 525 rotateXYZ -30 0 0; #X obj 504 551 scaleXYZ 3 3 1; -#X obj 28 388 pix_image img1.jpg; -#X msg 46 363 open img2.jpg; +#X obj 28 448 pix_image ../data/img1.jpg; +#X msg 46 423 open ../data/img2.jpg; #X text 137 11 This patch need a glsl 3 compliant hardware; -#X text 26 535 draw an image in a framebuffer; -#X text 49 274 this configuration is very important to have full hardware -support for vertex texture fetching; -#X text 306 603 this example uses the framebuffer image in the vertex -shader in the same way you can do in the pixel shader. This is only -possible in this specific configuration (it's a hardware limitation) -; -#X text 137 56 (nvidia 7000 and 8000 series should work \, ati X1000 -series does not \, but later should); +#X text 26 625 draw an image in a framebuffer; +#X text 123 344 this configuration is very important to have full hardware support for vertex texture fetching; +#X text 306 603 this example uses the framebuffer image in the vertex shader in the same way you can do in the pixel shader. This is only possible in this specific configuration (it's a hardware limitation); +#X text 137 56 (nvidia 7000 and 8000 series should work \, ati X1000 series does not \, but later should); #X obj 504 579 mesh_square 200; -#X text 138 28 As in 2007 \, only good (and new) graphic cards are -able to run this patch.; +#X text 138 28 As in 2007 \, only good (and new) graphic cards are able to run this patch.; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; #X obj 118 113 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; -#X restore 56 77 pd Gem.init; +#X restore 56 76 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -99,46 +62,22 @@ able to run this patch.; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 26 94 pd gemwin; -#X msg 49 255 rectangle 0 \, type BYTE \, format RGB32 \, dimen 1024 -1024; -#X msg 44 439 rectangle 0 \, quality 0; -#X obj 520 437 loadbang; #X obj 563 7 declare -lib Gem; -#X connect 0 0 15 0; -#X connect 1 0 3 0; -#X connect 2 0 1 0; -#X connect 2 1 1 1; -#X connect 3 0 6 0; -#X connect 3 0 18 0; -#X connect 4 0 2 0; -#X connect 5 0 1 0; -#X connect 7 0 26 0; -#X connect 8 0 25 0; -#X connect 8 0 24 0; -#X connect 9 0 10 0; -#X connect 10 0 12 0; -#X connect 10 1 7 1; -#X connect 11 0 13 0; -#X connect 12 0 28 0; -#X connect 14 0 18 0; -#X connect 14 1 17 0; -#X connect 15 0 14 0; -#X connect 15 1 16 0; -#X connect 16 0 5 0; -#X connect 17 0 4 0; -#X connect 18 0 7 0; -#X connect 19 0 26 1; -#X connect 20 0 39 0; -#X connect 21 0 40 0; -#X connect 22 0 7 0; -#X connect 23 0 8 0; -#X connect 24 0 14 0; -#X connect 25 0 15 0; -#X connect 26 0 27 0; -#X connect 27 0 35 0; -#X connect 28 0 11 0; -#X connect 29 0 28 0; -#X connect 37 0 38 0; -#X connect 39 0 10 0; -#X connect 40 0 11 0; -#X connect 41 0 22 0; +#X obj 504 292 glsl shader/fetching; +#X obj 28 310 gemframebuffer \; rectangle 0 \; type BYTE \; format RGB32 \; dimen 1024 1024; +#X obj 28 545 pix_texture \; rectangle 0 \; quality 0; +#X obj 504 450 pix_texture \; quality 0; +#X connect 0 0 19 0; +#X connect 1 0 20 0; +#X connect 2 0 7 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X connect 6 0 14 0; +#X connect 7 0 21 0; +#X connect 8 0 7 0; +#X connect 16 0 17 0; +#X connect 19 0 22 0; +#X connect 20 0 2 0; +#X connect 20 1 22 1; +#X connect 21 0 3 0; +#X connect 22 0 5 0; diff --git a/examples/10.glsl/10.GPGPU_Physical_model.pd b/examples/10.glsl/10.GPGPU_Physical_model.pd index 04253b1b0..5534e4ea1 100644 --- a/examples/10.glsl/10.GPGPU_Physical_model.pd +++ b/examples/10.glsl/10.GPGPU_Physical_model.pd @@ -1,9 +1,8 @@ -#N struct 1071-xy-pad-knob-1 float x0 float y0 float id; -#N canvas 75 218 764 482 10; +#N struct 1003-xy-pad-knob-1 float x0 float y0 float id; +#N canvas 1044 250 764 482 10; #X declare -lib Gem; -#X obj 27 380 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1 --1 0; -#X floatatom 185 212 5 0 0 0 - - -; +#X obj 27 380 hradio 15 1 0 5 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0; +#X floatatom 185 212 5 0 0 0 - - - 0; #N canvas 4 106 187 219 fps 0; #X obj 22 62 realtime; #X obj 22 41 t b b; @@ -22,7 +21,7 @@ #X connect 6 0 7 0; #X connect 7 0 3 0; #X restore 185 192 pd fps; -#N canvas 93 66 1183 666 shaders_PM 0; +#N canvas 819 114 1183 666 shaders_PM 0; #X obj 718 34 gemhead; #X obj 718 57 route gem_state; #X obj 718 79 route 1 0; @@ -58,35 +57,34 @@ #X restore 113 378 pd init_shader; #X obj 278 25 inlet; #X obj 113 408 outlet; -#X msg 42 203 open mass.frag; #X obj 32 354 glsl_program; #X obj 32 137 glsl_vertex; -#X msg 42 113 open mass.vert; #X obj 94 74 t b b; #X obj 126 272 pack f f; #X msg 126 296 link \$1 \$2; -#X connect 0 0 15 0; -#X connect 2 0 11 0; +#X msg 42 113 open shader/mass.vert; +#X msg 42 202 open shader/mass.frag; +#X connect 0 0 13 0; +#X connect 2 0 10 0; #X connect 2 1 0 0; -#X connect 3 0 14 0; -#X connect 4 0 12 0; -#X connect 6 0 14 0; +#X connect 3 0 12 0; +#X connect 4 0 11 0; +#X connect 6 0 12 0; #X connect 7 0 9 0; -#X connect 8 0 11 0; -#X connect 10 0 2 0; -#X connect 11 0 5 0; -#X connect 11 1 7 0; -#X connect 12 0 2 0; -#X connect 12 1 15 1; -#X connect 13 0 12 0; +#X connect 8 0 10 0; +#X connect 10 0 5 0; +#X connect 10 1 7 0; +#X connect 11 0 2 0; +#X connect 11 1 13 1; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 14 0 1 0; #X connect 14 0 10 0; -#X connect 14 1 13 0; -#X connect 15 0 16 0; -#X connect 16 0 1 0; -#X connect 16 0 11 0; +#X connect 15 0 11 0; +#X connect 16 0 2 0; #X restore 24 257 pd shader; -#X obj 53 234 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 53 234 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 506 468 translateXYZ 0 0 -4; #X obj 506 610 square 4; #X obj 261 477 translateXYZ 0 0 -4; @@ -124,8 +122,8 @@ #X obj 94 74 t b b; #X obj 126 272 pack f f; #X msg 126 296 link \$1 \$2; -#X msg 42 113 open link.vert; -#X msg 42 203 open link.frag; +#X msg 42 113 open shader/link.vert; +#X msg 42 203 open shader/link.frag; #X connect 0 0 2 0; #X connect 0 1 4 0; #X connect 1 0 11 0; @@ -146,8 +144,7 @@ #X connect 15 0 11 0; #X connect 16 0 9 0; #X restore 261 256 pd shader; -#X obj 292 231 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 292 231 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 280 539 loadbang; #X obj 119 448 s texture_mass; #X obj 359 444 s texture_link; @@ -165,8 +162,7 @@ #X msg 41 561 rectangle 1 \, quality 0; #X msg 280 560 rectangle 1 \, quality 0; #X obj 615 58 t b b; -#X obj 658 36 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 658 36 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 621 113 s init_shader_link; #X obj 84 233 r shader_mass; #X obj 84 281 s init_shader_mass; @@ -175,17 +171,14 @@ #X obj 261 418 gemframebuffer; #X obj 24 588 pix_texture; #X obj 24 425 gemframebuffer; -#X obj 65 310 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 65 310 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 506 418 gemframebuffer; #X obj 524 513 loadbang; #X msg 524 532 rectangle 1 \, quality 0; #X obj 506 588 pix_texture; #X obj 580 565 r texture_mass; -#X obj 103 260 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 341 251 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 103 260 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 341 251 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 616 79 delay 500; #N canvas 0 0 446 324 init_fb 0; #X msg 100 173 type BYTE; @@ -215,8 +208,7 @@ #X connect 10 1 8 0; #X restore 56 337 pd init_fb; #X obj 24 306 t a b; -#X obj 302 300 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 302 300 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 init_fb 0; #X msg 100 153 type BYTE; #X msg 78 131 format RGB32; @@ -245,8 +237,7 @@ #X connect 10 1 8 0; #X restore 293 327 pd init_fb; #X obj 261 296 t a b; -#X obj 547 298 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 547 298 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 init_fb 0; #X msg 100 153 type BYTE; #X msg 78 131 format RGB32; @@ -282,27 +273,24 @@ #X obj 32 90 until; #X obj 44 540 loadbang; #X msg 804 378 init \$1; -#X floatatom 804 360 5 0 1 0 - - -; +#X floatatom 804 360 5 0 1 0 - - - 0; #X obj 762 371 t b; -#X obj 762 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 762 254 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X msg 762 407 texture_link 3; #X msg 804 338 1; #X msg 950 229 gravite \$1; -#X floatatom 948 189 5 0 0 0 - - -; -#X floatatom 1012 190 5 0 0 0 - - -; +#X floatatom 948 189 5 0 0 0 - - - 0; +#X floatatom 1012 190 5 0 0 0 - - - 0; #X msg 1012 206 D \$1; #X msg 1063 208 K1 \$1; -#X floatatom 1062 189 5 0 0 0 - - -; +#X floatatom 1062 189 5 0 0 0 - - - 0; #X obj 948 207 / 100; #X obj 950 251 t a; #X obj 950 526 s shader_link; -#X obj 952 90 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 952 90 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 952 70 r init_shader_link; #X obj 950 146 t b; -#X obj 952 127 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 952 127 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X msg 1059 168 0.05; #X msg 950 169 -0.0025; #X msg 1009 170 0.004; @@ -312,7 +300,7 @@ #X obj 762 225 r init_shader_mass; #X obj 804 286 t b; #X msg 992 362 init \$1; -#X floatatom 992 344 5 0 1 0 - - -; +#X floatatom 992 344 5 0 1 0 - - - 0; #X msg 992 322 1; #X obj 1030 298 delay 1000; #X msg 1030 321 0; @@ -449,7 +437,7 @@ #X restore 27 323 pd shaders_PM _________________; #N canvas 267 495 450 300 config 0; #X msg 16 75 W \$1; -#X floatatom 225 101 5 0 0 0 - - -; +#X floatatom 225 101 5 0 0 0 - - - 0; #X msg 225 120 f \$1; #X obj 133 155 t a; #X msg 133 83 N \$1; @@ -560,21 +548,18 @@ #X connect 15 0 14 0; #X restore 27 398 pd render _____________________; #X text 288 6 Made by Cyrille Henry 2008 10 24; -#N canvas 452 305 812 549 shader_render 0; +#N canvas 729 308 812 549 shader_render 0; #X obj 315 429 pix_texture; #X obj 67 256 gemframebuffer; -#X obj 67 443 pix_texture; #X obj 67 305 translateXYZ 0 0 -4; -#X obj 67 462 square 4; -#X obj 85 369 loadbang; +#X obj 67 502 square 4; #N canvas 224 312 1052 398 init 0; #X obj 14 130 outlet; #X obj 14 30 inlet; #X obj 14 53 spigot 1; #X obj 31 81 t b; #X msg 67 31 0; -#X msg 14 104 rectangle 1 \, type BYTE \, format RGB32 \, dim 256 256 -; +#X msg 14 104 rectangle 1 \, type BYTE \, format RGB32 \, dim 256 256; #X connect 1 0 2 0; #X connect 2 0 5 0; #X connect 2 0 3 0; @@ -612,8 +597,8 @@ #X restore 113 288 pd init_shader; #X obj 278 25 inlet; #X obj 113 318 outlet; -#X msg 43 143 open interpol.frag; #X msg 135 265 set -1; +#X msg 43 143 open shader/interpol.frag; #X connect 0 0 7 0; #X connect 0 1 9 0; #X connect 1 0 4 0; @@ -621,28 +606,26 @@ #X connect 3 1 1 0; #X connect 4 0 0 0; #X connect 4 0 2 0; -#X connect 5 0 12 0; +#X connect 5 0 13 0; #X connect 6 0 3 0; -#X connect 8 0 12 0; #X connect 8 0 13 0; +#X connect 8 0 12 0; #X connect 9 0 11 0; #X connect 10 0 0 0; -#X connect 12 0 3 0; -#X connect 13 0 9 0; +#X connect 12 0 9 0; +#X connect 13 0 3 0; #X restore 67 175 pd shader; -#X obj 92 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 92 156 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 146 134 t b; #X msg 146 155 texture_mass 1; #N canvas 68 405 301 465 shader 0; #X obj 110 298 pack 0 0; #X obj 131 278 t b f; #X msg 110 321 link \$1 \$2; -#X floatatom 131 259 2 0 0 0 ID - -; -#X floatatom 110 158 2 0 0 0 ID - -; +#X floatatom 131 259 2 0 0 0 ID - - 0; +#X floatatom 110 158 2 0 0 0 ID - - 0; #X obj 128 342 print linking; -#X obj 74 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 74 70 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 38 213 glsl_fragment; #X obj 38 116 glsl_vertex; #X obj 110 135 change; @@ -671,9 +654,9 @@ #X connect 3 0 0 0; #X restore 107 399 pd init_shader; #X obj 107 429 outlet; -#X msg 52 94 open fetching2.vert; -#X msg 48 183 open fetching2.frag; #X msg 132 373 set -1; +#X msg 52 94 open shader/fetching2.vert; +#X msg 48 183 open shader/fetching2.frag; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 1 1 0 1; @@ -681,8 +664,8 @@ #X connect 2 0 11 0; #X connect 3 0 1 0; #X connect 4 0 0 0; -#X connect 6 0 19 0; #X connect 6 0 20 0; +#X connect 6 0 21 0; #X connect 7 0 11 0; #X connect 7 1 10 0; #X connect 8 0 7 0; @@ -694,20 +677,17 @@ #X connect 12 0 6 0; #X connect 13 0 8 0; #X connect 15 0 6 0; -#X connect 15 0 21 0; +#X connect 15 0 19 0; #X connect 16 0 11 0; #X connect 17 0 18 0; -#X connect 19 0 8 0; -#X connect 20 0 7 0; -#X connect 21 0 17 0; +#X connect 19 0 17 0; +#X connect 20 0 8 0; +#X connect 21 0 7 0; #X restore 315 208 pd shader; -#X obj 345 185 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 345 185 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 387 229 t b; -#X obj 315 116 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 147 114 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 315 116 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 147 114 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 163 278 s texture_interpol; #X obj 315 96 r aff_drapeau; #X obj 67 102 gemhead 31; @@ -722,63 +702,61 @@ #X msg 521 258 draw line; #X msg 521 238 draw default; #X msg 522 279 draw point; -#X floatatom 485 203 5 0 0 0 - - -; +#X floatatom 485 203 5 0 0 0 - - - 0; #X obj 485 28 inlet; #X obj 327 365 loadbang; #X obj 67 198 t a b; #X msg 410 185 texture 4; -#X msg 85 396 rectangle 1 \, quality 0; #X obj 637 140 loadbang; #X msg 637 162 15; #X obj 637 184 s \$0-scale; -#X connect 0 0 22 0; -#X connect 1 0 3 0; +#X obj 67 443 pix_texture \; rectangle 1 \; quality 0; +#X connect 0 0 20 0; +#X connect 1 0 2 0; #X connect 1 1 0 1; -#X connect 1 1 2 1; -#X connect 1 1 16 0; -#X connect 2 0 4 0; -#X connect 3 0 2 0; -#X connect 5 0 35 0; -#X connect 6 0 1 0; -#X connect 7 0 33 0; -#X connect 7 1 15 0; -#X connect 8 0 7 1; -#X connect 9 0 10 0; -#X connect 10 0 7 2; -#X connect 11 0 25 0; -#X connect 11 1 13 0; -#X connect 12 0 11 1; -#X connect 13 0 34 0; -#X connect 14 0 19 0; -#X connect 15 0 9 0; -#X connect 17 0 14 0; -#X connect 18 0 7 0; -#X connect 19 0 23 0; -#X connect 20 0 21 0; -#X connect 20 0 12 0; -#X connect 20 0 8 0; -#X connect 21 0 34 0; -#X connect 23 0 11 0; +#X connect 1 1 14 0; +#X connect 1 1 36 1; +#X connect 2 0 36 0; +#X connect 4 0 1 0; +#X connect 5 0 31 0; +#X connect 5 1 13 0; +#X connect 6 0 5 1; +#X connect 7 0 8 0; +#X connect 8 0 5 2; +#X connect 9 0 23 0; +#X connect 9 1 11 0; +#X connect 10 0 9 1; +#X connect 11 0 32 0; +#X connect 12 0 17 0; +#X connect 13 0 7 0; +#X connect 15 0 12 0; +#X connect 16 0 5 0; +#X connect 17 0 21 0; +#X connect 18 0 19 0; +#X connect 18 0 10 0; +#X connect 18 0 6 0; +#X connect 19 0 32 0; +#X connect 21 0 9 0; +#X connect 22 0 0 0; +#X connect 23 0 22 0; #X connect 24 0 0 0; -#X connect 25 0 24 0; -#X connect 26 0 0 0; -#X connect 27 0 22 0; -#X connect 28 0 22 0; -#X connect 29 0 22 0; -#X connect 30 0 24 1; -#X connect 30 0 24 2; -#X connect 30 0 24 3; -#X connect 31 0 30 0; -#X connect 32 0 26 0; -#X connect 33 0 1 0; -#X connect 33 1 6 0; -#X connect 34 0 11 2; -#X connect 35 0 2 0; -#X connect 36 0 37 0; -#X connect 37 0 38 0; +#X connect 25 0 20 0; +#X connect 26 0 20 0; +#X connect 27 0 20 0; +#X connect 28 0 22 1; +#X connect 28 0 22 2; +#X connect 28 0 22 3; +#X connect 29 0 28 0; +#X connect 30 0 24 0; +#X connect 31 0 1 0; +#X connect 31 1 4 0; +#X connect 32 0 9 2; +#X connect 33 0 34 0; +#X connect 34 0 35 0; +#X connect 36 0 3 0; #X restore 27 304 pd shader_render ______________; #X text 12 6 "Potential Flag" \, by Samuel Bianchini; -#X floatatom 606 304 5 0 0 0 - - -; +#X floatatom 606 304 5 0 0 0 - - - 0; #X obj 606 324 * 10; #N canvas 30 53 450 300 Gem.init 0; #X obj 26 3 loadbang; @@ -796,8 +774,7 @@ #X connect 5 0 2 0; #X restore 66 188 pd Gem.init; #N canvas 341 104 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -839,9 +816,8 @@ #X connect 19 0 17 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 47 209 pd gemwin 30; -#X floatatom 210 282 5 0 0 0 scale-> #0-scale -; -#X obj 6 325 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X floatatom 210 282 5 0 0 0 scale-> \$0-scale - 0; +#X obj 6 325 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #N canvas 290 239 395 502 shader_normal 0; #X obj 51 233 gemframebuffer; #X obj 51 347 pix_texture; @@ -854,8 +830,7 @@ #X obj 14 55 spigot 1; #X obj 24 76 b; #X msg 67 31 0; -#X msg 14 114 rectangle 1 \, type BYTE \, format RGB32 \, dim 128 128 -; +#X msg 14 114 rectangle 1 \, type BYTE \, format RGB32 \, dim 128 128; #X connect 1 0 2 0; #X connect 2 0 5 0; #X connect 2 0 3 0; @@ -892,37 +867,35 @@ #X restore 113 498 pd init_shader; #X obj 278 25 inlet; #X obj 113 528 outlet; -#X msg 43 313 open normal.frag; #X obj 32 185 glsl_vertex; #X obj 96 122 t b b; #X obj 126 393 pack f f; #X msg 126 418 link \$1 \$2; -#X msg 42 161 open normal.vert; +#X msg 43 313 open shader/normal.frag; +#X msg 42 161 open shader/normal.vert; #X connect 0 0 6 0; #X connect 0 1 8 0; -#X connect 1 0 14 0; +#X connect 1 0 13 0; #X connect 3 0 0 0; #X connect 3 1 1 0; -#X connect 4 0 13 0; -#X connect 5 0 12 0; -#X connect 7 0 13 0; +#X connect 4 0 12 0; +#X connect 5 0 11 0; +#X connect 7 0 12 0; #X connect 8 0 10 0; #X connect 9 0 0 0; #X connect 11 0 3 0; -#X connect 12 0 3 0; -#X connect 12 1 14 1; -#X connect 13 0 11 0; -#X connect 13 1 16 0; -#X connect 14 0 15 0; -#X connect 15 0 0 0; -#X connect 15 0 2 0; -#X connect 16 0 12 0; +#X connect 11 1 13 1; +#X connect 12 0 15 0; +#X connect 12 1 16 0; +#X connect 13 0 14 0; +#X connect 14 0 0 0; +#X connect 14 0 2 0; +#X connect 15 0 3 0; +#X connect 16 0 11 0; #X restore 51 112 pd shader; -#X obj 76 93 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 76 93 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 143 65 t b; -#X obj 146 45 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 146 45 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 157 252 s texture_normal; #X obj 51 39 gemhead 32; #X obj 78 189 loadbang; @@ -950,8 +923,7 @@ #X connect 15 1 5 0; #X connect 16 0 1 0; #X restore 27 342 pd shader_normal ______________; -#X obj 6 304 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 6 304 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #N canvas 68 153 767 700 \$0-pad 0; #X msg 158 309 clear; #N canvas 6 50 590 367 clear-all 0; @@ -994,7 +966,7 @@ #X obj 384 156 * 90; #X obj 424 112 + 1; #X obj 424 134 / 2; -#X floatatom 173 241 5 0 0 0 - - -; +#X floatatom 173 241 5 0 0 0 - - - 0; #X obj 424 156 * 90; #X connect 0 0 18 2; #X connect 0 0 7 0; @@ -1036,9 +1008,7 @@ #X obj 520 132 symbol pd-\$0-work; #X obj 405 285 append \$0-xy-pad-knob-1 x0 y0 id; #X obj 23 35 struct \$0-xy-pad-knob-1 float x0 float y0 float id; -#X obj 22 81 filledpolygon id 999 1 x0(0:90)(0:90) y0(0:90)(0:90) x0(0:90)(10:100) -y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100) -; +#X obj 22 81 filledpolygon id 999 1 x0(0:90)(0:90) y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100); #X msg 405 261 45 45 \$1; #X connect 0 0 1 0; #X connect 1 0 6 3; @@ -1049,8 +1019,7 @@ y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100) #X connect 6 0 2 0; #X connect 9 0 6 0; #X restore 72 379 pd add-controller; -#X obj 192 391 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 192 391 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 193 370 1; #X obj 72 303 t f b b; #X text 111 233 5/10 red; @@ -1111,10 +1080,9 @@ y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100) #X obj 387 412 pack; #X obj 387 204 t f; #X obj 387 226 clip 0 1; -#X obj 304 74 cnv 10 12 12 empty empty empty 20 12 0 14 -99865 -66577 -0; +#X obj 304 74 cnv 10 12 12 empty empty empty 20 12 0 14 #606060 #404040 0; #N canvas 493 264 450 300 \$0-work 0; -#X scalar 1071-xy-pad-knob-1 45 45 900 \;; +#X scalar 1003-xy-pad-knob-1 45 45 900 \;; #X coords 0 100 100 0 100 100 1; #X restore 260 30 pd \$0-work; #X obj 451 532 wrap; @@ -1184,10 +1152,8 @@ y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100) #X connect 51 0 16 0; #X coords 0 -1 1 1 100 100 2 260 30; #X restore 445 290 pd \$0-pad; -#X obj 445 151 vsl 15 128 0 1 0 0 empty \$0-force force 0 -9 0 10 -262144 --1 -1 0 1; -#X obj 538 152 vsl 15 128 0 1 0 0 empty \$0-direction direction 0 -9 -0 10 -262144 -1 -1 0 1; +#X obj 445 151 vsl 15 128 0 1 0 0 empty \$0-force force 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 538 152 vsl 15 128 0 1 0 0 empty \$0-direction direction 0 -9 0 10 #fcfcfc #000000 #000000 0 1; #N canvas 424 571 337 368 wind-control. 0; #X obj 41 82 pack f f; #X msg 41 104 wind \$1 \$2; @@ -1225,13 +1191,8 @@ y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100) #X connect 15 0 5 0; #X restore 445 397 pd wind-control.; #X text 28 20 Simple version for Gem examples; -#X text 29 34 Did work under Linux \, with Nvidia driver. I don't know -on other OS/hardware.; -#X text 29 72 This patch is quite huge. the GPU compute the position -of 64x92 masses \, and 64x92x12 links at 50x20 Hz. (about 7e+07 links/sec -\, so about 100 time faster than what is currently possible with MSD -on a CPU) (My GPU is old \, this patch performs 10 to 50 times faster -on a good GPU); +#X text 29 34 Did work under Linux \, with Nvidia driver. I don't know on other OS/hardware.; +#X text 29 72 This patch is quite huge. the GPU compute the position of 64x92 masses \, and 64x92x12 links at 50x20 Hz. (about 7e+07 links/sec \, so about 100 time faster than what is currently possible with MSD on a CPU) (My GPU is old \, this patch performs 10 to 50 times faster on a good GPU); #X obj 606 346 s qqt_noise; #X obj 654 13 declare -lib Gem; #X connect 0 0 5 0; diff --git a/examples/10.glsl/11.geometry.pd b/examples/10.glsl/11.geometry.pd index a11d428ac..195e6573b 100644 --- a/examples/10.glsl/11.geometry.pd +++ b/examples/10.glsl/11.geometry.pd @@ -1,42 +1,17 @@ -#N canvas 197 61 552 632 10; +#N canvas 839 124 545 415 10; #X declare -lib Gem; -#X floatatom 132 447 9 0 0 0 ID - -; -#X floatatom 132 279 9 0 0 0 ID - -; -#X obj 150 506 print linking; -#X obj 132 465 pack 0 0 0; -#X floatatom 126 364 9 0 0 0 ID - -; -#X obj 44 139 gemhead; -#X msg 132 485 link \$1 \$2 \$3; -#X obj 44 319 glsl_vertex; -#X obj 44 403 glsl_fragment; -#X obj 44 237 glsl_geometry; -#X obj 44 158 alpha; -#X floatatom 122 531 5 0 0 0 - - -; -#X floatatom 164 531 5 0 0 0 - - -; -#X floatatom 209 532 5 0 0 0 - - -; -#X obj 44 512 glsl_program; -#X obj 182 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 132 258 change; -#X obj 126 341 change; -#X obj 132 426 change; -#X obj 44 552 translateXYZ 0 0 0; +#X obj 44 134 gemhead; +#X obj 44 155 alpha; +#X floatatom 122 281 5 0 0 0 - - - 0; +#X floatatom 164 281 5 0 0 0 - - - 0; +#X floatatom 209 282 5 0 0 0 - - - 0; +#X obj 44 302 translateXYZ 0 0 0; #X obj 44 197 colorRGB 1 1 1; -#X floatatom 128 174 5 0 0 0 - - -; -#X obj 44 177 depth 1; -#X obj 44 576 circle; +#X floatatom 128 174 5 0 0 0 - - - 0; +#X obj 44 176 depth 1; +#X obj 44 326 circle; #X text 184 7 geometry shader; -#X text 48 28 The geometry shader is useful to create new geometry -; -#X text 51 47 Here is an example where 40 circles are draw with 1 single -primitive.; -#X text 49 87 Be aware that the geometry shader is computed after the -vertex shader. coordinate are in 2d.; -#X msg 58 217 open geo.geom; -#X msg 56 299 open geo.vert; -#X msg 57 384 open geo.frag; -#X obj 182 136 loadbang; -#X text 205 155 load shaders; +#X text 48 28 The geometry shader is useful to create new geometry; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; @@ -45,8 +20,7 @@ vertex shader. coordinate are in 2d.; #X connect 1 0 2 0; #X restore 366 247 pd Gem.init; #N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 102 161 r \$0-gemstart; #X obj 102 182 select 1 0; #X msg 102 214 create \, 1; @@ -84,42 +58,18 @@ vertex shader. coordinate are in 2d.; #X connect 16 0 0 0; #X coords 0 -1 1 1 85 40 1 100 100; #X restore 336 264 pd gemwin; -#X msg 233 206 set -1; -#X obj 182 176 t b b b b; #X obj 444 13 declare -lib Gem; -#X connect 0 0 3 0; -#X connect 1 0 3 2; -#X connect 3 0 6 0; -#X connect 4 0 3 1; -#X connect 5 0 10 0; -#X connect 6 0 2 0; -#X connect 6 0 14 0; -#X connect 7 0 8 0; -#X connect 7 1 17 0; -#X connect 8 0 14 0; -#X connect 8 1 18 0; -#X connect 9 0 7 0; -#X connect 9 1 16 0; -#X connect 10 0 22 0; -#X connect 11 0 19 1; -#X connect 12 0 19 2; -#X connect 13 0 19 3; -#X connect 14 0 19 0; -#X connect 15 0 36 0; -#X connect 16 0 1 0; -#X connect 17 0 4 0; -#X connect 18 0 0 0; -#X connect 19 0 23 0; -#X connect 20 0 9 0; -#X connect 21 0 20 2; -#X connect 22 0 20 0; -#X connect 28 0 9 0; -#X connect 29 0 7 0; -#X connect 30 0 8 0; -#X connect 31 0 15 0; -#X connect 33 0 34 0; -#X connect 35 0 18 0; -#X connect 36 0 30 0; -#X connect 36 1 28 0; -#X connect 36 2 29 0; -#X connect 36 3 35 0; +#X obj 44 236 glsl shader/geo; +#X text 51 47 Here is an example where 40 circles are drawn with 1 single primitive.; +#X text 49 87 Be aware that the geometry shader is computed after the vertex shader. coordinates are in 2d.; +#X connect 0 0 1 0; +#X connect 1 0 8 0; +#X connect 2 0 5 1; +#X connect 3 0 5 2; +#X connect 4 0 5 3; +#X connect 5 0 9 0; +#X connect 6 0 15 0; +#X connect 7 0 6 2; +#X connect 8 0 6 0; +#X connect 12 0 13 0; +#X connect 15 0 5 0; diff --git a/examples/10.glsl/12.tri2fan.pd b/examples/10.glsl/12.tri2fan.pd index 84ccdf40e..17512b9dc 100644 --- a/examples/10.glsl/12.tri2fan.pd +++ b/examples/10.glsl/12.tri2fan.pd @@ -1,62 +1,34 @@ -#N canvas 17 61 785 745 10; +#N canvas 606 49 689 596 10; #X declare -lib Gem; -#X floatatom 286 440 9 0 0 0 ID - -; -#X floatatom 249 264 9 0 0 0 ID - -; -#X obj 296 500 print linking; -#X obj 286 458 pack 0 0 0; -#X floatatom 244 350 9 0 0 0 ID - -; -#X obj 161 78 gemhead; -#X msg 286 479 link \$1 \$2 \$3; -#X obj 161 151 alpha; -#X floatatom 202 578 5 0 0 0 - - -; -#X floatatom 244 578 5 0 0 0 - - -; -#X floatatom 289 579 5 0 0 0 - - -; -#X obj 161 526 glsl_program; -#X obj 42 117 t b b b b; -#X msg 286 157 -1; -#X obj 42 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 249 242 change; -#X obj 244 329 change; -#X obj 286 419 change; -#X obj 161 650 t a b; -#X obj 209 650 loadbang; -#X msg 340 672 2; -#X obj 161 217 glsl_geometry; -#X obj 161 307 glsl_vertex; -#X obj 161 394 glsl_fragment; -#X obj 42 76 loadbang; -#X text 65 97 reload; -#X msg 422 113 create \, 1; -#X msg 431 135 destroy; -#X obj 402 654 triangle; -#X msg 473 202 lighting 1; -#X obj 161 627 spigot 1; -#X obj 230 628 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 470 633 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 402 631 spigot 0; -#X msg 460 180 perspec -0.1 0.1 -0.1 0.1 1 110; -#X obj 422 229 gemwin; -#X obj 460 159 loadbang; +#X obj 61 78 gemhead; +#X floatatom 102 348 5 0 0 0 - - - 0; +#X floatatom 144 348 5 0 0 0 - - - 0; +#X floatatom 189 349 5 0 0 0 - - - 0; +#X obj 87 226 bng 15 250 50 0 empty empty reload 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 61 420 t a b; +#X msg 240 484 2; +#X msg 322 113 create \, 1; +#X msg 331 135 destroy; +#X obj 302 424 triangle; +#X obj 61 397 spigot 1; +#X obj 130 398 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 370 403 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 302 401 spigot 0; #N canvas 5 51 877 520 light 0; #X obj 225 45 gemhead 10; -#X floatatom 258 78 5 0 0 0 - - -; -#X floatatom 299 77 5 0 0 0 - - -; -#X floatatom 341 78 5 0 0 0 - - -; +#X floatatom 258 78 5 0 0 0 - - - 0; +#X floatatom 299 77 5 0 0 0 - - - 0; +#X floatatom 341 78 5 0 0 0 - - - 0; #X obj 225 227 world_light; -#X obj 250 151 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 250 151 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 250 172 debug \$1; #X obj 225 103 rotateXYZ 0 30 0; #X obj 27 51 gemhead 10; -#X floatatom 60 84 5 0 0 0 - - -; -#X floatatom 101 83 5 0 0 0 - - -; -#X floatatom 143 84 5 0 0 0 - - -; +#X floatatom 60 84 5 0 0 0 - - - 0; +#X floatatom 101 83 5 0 0 0 - - - 0; +#X floatatom 143 84 5 0 0 0 - - - 0; #X obj 27 233 world_light; -#X obj 48 158 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; +#X obj 48 158 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 48 179 debug \$1; #X obj 27 109 rotateXYZ 0 -90 0; #X msg 297 207 0.8 0.8 0.8; @@ -80,80 +52,44 @@ #X connect 17 0 12 1; #X connect 18 0 17 0; #X connect 18 0 16 0; -#X restore 421 253 pd light; -#X obj 161 595 rotateXYZ -55 20 0; -#X floatatom 298 537 5 0 0 0 - - -; -#X text 235 13 replace triangle with 3 triangles the orientations of -which depend on the normal of the original primitive; -#X obj 161 554 scaleXYZ 0.2 0.2 0.2; -#X msg 172 129 auto 1; -#X obj 172 108 loadbang; -#X msg 176 195 open tri2fan.geom; -#X msg 177 286 open tri2fan.vert; -#X msg 178 370 open tri2fan.frag; -#X obj 161 724 newWave 25 25; -#X msg 209 671 D1 0.01 \, D2 0.1; -#X floatatom 520 593 5 0 25 0 - - -; -#X obj 552 635 pack f f; -#X obj 520 611 t f f; -#X msg 552 655 force \$1 \$2 0.3; -#X obj 674 13 declare -lib Gem; -#X connect 0 0 3 0; -#X connect 1 0 3 2; -#X connect 3 0 6 0; -#X connect 4 0 3 1; -#X connect 5 0 7 0; -#X connect 6 0 2 0; -#X connect 6 0 11 0; -#X connect 7 0 21 0; -#X connect 8 0 38 1; -#X connect 9 0 38 2; -#X connect 10 0 38 3; -#X connect 11 0 41 0; -#X connect 12 0 46 0; -#X connect 12 1 45 0; -#X connect 12 2 44 0; -#X connect 12 3 13 0; -#X connect 13 0 17 0; -#X connect 14 0 12 0; -#X connect 15 0 1 0; -#X connect 16 0 4 0; -#X connect 17 0 0 0; -#X connect 18 0 47 0; -#X connect 18 1 47 0; -#X connect 19 0 48 0; -#X connect 20 0 47 3; -#X connect 21 0 22 0; -#X connect 21 1 15 0; -#X connect 22 0 23 0; -#X connect 22 1 16 0; -#X connect 23 0 11 0; -#X connect 23 1 17 0; -#X connect 24 0 14 0; -#X connect 26 0 35 0; -#X connect 27 0 35 0; -#X connect 29 0 35 0; -#X connect 30 0 18 0; -#X connect 31 0 30 1; -#X connect 32 0 33 1; -#X connect 33 0 28 0; -#X connect 34 0 35 0; -#X connect 36 0 34 0; -#X connect 36 0 29 0; -#X connect 38 0 30 0; -#X connect 38 0 33 0; -#X connect 39 0 41 2; -#X connect 39 0 41 3; -#X connect 39 0 41 1; -#X connect 41 0 38 0; -#X connect 42 0 7 0; -#X connect 43 0 42 0; -#X connect 44 0 21 0; -#X connect 45 0 22 0; -#X connect 46 0 23 0; -#X connect 48 0 47 0; -#X connect 49 0 51 0; -#X connect 50 0 52 0; -#X connect 51 0 50 1; -#X connect 51 1 50 0; -#X connect 52 0 47 0; +#X restore 321 223 pd light; +#X obj 61 365 rotateXYZ -55 20 0; +#X floatatom 198 307 5 0 0 0 - - - 0; +#X text 135 13 replace triangle with 3 triangles the orientations of which depend on the normal of the original primitive; +#X obj 61 324 scaleXYZ 0.2 0.2 0.2; +#X floatatom 450 360 5 0 25 0 - - - 0; +#X obj 452 405 pack f f; +#X obj 450 378 t f f; +#X msg 452 425 force \$1 \$2 0.3; +#X obj 574 13 declare -lib Gem; +#X obj 61 245 glsl shader/tri2fan; +#X obj 61 151 alpha \; auto 1; +#X obj 61 494 newWave 25 25 \; D1 0.01 \; D2 0.1; +#X obj 322 169 gemwin \; perspec -0.1 0.1 -0.1 0.1 1 110 \; lighting 1; +#X connect 0 0 25 0; +#X connect 1 0 15 1; +#X connect 2 0 15 2; +#X connect 3 0 15 3; +#X connect 4 0 24 0; +#X connect 5 0 26 0; +#X connect 5 1 26 0; +#X connect 6 0 26 3; +#X connect 7 0 27 0; +#X connect 8 0 27 0; +#X connect 10 0 5 0; +#X connect 11 0 10 1; +#X connect 12 0 13 1; +#X connect 13 0 9 0; +#X connect 15 0 10 0; +#X connect 15 0 13 0; +#X connect 16 0 18 2; +#X connect 16 0 18 3; +#X connect 16 0 18 1; +#X connect 18 0 15 0; +#X connect 19 0 21 0; +#X connect 20 0 22 0; +#X connect 21 0 20 1; +#X connect 21 1 20 0; +#X connect 22 0 26 0; +#X connect 24 0 18 0; +#X connect 25 0 24 0; diff --git a/examples/10.glsl/13.panoramique.pd b/examples/10.glsl/13.panoramique.pd index 9b1adb29a..6536b8cdb 100644 --- a/examples/10.glsl/13.panoramique.pd +++ b/examples/10.glsl/13.panoramique.pd @@ -1,527 +1,227 @@ -#N canvas 189 90 1107 668 10; +#N canvas 443 115 1107 668 10; #X declare -lib Gem; #X msg 17 131 create \, 1; #X msg 30 154 0 \, destroy; -#X obj 160 445 pix_texture; -#X obj 169 205 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#N canvas 38 51 792 790 glsl 0; -#X obj 78 339 glsl_vertex; -#X msg 32 338 print; -#X obj 78 626 glsl_program; -#X obj 163 555 pack 0 0; -#X msg 30 476 print; -#X obj 163 511 change; -#X obj 150 358 change; -#X msg 163 579 link \$1 \$2; -#X msg 32 620 print; -#X obj 77 490 glsl_fragment; -#X floatatom 163 535 2 0 0 0 ID - -; -#X floatatom 150 381 2 0 0 0 ID - -; -#X obj 181 600 print linking; -#X obj 15 21 inlet; -#X obj 78 662 outlet; -#X obj 577 95 inlet; -#X obj 15 44 route bang; -#X obj 255 11 gemhead 1; -#X msg 255 33 1; -#X obj 255 57 change; -#X obj 255 81 t b; -#X obj 157 647 change; -#X obj 157 668 t b; -#X obj 158 690 outlet; -#X obj 90 426 symbol; -#X obj 90 401 t b; -#X msg 287 598 0; -#X obj 15 65 t b b b; -#X msg 118 307 open panoramique.vert; -#X msg 90 453 open panoramique.frag; -#X connect 0 0 9 0; -#X connect 0 1 6 0; -#X connect 1 0 0 0; -#X connect 2 0 14 0; -#X connect 2 1 21 0; -#X connect 3 0 7 0; -#X connect 4 0 9 0; -#X connect 5 0 10 0; -#X connect 6 0 11 0; -#X connect 6 0 25 0; -#X connect 7 0 2 0; -#X connect 7 0 12 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 9 1 5 0; -#X connect 10 0 3 0; -#X connect 11 0 3 1; -#X connect 13 0 16 0; -#X connect 15 0 2 0; -#X connect 16 0 27 0; -#X connect 16 1 0 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 28 0; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 24 0 29 0; -#X connect 25 0 24 0; -#X connect 26 0 21 0; -#X connect 27 0 10 0; -#X connect 27 1 28 0; -#X connect 27 2 26 0; -#X connect 28 0 0 0; -#X connect 29 0 9 0; -#X restore 160 222 pd glsl; -#X obj 175 285 loadbang; -#X obj 160 328 pix_image; -#X msg 174 419 rectangle 1; -#X obj 174 398 loadbang; -#X obj 160 357 pix_info 0 0 0; -#X msg 238 188 sizeX \$1; -#X msg 253 209 sizeY \$1; -#X obj 353 446 pix_texture; -#X obj 362 206 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#N canvas 38 51 792 790 glsl 0; -#X obj 78 339 glsl_vertex; -#X msg 32 338 print; -#X obj 78 626 glsl_program; -#X obj 163 555 pack 0 0; -#X msg 30 476 print; -#X obj 163 511 change; -#X obj 150 358 change; -#X msg 163 579 link \$1 \$2; -#X msg 32 620 print; -#X obj 77 490 glsl_fragment; -#X floatatom 163 535 2 0 0 0 ID - -; -#X floatatom 150 381 2 0 0 0 ID - -; -#X obj 181 600 print linking; -#X obj 15 21 inlet; -#X obj 78 662 outlet; -#X obj 577 95 inlet; -#X obj 15 44 route bang; -#X obj 255 11 gemhead 1; -#X msg 255 33 1; -#X obj 255 57 change; -#X obj 255 81 t b; -#X obj 157 647 change; -#X obj 157 668 t b; -#X obj 158 690 outlet; -#X obj 90 426 symbol; -#X obj 90 401 t b; -#X msg 287 598 0; -#X obj 15 65 t b b b; -#X msg 118 307 open panoramique.vert; -#X msg 90 453 open panoramique.frag; -#X connect 0 0 9 0; -#X connect 0 1 6 0; -#X connect 1 0 0 0; -#X connect 2 0 14 0; -#X connect 2 1 21 0; -#X connect 3 0 7 0; -#X connect 4 0 9 0; -#X connect 5 0 10 0; -#X connect 6 0 11 0; -#X connect 6 0 25 0; -#X connect 7 0 2 0; -#X connect 7 0 12 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 9 1 5 0; -#X connect 10 0 3 0; -#X connect 11 0 3 1; -#X connect 13 0 16 0; -#X connect 15 0 2 0; -#X connect 16 0 27 0; -#X connect 16 1 0 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 28 0; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 24 0 29 0; -#X connect 25 0 24 0; -#X connect 26 0 21 0; -#X connect 27 0 10 0; -#X connect 27 1 28 0; -#X connect 27 2 26 0; -#X connect 28 0 0 0; -#X connect 29 0 9 0; -#X restore 353 223 pd glsl; -#X obj 368 286 loadbang; -#X obj 353 329 pix_image; -#X msg 367 418 rectangle 1; -#X obj 367 399 loadbang; -#X obj 353 358 pix_info 0 0 0; -#X msg 431 184 sizeX \$1; -#X msg 446 210 sizeY \$1; -#X obj 552 447 pix_texture; -#X obj 561 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#N canvas 38 51 792 790 glsl 0; -#X obj 78 339 glsl_vertex; -#X msg 32 338 print; -#X obj 78 626 glsl_program; -#X obj 163 555 pack 0 0; -#X msg 30 476 print; -#X obj 163 511 change; -#X obj 150 358 change; -#X msg 163 579 link \$1 \$2; -#X msg 32 620 print; -#X obj 77 490 glsl_fragment; -#X floatatom 163 535 2 0 0 0 ID - -; -#X floatatom 150 381 2 0 0 0 ID - -; -#X obj 181 600 print linking; -#X obj 15 21 inlet; -#X obj 78 662 outlet; -#X obj 577 95 inlet; -#X obj 15 44 route bang; -#X obj 255 11 gemhead 1; -#X msg 255 33 1; -#X obj 255 57 change; -#X obj 255 81 t b; -#X obj 157 647 change; -#X obj 157 668 t b; -#X obj 158 690 outlet; -#X obj 90 426 symbol; -#X obj 90 401 t b; -#X msg 287 598 0; -#X obj 15 65 t b b b; -#X msg 118 307 open panoramique.vert; -#X msg 90 453 open panoramique.frag; -#X connect 0 0 9 0; -#X connect 0 1 6 0; -#X connect 1 0 0 0; -#X connect 2 0 14 0; -#X connect 2 1 21 0; -#X connect 3 0 7 0; -#X connect 4 0 9 0; -#X connect 5 0 10 0; -#X connect 6 0 11 0; -#X connect 6 0 25 0; -#X connect 7 0 2 0; -#X connect 7 0 12 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 9 1 5 0; -#X connect 10 0 3 0; -#X connect 11 0 3 1; -#X connect 13 0 16 0; -#X connect 15 0 2 0; -#X connect 16 0 27 0; -#X connect 16 1 0 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 28 0; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 24 0 29 0; -#X connect 25 0 24 0; -#X connect 26 0 21 0; -#X connect 27 0 10 0; -#X connect 27 1 28 0; -#X connect 27 2 26 0; -#X connect 28 0 0 0; -#X connect 29 0 9 0; -#X restore 552 224 pd glsl; -#X obj 567 287 loadbang; -#X obj 552 330 pix_image; -#X msg 566 419 rectangle 1; -#X obj 566 400 loadbang; -#X obj 552 359 pix_info 0 0 0; -#X msg 614 188 sizeX \$1; -#X msg 633 206 sizeY \$1; +#X obj 169 205 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 362 206 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 561 207 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 160 467 translateXYZ -3 0 0; -#X obj 352 466 translateXYZ -1 0 0; -#X obj 551 467 translateXYZ 1 0 0; -#X obj 747 448 pix_texture; -#X obj 756 208 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#N canvas 38 51 792 790 glsl 0; -#X obj 78 339 glsl_vertex; -#X msg 32 338 print; -#X obj 78 626 glsl_program; -#X obj 163 555 pack 0 0; -#X msg 30 476 print; -#X obj 163 511 change; -#X obj 150 358 change; -#X msg 163 579 link \$1 \$2; -#X msg 32 620 print; -#X obj 77 490 glsl_fragment; -#X floatatom 163 535 2 0 0 0 ID - -; -#X floatatom 150 381 2 0 0 0 ID - -; -#X obj 181 600 print linking; -#X obj 15 21 inlet; -#X obj 78 662 outlet; -#X obj 577 95 inlet; -#X obj 15 44 route bang; -#X obj 255 11 gemhead 1; -#X msg 255 33 1; -#X obj 255 57 change; -#X obj 255 81 t b; -#X obj 157 647 change; -#X obj 157 668 t b; -#X obj 158 690 outlet; -#X obj 90 426 symbol; -#X obj 90 401 t b; -#X msg 287 598 0; -#X obj 15 65 t b b b; -#X msg 118 307 open panoramique.vert; -#X msg 90 452 open panoramique.frag; -#X connect 0 0 9 0; -#X connect 0 1 6 0; -#X connect 1 0 0 0; -#X connect 2 0 14 0; -#X connect 2 1 21 0; -#X connect 3 0 7 0; -#X connect 4 0 9 0; -#X connect 5 0 10 0; -#X connect 6 0 11 0; -#X connect 6 0 25 0; -#X connect 7 0 2 0; -#X connect 7 0 12 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 9 1 5 0; -#X connect 10 0 3 0; -#X connect 11 0 3 1; -#X connect 13 0 16 0; -#X connect 15 0 2 0; -#X connect 16 0 27 0; -#X connect 16 1 0 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 28 0; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 24 0 29 0; -#X connect 25 0 24 0; -#X connect 26 0 21 0; -#X connect 27 0 10 0; -#X connect 27 1 28 0; -#X connect 27 2 26 0; -#X connect 28 0 0 0; -#X connect 29 0 9 0; -#X restore 747 225 pd glsl; -#X obj 762 288 loadbang; -#X obj 747 331 pix_image; -#X msg 761 420 rectangle 1; -#X obj 761 401 loadbang; -#X obj 747 360 pix_info 0 0 0; -#X msg 825 186 sizeX \$1; -#X msg 840 212 sizeY \$1; -#X obj 746 468 translateXYZ 3 0 0; -#X floatatom 199 108 5 0 0 0 - - -; -#X msg 199 127 dZ \$1; -#X obj 17 470 s shaders; -#X obj 206 245 s init_shader; -#X obj 399 244 s init_shader; -#X obj 600 244 s init_shader; -#X obj 794 246 s init_shader; -#X obj 399 164 r shaders; -#X obj 598 166 r shaders; -#X obj 793 167 r shaders; +#X obj 353 466 translateXYZ -1 0 0; +#X obj 552 467 translateXYZ 1 0 0; +#X obj 756 208 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 747 468 translateXYZ 3 0 0; +#X floatatom 199 158 5 0 0 0 - - - 0; +#X msg 199 177 dZ \$1; +#X obj 18 470 s shaders; +#X obj 399 214 r shaders; +#X obj 598 216 r shaders; +#X obj 793 217 r shaders; #X obj 160 546 rectangle 1 0.75; -#X obj 352 547 rectangle 1 0.75; -#X obj 551 548 rectangle 1 0.75; -#X obj 746 549 rectangle 1 0.75; +#X obj 353 547 rectangle 1 0.75; +#X obj 552 548 rectangle 1 0.75; +#X obj 747 549 rectangle 1 0.75; #X obj 160 503 translateXYZ 0 0 0; -#X obj 201 486 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 0.12 256; -#X obj 259 486 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 -0.06 256; -#X obj 352 505 translateXYZ 0 0 0; -#X obj 393 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 0 256; -#X obj 451 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 0 256; -#X obj 551 506 translateXYZ 0 0 0; -#X obj 592 489 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 -0.11 256; -#X obj 650 489 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 -0.03 256; -#X obj 746 505 translateXYZ 0 0 0; -#X obj 787 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 -0.18 256; -#X obj 845 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 -0.05 256; -#X obj 160 10 gemhead 10; +#X obj 201 486 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0.12 256; +#X obj 259 486 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 -0.06 256; +#X obj 353 505 translateXYZ 0 0 0; +#X obj 394 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 452 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 552 506 translateXYZ 0 0 0; +#X obj 593 489 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 -0.11 256; +#X obj 651 489 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 -0.03 256; +#X obj 747 505 translateXYZ 0 0 0; +#X obj 788 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 -0.18 256; +#X obj 846 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 -0.05 256; +#X obj 160 11 gemhead 10; #X obj 353 11 gemhead 20; -#X obj 552 12 gemhead 30; -#X obj 747 13 gemhead 40; -#X obj 160 144 alpha; -#X obj 353 143 alpha; -#X obj 552 139 alpha; -#X obj 747 142 alpha; -#X msg 256 153 ShadeL \$1; -#X obj 199 65 r init_shader; -#X obj 256 132 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 0 256; -#X msg 447 133 ShadeL \$1; -#X obj 447 112 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 39 256; -#X msg 634 135 ShadeL \$1; -#X obj 634 114 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 35 256; -#X msg 831 133 ShadeL \$1; -#X obj 831 112 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 23 256; +#X obj 552 11 gemhead 30; +#X obj 747 11 gemhead 40; +#X obj 160 53 alpha; +#X obj 353 53 alpha; +#X obj 552 53 alpha; +#X obj 747 53 alpha; +#X msg 276 183 ShadeL \$1; +#X obj 199 115 r init_shader; +#X obj 276 162 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 256; +#X msg 447 183 ShadeL \$1; +#X obj 447 162 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 39 256; +#X msg 634 185 ShadeL \$1; +#X obj 634 164 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 35 256; +#X msg 831 183 ShadeL \$1; +#X obj 831 162 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 23 256; #X msg 212 526 -1; #X msg 269 525 -0.75; #X text 163 526 invert; -#X msg 406 525 -1; -#X msg 463 524 -0.75; -#X text 357 525 invert; -#X msg 605 528 -1; -#X msg 662 527 -0.75; -#X text 556 528 invert; -#X msg 800 529 -1; -#X msg 857 528 -0.75; -#X text 751 529 invert; -#X obj 17 258 gemwin; -#X obj 37 208 loadbang; +#X msg 407 525 -1; +#X msg 464 524 -0.75; +#X text 358 525 invert; +#X msg 606 528 -1; +#X msg 663 527 -0.75; +#X text 557 528 invert; +#X msg 801 529 -1; +#X msg 858 528 -0.75; +#X text 752 529 invert; #X obj 160 32 scaleXYZ 4 4 1; #X obj 353 32 scaleXYZ 4 4 1; -#X obj 552 36 scaleXYZ 4 4 1; -#X obj 747 35 scaleXYZ 4 4 1; -#X text 21 588 This patch allow multiples images to be assembled in -order to create a panoramic image.; -#X text 20 615 A shader distord the image to correct distance distortion -\, and allow a fade between 2 images; +#X obj 552 32 scaleXYZ 4 4 1; +#X obj 747 32 scaleXYZ 4 4 1; +#X text 21 588 This patch allow multiples images to be assembled in order to create a panoramic image.; +#X text 20 615 A shader distord the image to correct distance distortion \, and allow a fade between 2 images; #X text 17 642 "dz" depend on the angles between images.; #X text 462 619 copyright cyrille Henry and iem.; -#X text 463 636 This development was supported by the COMEDIA project -; -#X floatatom 18 394 5 0 0 0 - - -; -#X msg 18 413 dZ \$1; -#X obj 18 351 r init_shader; -#X msg 18 373 1.62; -#X msg 199 87 1.38; -#X msg 37 232 dimen 1024 256; -#X msg 177 304 thread 0 \, open cam1.jpg; -#X msg 370 305 thread 0 \, open cam2.jpg; -#X msg 569 306 thread 0 \, open cam3.jpg; -#X msg 764 307 thread 0 \, open cam4.jpg; +#X text 463 636 This development was supported by the COMEDIA project; +#X floatatom 18 424 5 0 0 0 - - - 0; +#X msg 18 443 dZ \$1; +#X obj 18 381 r init_shader; +#X msg 18 403 1.62; +#X msg 199 137 1.38; #X obj 964 623 declare -lib Gem; -#X connect 0 0 101 0; -#X connect 1 0 101 0; -#X connect 2 0 32 0; -#X connect 3 0 4 0; -#X connect 4 0 6 0; -#X connect 4 1 49 0; -#X connect 4 1 82 0; -#X connect 5 0 118 0; -#X connect 6 0 9 0; -#X connect 7 0 2 0; -#X connect 8 0 7 0; -#X connect 9 0 2 0; -#X connect 9 1 10 0; -#X connect 9 2 11 0; -#X connect 10 0 4 1; -#X connect 11 0 4 1; -#X connect 12 0 33 0; -#X connect 13 0 14 0; -#X connect 14 0 16 0; -#X connect 14 1 50 0; -#X connect 14 1 84 0; -#X connect 15 0 119 0; -#X connect 16 0 19 0; -#X connect 17 0 12 0; -#X connect 18 0 17 0; -#X connect 19 0 12 0; -#X connect 19 1 20 0; -#X connect 19 2 21 0; -#X connect 20 0 14 1; -#X connect 21 0 14 1; -#X connect 22 0 34 0; -#X connect 23 0 24 0; -#X connect 24 0 26 0; -#X connect 24 1 51 0; -#X connect 24 1 86 0; -#X connect 25 0 120 0; -#X connect 26 0 29 0; -#X connect 27 0 22 0; -#X connect 28 0 27 0; -#X connect 29 0 22 0; -#X connect 29 1 30 0; -#X connect 29 2 31 0; -#X connect 30 0 24 1; -#X connect 31 0 24 1; -#X connect 32 0 60 0; -#X connect 33 0 63 0; -#X connect 34 0 66 0; -#X connect 35 0 45 0; -#X connect 36 0 37 0; -#X connect 37 0 39 0; -#X connect 37 1 52 0; -#X connect 37 1 88 0; -#X connect 38 0 121 0; -#X connect 39 0 42 0; -#X connect 40 0 35 0; -#X connect 41 0 40 0; -#X connect 42 0 35 0; -#X connect 42 1 43 0; -#X connect 42 2 44 0; -#X connect 43 0 37 1; -#X connect 44 0 37 1; -#X connect 45 0 69 0; -#X connect 46 0 47 0; -#X connect 47 0 4 1; -#X connect 53 0 14 1; -#X connect 54 0 24 1; -#X connect 55 0 37 1; -#X connect 60 0 56 0; -#X connect 61 0 60 1; -#X connect 62 0 60 2; -#X connect 63 0 57 0; -#X connect 64 0 63 1; -#X connect 65 0 63 2; -#X connect 66 0 58 0; -#X connect 67 0 66 1; -#X connect 68 0 66 2; -#X connect 69 0 59 0; -#X connect 70 0 69 1; -#X connect 71 0 69 2; -#X connect 72 0 103 0; -#X connect 73 0 104 0; -#X connect 74 0 105 0; -#X connect 75 0 106 0; -#X connect 76 0 4 0; -#X connect 77 0 14 0; -#X connect 78 0 24 0; -#X connect 79 0 37 0; -#X connect 80 0 4 1; -#X connect 81 0 116 0; -#X connect 82 0 80 0; -#X connect 83 0 14 1; -#X connect 84 0 83 0; -#X connect 85 0 24 1; -#X connect 86 0 85 0; -#X connect 87 0 37 1; -#X connect 88 0 87 0; -#X connect 89 0 56 1; -#X connect 90 0 56 2; -#X connect 92 0 57 1; -#X connect 93 0 57 2; -#X connect 95 0 58 1; -#X connect 96 0 58 2; -#X connect 98 0 59 1; -#X connect 99 0 59 2; -#X connect 102 0 117 0; -#X connect 103 0 76 0; -#X connect 104 0 77 0; -#X connect 105 0 78 0; -#X connect 106 0 79 0; -#X connect 112 0 113 0; -#X connect 113 0 48 0; -#X connect 114 0 115 0; -#X connect 115 0 112 0; -#X connect 116 0 46 0; -#X connect 117 0 101 0; -#X connect 118 0 6 0; -#X connect 119 0 16 0; -#X connect 120 0 26 0; -#X connect 121 0 39 0; +#X obj 160 243 glsl shader/panoramique; +#X obj 19 312 loadbang; +#X obj 19 335 s init_shader; +#X obj 353 243 glsl shader/panoramique; +#X obj 552 244 glsl shader/panoramique; +#X obj 747 245 glsl shader/panoramique; +#N canvas 735 461 450 300 getdimen 0; +#X obj 49 37 inlet; +#X obj 49 60 pix_info -m; +#X obj 49 83 outlet; +#X obj 140 60 route dimen; +#X obj 140 106 outlet; +#X msg 140 83 sizeX \$1 \, sizeY \$2; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 3 0 5 0; +#X connect 5 0 4 0; +#X restore 160 357 pd getdimen; +#N canvas 735 461 450 300 getdimen 0; +#X obj 49 37 inlet; +#X obj 49 60 pix_info -m; +#X obj 49 83 outlet; +#X obj 140 60 route dimen; +#X obj 140 106 outlet; +#X msg 140 83 sizeX \$1 \, sizeY \$2; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 3 0 5 0; +#X connect 5 0 4 0; +#X restore 552 359 pd getdimen; +#N canvas 735 461 450 300 getdimen 0; +#X obj 49 37 inlet; +#X obj 49 60 pix_info -m; +#X obj 49 83 outlet; +#X obj 140 60 route dimen; +#X obj 140 106 outlet; +#X msg 140 83 sizeX \$1 \, sizeY \$2; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 3 0 5 0; +#X connect 5 0 4 0; +#X restore 747 360 pd getdimen; +#N canvas 735 461 450 300 getdimen 0; +#X obj 49 37 inlet; +#X obj 49 60 pix_info -m; +#X obj 49 83 outlet; +#X obj 140 60 route dimen; +#X obj 140 106 outlet; +#X msg 140 83 sizeX \$1 \, sizeY \$2; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 3 0 5 0; +#X connect 5 0 4 0; +#X restore 353 358 pd getdimen; +#X obj 160 308 pix_image \; thread 0 \; open ../data/cam1.jpg; +#X obj 353 309 pix_image \; thread 0 \; open ../data/cam2.jpg; +#X obj 552 310 pix_image \; thread 0 \; open ../data/cam3.jpg; +#X obj 747 311 pix_image \; thread 0 \; open ../data/cam4.jpg; +#X obj 160 425 pix_texture \; rectangle 1; +#X obj 353 426 pix_texture \; rectangle 1; +#X obj 552 427 pix_texture \; rectangle 1; +#X obj 747 428 pix_texture \; rectangle 1; +#X obj 17 258 gemwin \; dimen 1024 256; +#X connect 0 0 94 0; +#X connect 1 0 94 0; +#X connect 2 0 76 0; +#X connect 3 0 79 0; +#X connect 4 0 80 0; +#X connect 5 0 20 0; +#X connect 6 0 23 0; +#X connect 7 0 26 0; +#X connect 8 0 81 0; +#X connect 9 0 29 0; +#X connect 10 0 11 0; +#X connect 11 0 76 1; +#X connect 13 0 79 1; +#X connect 14 0 80 1; +#X connect 15 0 81 1; +#X connect 20 0 16 0; +#X connect 21 0 20 1; +#X connect 22 0 20 2; +#X connect 23 0 17 0; +#X connect 24 0 23 1; +#X connect 25 0 23 2; +#X connect 26 0 18 0; +#X connect 27 0 26 1; +#X connect 28 0 26 2; +#X connect 29 0 19 0; +#X connect 30 0 29 1; +#X connect 31 0 29 2; +#X connect 32 0 61 0; +#X connect 33 0 62 0; +#X connect 34 0 63 0; +#X connect 35 0 64 0; +#X connect 36 0 76 0; +#X connect 37 0 79 0; +#X connect 38 0 80 0; +#X connect 39 0 81 0; +#X connect 40 0 76 1; +#X connect 41 0 74 0; +#X connect 42 0 40 0; +#X connect 43 0 79 1; +#X connect 44 0 43 0; +#X connect 45 0 80 1; +#X connect 46 0 45 0; +#X connect 47 0 81 1; +#X connect 48 0 47 0; +#X connect 49 0 16 1; +#X connect 50 0 16 2; +#X connect 52 0 17 1; +#X connect 53 0 17 2; +#X connect 55 0 18 1; +#X connect 56 0 18 2; +#X connect 58 0 19 1; +#X connect 59 0 19 2; +#X connect 61 0 36 0; +#X connect 62 0 37 0; +#X connect 63 0 38 0; +#X connect 64 0 39 0; +#X connect 70 0 71 0; +#X connect 71 0 12 0; +#X connect 72 0 73 0; +#X connect 73 0 70 0; +#X connect 74 0 10 0; +#X connect 76 0 86 0; +#X connect 77 0 78 0; +#X connect 79 0 87 0; +#X connect 80 0 88 0; +#X connect 81 0 89 0; +#X connect 82 0 90 0; +#X connect 82 1 76 1; +#X connect 83 0 92 0; +#X connect 83 1 80 1; +#X connect 84 0 93 0; +#X connect 84 1 81 1; +#X connect 85 0 91 0; +#X connect 85 1 79 1; +#X connect 86 0 82 0; +#X connect 87 0 85 0; +#X connect 88 0 83 0; +#X connect 89 0 84 0; +#X connect 90 0 5 0; +#X connect 91 0 6 0; +#X connect 92 0 7 0; +#X connect 93 0 9 0; diff --git a/examples/10.glsl/14.blur.pd b/examples/10.glsl/14.blur.pd index e2c7905ef..30473a310 100644 --- a/examples/10.glsl/14.blur.pd +++ b/examples/10.glsl/14.blur.pd @@ -4,49 +4,45 @@ #X obj 16 130 gemframebuffer; #X obj 129 13 loadbang; #X obj 16 185 translateXYZ 0 0 -4; -#X obj 14 283 cnv 15 125 200 empty empty empty 20 12 0 14 -228856 -66577 -0; -#X floatatom 82 334 5 0 0 0 - - -; +#X obj 14 283 cnv 15 125 200 empty empty empty 20 12 0 14 #dcdcdc #404040 0; +#X floatatom 82 334 5 0 0 0 - - - 0; #X obj 16 362 rotateXYZ 30 30 0; #X obj 16 385 colorRGB 1 0 1; #X obj 16 408 teapot 1.5; #N canvas 385 358 230 231 shunt 0; -#X obj 171 17 inlet; -#X obj 72 67 * -1; -#X obj 72 91 + 1; +#X obj 154 17 inlet; #X obj 27 17 inlet; #X obj 27 200 outlet; #X obj 126 197 outlet; #X obj 27 117 spigot 1; #X obj 126 115 spigot 0; -#X connect 0 0 1 0; -#X connect 0 0 7 1; -#X connect 1 0 2 0; -#X connect 2 0 6 1; -#X connect 3 0 6 0; -#X connect 3 0 7 0; -#X connect 6 0 4 0; -#X connect 7 0 5 0; +#X obj 72 87 == 0; +#X obj 171 87 == 1; +#X obj 144 40 t f f; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 1 0 5 0; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 0 4 1; +#X connect 7 0 5 1; +#X connect 8 0 6 0; +#X connect 8 1 7 0; #X restore 16 223 pd shunt; -#X obj 81 224 tgl 15 0 empty empty empty 17 7 0 10 -257985 -1 -1 0 -1; -#X obj 162 283 cnv 15 125 200 empty empty empty 20 12 0 14 -228856 --66577 0; +#X obj 81 224 tgl 15 0 empty empty empty 17 7 0 10 #f8fc00 #000000 #000000 0 1; +#X obj 162 283 cnv 15 125 200 empty empty empty 20 12 0 14 #dcdcdc #404040 0; #X obj 169 385 colorRGB 1 1 0; #X text 76 286 Scene A; #X text 223 287 Scene B; #X text 105 223 Scene A / Scene B; #X obj 169 360 rotateXYZ 0 0 45; #X obj 169 463 square 2.8; -#X floatatom 197 409 5 0 0 0 - - -; +#X floatatom 197 409 5 0 0 0 - - - 0; #X obj 169 429 translateXYZ; #X obj 129 54 s to_fb; #X obj 30 103 r to_fb; #X msg 129 34 dimen 500 500 \, rectangle 0; -#X obj 327 379 pix_texture; -#X obj 327 399 square 4; -#X msg 344 358 quality 1 \, rectangle 0; -#X obj 344 337 loadbang; +#X obj 327 429 square 4; #X obj 327 309 gemhead 99; #N canvas 70 136 503 739 14_pass_blur 0; #X obj 87 102 inlet; @@ -82,13 +78,13 @@ #X connect 15 0 14 0; #X restore 114 149 pd 14_pass_blur; #X obj 557 245 pack f f; -#X obj 557 264 s motion_blur; +#X obj 557 265 s motion_blur; #X obj 575 205 cos; #X obj 557 151 / 500; #X obj 557 171 t f f; #X obj 610 226 *; #X obj 628 205 sin; -#X floatatom 596 129 5 0 6.28 0 - - -; +#X floatatom 596 129 5 0 6.28 0 - - - 0; #X obj 596 150 t b f; #N canvas 0 22 454 304 gemwin 0; #X obj 132 136 gemwin; @@ -102,8 +98,7 @@ #N canvas 87 154 850 451 Gem.init 0; #X obj 59 46 loadbang; #X obj 119 130 outlet; -#X msg 118 81 reset \, dimen 500 500 \, lighting 1 \, title blur \, -frame 20 \,; +#X msg 118 81 reset \, dimen 500 500 \, lighting 1 \, title blur \, frame 20 \,; #X connect 0 0 2 0; #X connect 2 0 1 0; #X restore 289 80 pd Gem.init; @@ -122,24 +117,21 @@ frame 20 \,; #X connect 10 0 9 0; #X restore 17 32 pd gemwin; #X msg 17 8 create; -#X obj 383 89 cnv 15 150 25 empty empty empty 20 12 0 14 -257985 -66577 -0; -#X obj 392 95 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; +#X obj 383 89 cnv 15 150 25 empty empty empty 20 12 0 14 #f8fc00 #404040 0; +#X obj 392 95 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 #fcfcfc #000000 #000000 0 1; #X obj 389 140 s blur; #X obj 389 115 / 500; #X text 389 69 blur; -#X obj 551 91 cnv 15 150 25 empty empty empty 20 12 0 14 -257985 -66577 -0; -#X obj 560 97 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; +#X obj 551 91 cnv 15 150 25 empty empty empty 20 12 0 14 #f8fc00 #404040 0; +#X obj 560 97 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 #fcfcfc #000000 #000000 0 1; #X text 556 67 motion blur; #X obj 557 226 * 1; #X text 640 129 angle (radian); #X obj 663 7 declare -lib Gem; +#X obj 327 379 pix_texture \; quality 1 \; rectangle 0; #X connect 0 0 1 0; #X connect 1 0 3 0; -#X connect 1 1 28 0; +#X connect 1 1 25 0; #X connect 2 0 22 0; #X connect 3 0 9 0; #X connect 5 0 6 2; @@ -155,25 +147,23 @@ frame 20 \,; #X connect 19 0 17 0; #X connect 21 0 1 0; #X connect 22 0 20 0; -#X connect 23 0 24 0; -#X connect 25 0 23 0; -#X connect 26 0 25 0; -#X connect 27 0 23 0; -#X connect 28 0 23 1; +#X connect 24 0 48 0; +#X connect 25 0 48 1; +#X connect 26 0 27 0; +#X connect 28 0 45 1; #X connect 29 0 30 0; -#X connect 31 0 48 1; -#X connect 32 0 33 0; -#X connect 33 0 48 0; -#X connect 33 1 34 0; -#X connect 34 0 29 1; -#X connect 35 0 34 1; -#X connect 36 0 37 0; -#X connect 37 0 32 0; -#X connect 37 1 35 0; -#X connect 37 1 31 0; -#X connect 38 0 39 0; -#X connect 39 0 38 0; -#X connect 41 0 43 0; -#X connect 43 0 42 0; -#X connect 46 0 32 0; -#X connect 48 0 29 0; +#X connect 30 0 45 0; +#X connect 30 1 31 0; +#X connect 31 0 26 1; +#X connect 32 0 31 1; +#X connect 33 0 34 0; +#X connect 34 0 29 0; +#X connect 34 1 32 0; +#X connect 34 1 28 0; +#X connect 35 0 36 0; +#X connect 36 0 35 0; +#X connect 38 0 40 0; +#X connect 40 0 39 0; +#X connect 43 0 29 0; +#X connect 45 0 26 0; +#X connect 48 0 23 0; diff --git a/examples/10.glsl/15.bicubic_image_interpolation.pd b/examples/10.glsl/15.bicubic_image_interpolation.pd index dd0d6de92..4a86b8fae 100644 --- a/examples/10.glsl/15.bicubic_image_interpolation.pd +++ b/examples/10.glsl/15.bicubic_image_interpolation.pd @@ -1,4 +1,4 @@ -#N canvas 22 145 681 529 10; +#N canvas 615 231 681 529 10; #X declare -lib Gem; #X obj 232 189 gemhead; #X obj 232 356 pix_noise 5 5; @@ -6,44 +6,38 @@ #X obj 232 465 square 4; #X msg 240 403 rectangle 1; #X obj 240 382 loadbang; -#X obj 242 222 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X floatatom 250 272 5 0 0 0 - - -; +#X obj 242 222 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X floatatom 250 272 5 0 0 0 - - - 0; #X obj 35 196 gemwin; #X msg 250 334 set \$1 \$2; #X obj 250 314 pack f f; #X obj 303 288 t b f; -#X floatatom 303 271 5 0 0 0 - - -; +#X floatatom 303 271 5 0 0 0 - - - 0; #X msg 35 151 create \, 1; #X msg 42 173 0 \, destroy; -#X obj 232 243 _glsl bicubic_interpolation; -#X obj 436 191 gemhead; +#X obj 366 189 gemhead; #X msg 358 408 quality \$1; -#X obj 358 389 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; -#X obj 33 246 vradio 15 1 1 3 empty empty empty 0 -8 0 10 -262144 -1 --1 1; +#X obj 358 389 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 33 246 vradio 15 1 1 3 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 1; #X text 53 246 bicubic interpolation; #X text 53 264 bilinear interpolation; #X text 55 276 no interpolation; #X obj 33 304 s sel_interpolation; #X obj 232 169 == 0; #X obj 232 149 r sel_interpolation; -#X obj 436 152 r sel_interpolation; -#X obj 436 172 != 0; +#X obj 366 149 r sel_interpolation; +#X obj 366 169 != 0; #X obj 358 369 != 2; #X obj 358 349 r sel_interpolation; -#X text 46 16 This example use shader in order to compute a bicubic -image interpolation. Bicubic interpolation offer a smoother surface -than obtain with bilinear interpolation. But since it need 16 sample -to compute the interpolation \, it is quite slow.; +#X text 46 16 This example use shader in order to compute a bicubic image interpolation. Bicubic interpolation offer a smoother surface than obtain with bilinear interpolation. But since it need 16 sample to compute the interpolation \, it is quite slow.; #X obj 563 7 declare -lib Gem; -#X connect 0 0 15 0; +#X obj 232 243 glsl shader/bicubic_interpolation; +#X connect 0 0 31 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 4 0 2 0; #X connect 5 0 4 0; -#X connect 6 0 15 0; +#X connect 6 0 31 0; #X connect 7 0 10 0; #X connect 9 0 1 0; #X connect 10 0 9 0; @@ -53,13 +47,13 @@ to compute the interpolation \, it is quite slow.; #X connect 13 0 8 0; #X connect 14 0 8 0; #X connect 15 0 1 0; -#X connect 16 0 1 0; -#X connect 17 0 2 0; -#X connect 18 0 17 0; -#X connect 19 0 23 0; -#X connect 24 0 0 0; -#X connect 25 0 24 0; -#X connect 26 0 27 0; -#X connect 27 0 16 0; -#X connect 28 0 18 0; -#X connect 29 0 28 0; +#X connect 16 0 2 0; +#X connect 17 0 16 0; +#X connect 18 0 22 0; +#X connect 23 0 0 0; +#X connect 24 0 23 0; +#X connect 25 0 26 0; +#X connect 26 0 15 0; +#X connect 27 0 17 0; +#X connect 28 0 27 0; +#X connect 31 0 1 0; diff --git a/examples/10.glsl/16.vertexbuffer_attributes.pd b/examples/10.glsl/16.vertexbuffer_attributes.pd index 563d0978d..37e21302d 100644 --- a/examples/10.glsl/16.vertexbuffer_attributes.pd +++ b/examples/10.glsl/16.vertexbuffer_attributes.pd @@ -1,4 +1,4 @@ -#N canvas 375 67 860 713 10; +#N canvas 546 139 729 807 10; #X declare -lib Gem; #N canvas 1 89 450 300 fps 0; #X obj 46 -61 gemhead; @@ -17,8 +17,8 @@ #X connect 4 0 3 0; #X connect 6 0 7 0; #X connect 7 0 5 0; -#X restore 806 149 pd fps; -#X floatatom 806 172 5 0 0 1 fps - -; +#X restore 616 149 pd fps; +#X floatatom 616 172 5 0 0 1 fps - - 0; #N canvas 5 76 450 300 gemwin 0; #X obj 132 246 gemwin; #X obj 67 89 outlet; @@ -54,74 +54,37 @@ #X connect 13 0 14 0; #X connect 13 1 12 0; #X connect 14 0 15 0; -#X restore 577 115 pd gemwin; -#X msg 577 96 create; -#X text 573 75 Create window:; -#X msg 184 350 link \$1 \$2; -#X obj 154 264 glsl_vertex; -#X obj 154 307 glsl_fragment; -#X obj 168 150 loadbang; -#X obj 154 399 glsl_program; -#X obj 154 673 gemvertexbuffer; +#X restore 387 115 pd gemwin; +#X msg 387 95 create; +#X text 383 75 Create window:; #X obj 154 116 gemhead; -#X obj 36 403 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 36 403 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 1 1; #X msg 36 433 position_enable \$1; -#X msg 105 366 print; -#X msg 101 278 print; -#X msg 103 233 print; -#X obj 246 548 cnv 15 90 40 empty empty empty 20 12 0 14 -204786 -66577 -0; -#X msg 255 559 program \$1; -#X obj 30 544 cnv 15 120 70 empty empty empty 20 12 0 14 -204786 -66577 -0; +#X obj 277 548 cnv 15 90 40 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X msg 286 559 program \$1; +#X obj 30 544 cnv 15 120 70 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; #X msg 39 583 print_attributes; #X msg 38 556 reset_attributes; -#X obj 27 487 cnv 15 140 40 empty empty empty 20 12 0 14 -204786 -66577 -0; -#X obj 36 465 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 27 487 cnv 15 140 40 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X obj 36 465 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 1 1; #X msg 36 498 attribute_enable \$1; -#X msg 223 475 position \$1_position \, attribute LightPosition \$1_LightPosition -\, attribute BrickColor \$1_BrickColor \, attribute MortarColor \$1_MortarColor -\, attribute BrickSize \$1_BrickSize \, attribute BrickPct \$1_BrickPct -; -#X obj 224 612 loadbang; -#X msg 224 629 resize 16 \, draw quad; -#X text 378 629 4 quads; -#X obj 168 179 t b b; -#X obj 223 421 t b f; #X text 406 232 syntax:; -#X text 339 559 <----- essential for lookup functions; +#X text 370 559 <----- essential for lookup functions; #X text 406 248 attribute ; -#X obj 358 431 print linking; -#X obj 184 372 t a a; #N canvas 359 182 450 300 tables 0; #N canvas 81 49 460 613 load_tables 0; #X obj 39 17 loadbang; -#X msg 39 106 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 -1 0.5 0.5 0 0.5 0.6 0 0.5 0.6 0 0.5 0.6 0 0.5 0.6 1 1 1 1 1 1 1 1 1 -1 1 1; +#X msg 39 106 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 0 0.5 0.6 0 0.5 0.6 0 0.5 0.6 0 0.5 0.6 1 1 1 1 1 1 1 1 1 1 1 1; #X obj 39 149 s \$0_BrickColor; -#X msg 39 170 0 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 -0.92 0.9 0.92 0.9 0.82 0.7 0.82 0.7 0.82 0.7 0.82 0.7 0.92 0.9 0.92 -0.9 0.92 0.9 0.92 0.9; +#X msg 39 170 0 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9 0.82 0.7 0.82 0.7 0.82 0.7 0.82 0.7 0.92 0.9 0.92 0.9 0.92 0.9 0.92 0.9; #X obj 39 213 s \$0_BrickPct; -#X msg 39 266 0 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 -0.32 0.2 0.32 0.2 0.92 0.45 0.92 0.45 0.92 0.45 0.92 0.45 0.62 0.2 -0.62 0.2 0.62 0.2 0.62 0.2; +#X msg 39 266 0 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.32 0.2 0.92 0.45 0.92 0.45 0.92 0.45 0.92 0.45 0.62 0.2 0.62 0.2 0.62 0.2 0.62 0.2; #X obj 39 309 s \$0_BrickSize; -#X msg 39 357 0 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 --3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 3.5 -6 -0.4 3.5 -6 -0.4 3.5 -6 -0.4 -3.5 -6 -0.4 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2; +#X msg 39 357 0 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 3.5 -6 -0.4 3.5 -6 -0.4 3.5 -6 -0.4 3.5 -6 -0.4 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2 -3 -1 -0.2; #X obj 39 400 s \$0_LightPosition; -#X msg 39 505 0 -3.25 3.25 0 -0.75 3.25 0 -0.75 0.75 0 -3.25 0.75 0 -0.75 3.25 0 3.25 3.25 0 3.25 0.75 0 0.75 0.75 0 0.75 -0.75 0 3.25 -0.75 -0 3.25 -3.25 0 0.75 -3.25 0 -3.25 -0.75 0 -0.75 -0.75 0 -0.75 -3.25 -0 -3.25 -3.25 0; +#X msg 39 505 0 -3.25 3.25 0 -0.75 3.25 0 -0.75 0.75 0 -3.25 0.75 0 0.75 3.25 0 3.25 3.25 0 3.25 0.75 0 0.75 0.75 0 0.75 -0.75 0 3.25 -0.75 0 3.25 -3.25 0 0.75 -3.25 0 -3.25 -0.75 0 -0.75 -0.75 0 -0.75 -3.25 0 -3.25 -3.25 0; #X obj 39 561 s \$0_position; -#X msg 39 437 0 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; +#X msg 39 437 0 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 1 0.5 0.5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 39 467 s \$0_MortarColor; #X obj 39 39 t b b b b b b; #X msg 133 15 bang; @@ -146,88 +109,50 @@ #X obj 129 128 table \$0_MortarColor 48; #X obj 129 149 table \$0_BrickSize 32; #X obj 128 169 table \$0_BrickPct 32; -#X restore 754 73 pd tables; -#X obj 223 443 list prepend \$0; -#X obj 396 298 cnv 15 90 40 empty empty empty 20 12 0 14 -204786 -66577 -0; -#X obj 396 348 cnv 15 90 40 empty empty empty 20 12 0 14 -204786 -66577 -0; +#X restore 564 73 pd tables; +#X obj 183 443 list prepend \$0; +#X obj 396 298 cnv 15 90 40 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X obj 396 348 cnv 15 90 40 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; #X msg 408 310 attribute LightPosition \$1_LightPosition; #N canvas 268 270 483 439 more 0; #X text 66 43 syntax:; #X text 67 95 adds an attribute to gemvertexbuffer; -#X text 67 127 if the attribute already exists in gemvertexbuffer \, -this message updates the attribute with the array data; +#X text 67 127 if the attribute already exists in gemvertexbuffer \, this message updates the attribute with the array data; #X text 66 60 attribute ; #X text 66 281 attribute tables are interleaved only; -#X text 64 177 if the vert or frag files are changed \, the attributes -in gemvertexbuffer can be reset with a "reset_attributes" msg and re-added -; -#X text 65 236 there is no limit for the amount of attributes that -can be added; -#X text 66 321 in order to set 'uniform' type variables once per vertex -or geo \, they must be changed to attribute/varying type in the vert -and frag files; +#X text 64 177 if the vert or frag files are changed \, the attributes in gemvertexbuffer can be reset with a "reset_attributes" msg and re-added; +#X text 65 236 there is no limit for the amount of attributes that can be added; +#X text 66 321 in order to set 'uniform' type variables once per vertex or geo \, they must be changed to attribute/varying type in the vert and frag files; #X restore 407 359 pd more; #X obj 164 646 t a; -#X obj 301 663 print vb; -#X msg 246 176 bang; -#X msg 168 207 open ../data/brick.vert; -#X msg 195 234 open ../data/brick.frag; -#N canvas 1 51 450 300 modulelist 0; -#X obj 81 44 inlet; -#X obj 248 55 inlet; -#X obj 81 172 outlet; -#X obj 81 66 t b f; -#X obj 81 128 pack 0 0 0; -#X obj 81 150 route 0; -#X obj 81 98 del 0; -#X connect 0 0 3 0; -#X connect 1 0 4 2; -#X connect 3 0 6 0; -#X connect 3 1 4 1; -#X connect 4 0 5 0; -#X connect 5 0 2 0; -#X connect 6 0 4 0; -#X restore 184 330 pd modulelist; -#X msg 272 416 bang; -#X obj 753 7 declare -lib Gem; +#X obj 194 647 print vb; +#X msg 183 420 bang; +#X obj 563 7 declare -lib Gem; +#X obj 154 172 glsl shader/brick; +#X msg 165 152 bang; +#X floatatom 278 204 5 0 0 0 - - - 0; +#X obj 154 673 gemvertexbuffer \; resize 16 \; draw quad; +#X obj 259 366 t b f; +#X msg 183 475 position \$1_position \, attribute LightPosition \$1_LightPosition \, attribute BrickColor \$1_BrickColor \, attribute MortarColor \$1_MortarColor \, attribute BrickSize \$1_BrickSize \, attribute BrickPct \$1_BrickPct; #X connect 0 0 1 0; #X connect 2 0 3 0; #X connect 3 0 2 0; -#X connect 5 0 35 0; +#X connect 5 0 29 0; #X connect 6 0 7 0; -#X connect 6 1 47 1; -#X connect 7 0 9 0; -#X connect 7 1 47 0; -#X connect 8 0 29 0; -#X connect 9 0 10 0; -#X connect 9 1 30 0; -#X connect 11 0 6 0; -#X connect 12 0 13 0; -#X connect 13 0 42 0; -#X connect 14 0 9 0; -#X connect 15 0 7 0; -#X connect 16 0 6 0; -#X connect 18 0 42 0; -#X connect 20 0 42 0; -#X connect 21 0 42 0; -#X connect 23 0 24 0; -#X connect 24 0 42 0; -#X connect 25 0 42 0; -#X connect 26 0 27 0; -#X connect 27 0 42 0; -#X connect 29 0 45 0; -#X connect 29 1 46 0; -#X connect 30 0 37 0; -#X connect 30 1 18 0; -#X connect 35 0 9 0; -#X connect 35 1 34 0; -#X connect 37 0 25 0; -#X connect 42 0 10 0; -#X connect 42 0 43 0; -#X connect 44 0 29 0; -#X connect 45 0 6 0; -#X connect 46 0 7 0; -#X connect 47 0 5 0; -#X connect 48 0 37 0; +#X connect 7 0 25 0; +#X connect 9 0 25 0; +#X connect 11 0 25 0; +#X connect 12 0 25 0; +#X connect 14 0 15 0; +#X connect 15 0 25 0; +#X connect 20 0 34 0; +#X connect 25 0 26 0; +#X connect 25 0 32 0; +#X connect 27 0 20 0; +#X connect 29 0 32 0; +#X connect 29 1 31 0; +#X connect 29 1 33 0; +#X connect 30 0 29 0; +#X connect 33 0 27 0; +#X connect 33 1 9 0; +#X connect 34 0 25 0; diff --git a/examples/10.glsl/17.light.pd b/examples/10.glsl/17.light.pd new file mode 100644 index 000000000..f729959bf --- /dev/null +++ b/examples/10.glsl/17.light.pd @@ -0,0 +1,112 @@ +#N canvas 191 0 745 445 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 181 24 gemhead; +#X obj 44 9 declare -lib Gem; +#N canvas 899 105 557 405 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 177 215 destroy; +#X obj 102 265 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X msg 102 240 create \, 1 \, lighting 1; +#X text 86 319 Lighting 1 force Gem to compute the object Normals; +#X connect 1 0 2 0; +#X connect 2 0 17 0; +#X connect 2 1 3 0; +#X connect 3 0 4 0; +#X connect 4 0 7 0; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 6 0; +#X connect 7 1 9 0; +#X connect 9 0 10 0; +#X connect 9 1 12 0; +#X connect 10 0 11 0; +#X connect 11 0 14 0; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 0 0; +#X connect 17 0 4 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 181 347 rotateXYZ -40 10 0; +#X obj 181 374 torus 2 30 0.8; +#X text 350 21 Since shader remplace the standard pipeline \, light are not automatically computed. Lighting effect have to be manually computed in the shader.; +#X floatatom 216 324 5 0 0 0 - - - 0; +#N canvas 1921 61 450 300 pak 0; +#X obj 74 46 inlet; +#X obj 76 110 pack f f f; +#X obj 160 41 inlet; +#X obj 156 65 t b f; +#X obj 216 43 inlet; +#X obj 212 67 t b f; +#X obj 75 158 outlet; +#X connect 0 0 1 0; +#X connect 1 0 6 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 3 1 1 1; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 5 1 1 2; +#X restore 398 186 pd pak f f f; +#X msg 398 211 LightPosition \$1 \$2 \$3 1; +#X floatatom 398 152 5 0 0 0 - - - 0; +#X floatatom 443 152 5 0 0 0 - - - 0; +#X floatatom 485 153 5 0 0 0 - - - 0; +#X obj 181 151 glsl shader/light \; LightPosition 5 3 1 1 \; LightL 1 1 1 \; LightLa 1 1 1 \; MaterialKa 0.1 0.1 0.5 \; MaterialKd 0.8 0.1 0.1 \; MaterialKs 0.1 0.3 0.1 \; MaterialShininess 30; +#X connect 0 0 1 0; +#X connect 2 0 14 0; +#X connect 5 0 6 0; +#X connect 8 0 5 1; +#X connect 9 0 10 0; +#X connect 10 0 14 1; +#X connect 11 0 9 0; +#X connect 12 0 9 1; +#X connect 13 0 9 2; +#X connect 14 0 5 0; diff --git a/examples/10.glsl/18.additive_audio_synthesis.pd b/examples/10.glsl/18.additive_audio_synthesis.pd new file mode 100644 index 000000000..1d70a0741 --- /dev/null +++ b/examples/10.glsl/18.additive_audio_synthesis.pd @@ -0,0 +1,302 @@ +#N canvas 135 508 522 409 10; +#X declare -lib Gem; +#X obj 26 352 dac~; +#N canvas 507 120 973 717 audio_GPU 0; +#X obj 40 332 declare -lib Gem; +#X obj 40 116 select 0 1; +#X obj 40 90 tgl 16 0 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 123 168 bang~; +#X obj 318 614 outlet~; +#X obj 318 568 clip~ -1 1; +#X obj 40 305 block~ 4096; +#X obj 318 521 *~ 2; +#X obj 318 545 -~ 1; +#X obj 274 164 translateXYZ 0 0 -4; +#X obj 274 396 square 4; +#X obj 301 496 pix_pix2sig~; +#X obj 274 419 t b a; +#X msg 451 378 t \$1; +#X obj 451 309 f; +#X floatatom 463 357 5 0 0 0 - - - 0; +#X obj 451 332 + 1; +#X msg 451 264 0; +#X obj 361 136 s rendered_sound; +#X obj 654 130 s input_image; +#X obj 567 40 gemhead 10; +#X obj 274 322 pix_texture \; rectangle 1 \; quality 0; +#X obj 343 298 r input_image; +#X obj 462 286 bang~; +#X obj 567 593 square 4; +#X obj 567 572 translateXYZ 0 4 -4; +#X obj 705 591 square 4; +#X obj 774 512 r input_image; +#X obj 89 185 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 705 570 translateXYZ 0 4 -4; +#X obj 567 539 pix_texture \; quality 0; +#X obj 567 165 t b a; +#X obj 567 465 separator; +#X obj 594 187 separator; +#X obj 567 427 gemhead 40 \; 0; +#X obj 274 643 tabwrite~ block_vector; +#X obj 40 360 table block_vector 4096; +#N canvas 1440 78 450 366 noise 0; +#X obj 25 33 inlet; +#X obj 25 154 pix_noise 4096 1 \; auto 1; +#X obj 25 199 pix_texture; +#X msg 58 86 auto \$1; +#X obj 58 61 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 77 112 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 25 229 rectangle 4 4; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X restore 628 342 pd noise; +#X f 11; +#N canvas 1441 501 450 300 route4 0; +#X obj 28 37 inlet; +#X obj 39 205 outlet; +#X obj 42 168 spigot 1; +#X obj 90 146 == 0; +#X obj 182 147 == 1; +#X obj 270 146 == 2; +#X obj 348 147 == 3; +#X obj 400 35 inlet; +#X obj 130 206 outlet; +#X obj 222 210 outlet; +#X obj 300 208 outlet; +#X obj 133 169 spigot 0; +#X obj 222 168 spigot 0; +#X obj 300 169 spigot 0; +#X connect 0 0 2 0; +#X connect 0 0 11 0; +#X connect 0 0 12 0; +#X connect 0 0 13 0; +#X connect 2 0 1 0; +#X connect 3 0 2 1; +#X connect 4 0 11 1; +#X connect 5 0 12 1; +#X connect 6 0 13 1; +#X connect 7 0 6 0; +#X connect 7 0 5 0; +#X connect 7 0 4 0; +#X connect 7 0 3 0; +#X connect 11 0 8 0; +#X connect 12 0 9 0; +#X connect 13 0 10 0; +#X restore 594 274 pd route4; +#N canvas 1441 501 450 300 video 0; +#X obj 35 100 pix_texture; +#X obj 35 75 pix_video; +#X obj 35 38 inlet; +#X obj 35 132 rectangle 4 4; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 646 363 pd video; +#N canvas 1458 625 450 300 test 0; +#X obj 35 26 inlet; +#X obj 35 173 translateXYZ 0 -4 0; +#X obj 35 204 rectangle 0.02 4; +#X obj 97 141 line; +#X obj 97 23 loadbang; +#X obj 97 46 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 113 118 5 0 0 0 - - - 0; +#X msg 97 95 -4 \, 4 20000; +#X obj 97 70 metro 20000; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 1; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 7 0; +#X restore 611 322 pd test; +#X f 14; +#N canvas 1058 252 669 673 visualisation 0; +#X obj 61 204 rectangle 4 1; +#X obj 61 175 translateXYZ 0 1.5 0; +#X obj 264 186 translateXYZ 0 -1.5 0; +#X obj 130 98 r input_image; +#X obj 61 76 gemhead 30; +#X obj 264 81 gemhead 30; +#X obj 61 122 pix_texture \; rectangle 1 \; quality 0; +#X obj 264 136 pix_texture \; rectangle 1 \; quality 0; +#X obj 333 109 r rendered_sound; +#X obj 264 209 rectangle 4 0.5; +#X obj 63 302 gemhead 40; +#X obj 63 336 translateXYZ -3.5 2 0; +#X obj 63 413 translateXYZ 0 -1 0; +#X obj 63 494 translateXYZ 0 -2.5 0; +#X obj 63 364 text2d \; text last input buffer \; justify left; +#X obj 63 444 text2d \; text current input buffer \; justify left; +#X obj 63 525 text2d \; text audio out buffer \; justify left; +#X connect 1 0 0 0; +#X connect 2 0 9 0; +#X connect 3 0 6 1; +#X connect 4 0 6 0; +#X connect 5 0 7 0; +#X connect 6 0 1 0; +#X connect 7 0 2 0; +#X connect 8 0 7 1; +#X connect 10 0 11 0; +#X connect 11 0 14 0; +#X connect 12 0 15 0; +#X connect 13 0 16 0; +#X connect 14 0 12 0; +#X connect 15 0 13 0; +#X restore 40 390 pd visualisation; +#X obj 594 215 color 1 0 0; +#X text 675 217 only red channel is used; +#X obj 703 301 vradio 20 1 0 4 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0; +#N canvas 1252 195 496 590 img 0; +#X obj 35 38 inlet; +#X obj 105 271 line; +#X obj 105 190 metro 10000; +#X obj 105 143 loadbang; +#X obj 105 166 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 118 244 5 0 0 0 - - - 0; +#X obj 35 111 pix_texture; +#X obj 35 324 rectangle 4 4; +#X obj 35 293 translateXYZ 0 0 0; +#X msg 105 217 -6 \, 2 10000; +#X obj 35 68 pix_image \; open ../data/dancer.JPG; +#X connect 0 0 10 0; +#X connect 1 0 8 2; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 1 0; +#X connect 6 0 8 0; +#X connect 8 0 7 0; +#X connect 9 0 1 0; +#X connect 10 0 6 0; +#X restore 594 301 pd img; +#X f 17; +#X obj 594 243 translateXYZ 0 0 -4; +#X obj 40 30 inlet; +#X obj 63 88 s pd; +#X obj 284 198 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 274 63 gemframebuffer \; dimen 4096 1 \; rectangle 1 \; type FLOAT \; format RGBA32F; +#X obj 301 458 pix_snap 0 0 4096 1 \; type FLOAT; +#X msg 123 197 render; +#X obj 40 245 gemwin \; color 0.3 0.3 0.3; +#X msg 69 165 create; +#X msg 40 141 destroy; +#X msg 63 63 dsp \$1; +#X obj 318 591 hip~ 5; +#X obj 705 537 pix_texture \; quality 0; +#X obj 705 427 gemhead 30; +#X obj 274 36 gemhead 20; +#X text 563 624 copy the current texture to another buffer and render in the next frame to keep the previous frame for smooth transitions between both frames; +#X text 270 663 only for visualisation; +#X text 737 297 change input to be converted to sound here, f 24; +#X obj 567 66 gemframebuffer \; dimen 4096 2 \; rectangle 1 \; texunit 0; +#X obj 705 451 gemframebuffer \; dimen 4096 1 \; rectangle 1; +#X obj 274 223 glsl shader/additive; +#X connect 1 0 55 0; +#X connect 1 1 54 0; +#X connect 2 0 1 0; +#X connect 3 0 52 0; +#X connect 5 0 35 0; +#X connect 5 0 57 0; +#X connect 7 0 8 0; +#X connect 8 0 5 0; +#X connect 9 0 66 0; +#X connect 10 0 12 0; +#X connect 11 1 7 0; +#X connect 12 0 35 0; +#X connect 12 0 51 0; +#X connect 12 1 51 0; +#X connect 13 0 66 1; +#X connect 14 0 16 0; +#X connect 16 0 14 1; +#X connect 16 0 15 0; +#X connect 16 0 13 0; +#X connect 17 0 14 0; +#X connect 20 0 64 0; +#X connect 21 0 10 0; +#X connect 22 0 21 1; +#X connect 23 0 14 0; +#X connect 25 0 24 0; +#X connect 27 0 58 1; +#X connect 28 0 53 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 34 0; +#X connect 31 1 33 0; +#X connect 32 0 30 0; +#X connect 33 0 42 0; +#X connect 34 0 32 0; +#X connect 38 0 45 0; +#X connect 38 1 40 0; +#X connect 38 2 37 0; +#X connect 38 3 39 0; +#X connect 42 0 46 0; +#X connect 44 0 38 1; +#X connect 46 0 38 0; +#X connect 47 0 56 0; +#X connect 47 0 2 0; +#X connect 49 0 66 0; +#X connect 50 0 9 0; +#X connect 50 1 18 0; +#X connect 51 0 11 0; +#X connect 52 0 53 0; +#X connect 54 0 53 0; +#X connect 55 0 53 0; +#X connect 56 0 48 0; +#X connect 57 0 4 0; +#X connect 58 0 29 0; +#X connect 59 0 65 0; +#X connect 60 0 50 0; +#X connect 64 0 31 0; +#X connect 64 1 19 0; +#X connect 65 0 58 0; +#X connect 65 1 30 1; +#X connect 66 0 21 0; +#X connect 66 1 17 0; +#X restore 26 45 pd audio_GPU; +#X obj 26 14 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X text 51 15 <- start; +#X obj 26 327 *~; +#X obj 87 229 hsl 153 18 0 127 0 1 empty empty empty -2 -9 0 10 #fcfcfc #000000 #000000 13500 1; +#X obj 84 252 dbtorms; +#X obj 84 275 pack 0 50; +#X obj 84 298 line~; +#N canvas 303 641 450 300 no_pop 0; +#X obj 41 24 inlet~; +#X obj 42 231 outlet~; +#X msg 130 53 clear; +#X obj 143 77 sig~ 1; +#X obj 42 200 *~; +#X obj 130 27 inlet; +#X obj 130 104 lop~ 0.5; +#X obj 131 131 *~; +#X obj 131 165 *~; +#X connect 0 0 4 0; +#X connect 2 0 6 0; +#X connect 3 0 6 0; +#X connect 4 0 1 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 0 7 1; +#X connect 7 0 8 0; +#X connect 7 0 8 1; +#X connect 8 0 4 1; +#X restore 25 190 pd no_pop; +#X text 86 167 Pd samplerate should be set to 48KHz; +#X text 86 117 Rendering must be synced to audio dsp and a large buffer should be used \, so we need to clock everything with a block~ 4096 Latency is highly noticeable!; +#X text 85 69 This patch uses an image buffer to control the amplitude of 200 audio oscillators. Everything is computed inside the GPU.; +#X connect 1 0 9 0; +#X connect 2 0 1 0; +#X connect 2 0 9 1; +#X connect 4 0 0 0; +#X connect 4 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 4 1; +#X connect 9 0 4 0; diff --git a/examples/10.glsl/_glsl.pd b/examples/10.glsl/_glsl.pd deleted file mode 100644 index ca41544e7..000000000 --- a/examples/10.glsl/_glsl.pd +++ /dev/null @@ -1,73 +0,0 @@ -#N canvas 52 79 668 661 10; -#X obj 78 339 glsl_vertex; -#X msg 32 338 print; -#X obj 78 626 glsl_program; -#X obj 163 555 pack 0 0; -#X msg 30 476 print; -#X obj 163 511 change; -#X obj 150 358 change; -#X msg 163 579 link \$1 \$2; -#X msg 32 620 print; -#X obj 77 490 glsl_fragment; -#X floatatom 163 535 2 0 0 0 ID - -; -#X floatatom 150 381 2 0 0 0 ID - -; -#X obj 181 600 print linking; -#X obj 15 21 inlet; -#X obj 78 662 outlet; -#X msg 106 309 open \$1.vert; -#X msg 90 453 open \$1.frag; -#X obj 577 95 inlet; -#X obj 15 44 route bang; -#X obj 255 11 gemhead 1; -#X msg 255 33 1; -#X obj 255 57 change; -#X obj 255 81 t b; -#X obj 157 647 change; -#X obj 157 668 t b; -#X obj 158 690 outlet; -#X obj 140 224 t a a; -#X obj 90 426 symbol; -#X obj 90 401 t b; -#X msg 287 598 0; -#X obj 15 65 t b b b, f 29; -#X obj 140 199 symbol \$1; -#X text 270 193 This abstraction can be useful to load shader. Shader -location is relative to this abstraction path.; -#X connect 0 0 9 0; -#X connect 0 1 6 0; -#X connect 1 0 0 0; -#X connect 2 0 14 0; -#X connect 2 1 23 0; -#X connect 3 0 7 0; -#X connect 4 0 9 0; -#X connect 5 0 10 0; -#X connect 6 0 11 0; -#X connect 6 0 28 0; -#X connect 7 0 2 0; -#X connect 7 0 12 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 9 1 5 0; -#X connect 10 0 3 0; -#X connect 11 0 3 1; -#X connect 13 0 18 0; -#X connect 15 0 0 0; -#X connect 16 0 9 0; -#X connect 17 0 2 0; -#X connect 18 0 30 0; -#X connect 18 1 0 0; -#X connect 19 0 20 0; -#X connect 20 0 21 0; -#X connect 21 0 22 0; -#X connect 22 0 31 0; -#X connect 23 0 24 0; -#X connect 24 0 25 0; -#X connect 26 0 15 0; -#X connect 26 1 27 1; -#X connect 27 0 16 0; -#X connect 28 0 27 0; -#X connect 29 0 23 0; -#X connect 30 0 10 0; -#X connect 30 1 31 0; -#X connect 30 2 29 0; -#X connect 31 0 26 0; diff --git a/examples/10.glsl/GLSL_mix.frag b/examples/10.glsl/shader/GLSL_mix.frag similarity index 88% rename from examples/10.glsl/GLSL_mix.frag rename to examples/10.glsl/shader/GLSL_mix.frag index ce47bf882..d210ed6a1 100644 --- a/examples/10.glsl/GLSL_mix.frag +++ b/examples/10.glsl/shader/GLSL_mix.frag @@ -1,4 +1,5 @@ //jack/RYBN 2010 +#version 130 #extension GL_EXT_gpu_shader4 : enable #extension GL_ARB_texture_rectangle : enable uniform sampler2DRect Ttex1; @@ -7,9 +8,9 @@ uniform sampler2DRect tex0; uniform float style; uniform float mix_factor; varying vec2 texcoord0; -ivec2 size1 = textureSize2DRect(Ttex1, 0); -ivec2 size2 = textureSize2DRect(Ttex2, 0); -ivec2 size0 = textureSize2DRect(tex0, 0); +ivec2 size1 = textureSize(Ttex1); +ivec2 size2 = textureSize(Ttex2); +ivec2 size0 = textureSize(tex0); void main (void) { @@ -32,4 +33,3 @@ void main (void) } } - diff --git a/examples/10.glsl/GLSL_mix.vert b/examples/10.glsl/shader/GLSL_mix.vert similarity index 100% rename from examples/10.glsl/GLSL_mix.vert rename to examples/10.glsl/shader/GLSL_mix.vert diff --git a/examples/10.glsl/P_distord.frag b/examples/10.glsl/shader/P_distord.frag similarity index 99% rename from examples/10.glsl/P_distord.frag rename to examples/10.glsl/shader/P_distord.frag index 29f3e63f2..9b7c4a28f 100644 --- a/examples/10.glsl/P_distord.frag +++ b/examples/10.glsl/shader/P_distord.frag @@ -7,4 +7,3 @@ void main() vec2 C = (gl_TextureMatrix[0] * gl_TexCoord[0]).st; gl_FragColor = texture2D(tex0, C ) ; } - diff --git a/examples/10.glsl/P_distord.vert b/examples/10.glsl/shader/P_distord.vert similarity index 98% rename from examples/10.glsl/P_distord.vert rename to examples/10.glsl/shader/P_distord.vert index f0db5f367..88ad1e5dd 100644 --- a/examples/10.glsl/P_distord.vert +++ b/examples/10.glsl/shader/P_distord.vert @@ -4,7 +4,7 @@ uniform float K; uniform sampler2D tex0; void main() -{ +{ gl_TexCoord[0] = gl_MultiTexCoord0; float xs1 = sin((1.2 + gl_TexCoord[0].s)*(2.3+gl_TexCoord[0].t)); @@ -14,8 +14,7 @@ void main() float ys1 = sin((2.1 + gl_TexCoord[0].s)*(3.2+gl_TexCoord[0].t)); float ys2 = sin(ys1*5313.); float ys3 = K * sin(ys2*10113.); - + gl_Position = gl_ModelViewProjectionMatrix * (gl_Vertex + vec4(xs3,ys3,0.,0.)); - -} +} diff --git a/examples/10.glsl/T_distord.frag b/examples/10.glsl/shader/T_distord.frag similarity index 97% rename from examples/10.glsl/T_distord.frag rename to examples/10.glsl/shader/T_distord.frag index 385f427c8..d837a90cb 100644 --- a/examples/10.glsl/T_distord.frag +++ b/examples/10.glsl/shader/T_distord.frag @@ -19,13 +19,3 @@ void main() gl_FragColor = texture2D(tex0, C + K1 * 0.01 *vec2(xs3,ys3)) ; } - - - - - - - - - - diff --git a/examples/10.glsl/T_distord.vert b/examples/10.glsl/shader/T_distord.vert similarity index 67% rename from examples/10.glsl/T_distord.vert rename to examples/10.glsl/shader/T_distord.vert index 114361517..73e134e68 100644 --- a/examples/10.glsl/T_distord.vert +++ b/examples/10.glsl/shader/T_distord.vert @@ -1,9 +1,8 @@ // Cyrille Henry 2007 void main() -{ +{ gl_TexCoord[0] = gl_MultiTexCoord0; - gl_Position = ftransform(); - -} + gl_Position = ftransform(); +} diff --git a/examples/10.glsl/shader/additive.frag b/examples/10.glsl/shader/additive.frag new file mode 100644 index 000000000..4af810314 --- /dev/null +++ b/examples/10.glsl/shader/additive.frag @@ -0,0 +1,61 @@ +#extension GL_ARB_texture_rectangle : enable +// Cyrille Henry 2024 + +uniform sampler2DRect texture0; // input texture +uniform float t; // current time, in order to adjust the phase of signals from 1 frame to the other + +varying vec2 texcoord0; // pixel coordinate in the image + +float oscilator(float phase, float amplitude) { + return (0.5 + 0.5*amplitude*cos(radians(360.*phase))); +} + +float mtof(float midi) { // midi value to frequency value + return (440. * pow(2.,(midi-69.)/12.)); +} + +float ftof(float f) { // real frequency value to f value + // f = 1 -> 1 period is 4096 sample + return ((f/48000.) * 4096.); // for a sampling frequency of 48K +} + +void main (void) +{ + float outcolor, i; + float time = texcoord0.s /4096. ; // use X coordinate as time + + outcolor = 0.; + for(i=0.; i<200.; i++) { // 200 oscillators + float f_i = i/199.; + // use texture as oscillator amplitude + float amplitude1 = texture2DRect(texture0, vec2(f_i*4095.,1)).r; // previous frame amplitude + float amplitude2 = texture2DRect(texture0, vec2(f_i*4095.,-1)).r; // current frame amplitude + float amplitude = mix(amplitude1, amplitude2, time); // interpolation between this 2 vectors + amplitude *= amplitude; // pow(2) curve + + float f = ftof(mtof( mix(20.,110.,f_i) )); // uniform mapping between midi note 20 to 110 + + float phase; + //phase = fract((time+t) * f); // not accurate enough when t is high + // so we split the computation of the phase to small value in order to keep precision + phase = fract(time*fract(f)) + fract(time*floor(f)) + fract(t*fract(f)); + // we can skip some operations since : + // time is < 1.; so floor(time)=0.; and fract(time) = time; + // fract(t) = 0.; so floor(t) = t; + + outcolor += oscilator(phase, amplitude); + } + outcolor /= i; // normalisation + + outcolor = clamp (outcolor,0.,1.); + // output to 3 int value + //float r = floor(outcolor*255.)/255.; // crop to 8 bits + //float g_float = 256.*(outcolor - r); + //float g = floor(g_float*255.)/255.; // crop to 8 bits + //float b_float = 256.*(g_float - g); + //float b = floor(b_float*255.)/255.; // crop to 8 bits so the 24th bit is correct. it's maybe overkill... + + // Float output + gl_FragColor = vec4(outcolor, outcolor, outcolor, 1.0); + +} diff --git a/examples/10.glsl/shader/additive.vert b/examples/10.glsl/shader/additive.vert new file mode 100644 index 000000000..11dfd77d3 --- /dev/null +++ b/examples/10.glsl/shader/additive.vert @@ -0,0 +1,10 @@ +varying vec2 texcoord0; +varying vec2 texcoord1; + +void main() +{ + + texcoord0 = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; + gl_Position = ftransform(); + +} diff --git a/examples/10.glsl/bicubic_interpolation.frag b/examples/10.glsl/shader/bicubic_interpolation.frag similarity index 95% rename from examples/10.glsl/bicubic_interpolation.frag rename to examples/10.glsl/shader/bicubic_interpolation.frag index 9482bc616..44fae4db5 100644 --- a/examples/10.glsl/bicubic_interpolation.frag +++ b/examples/10.glsl/shader/bicubic_interpolation.frag @@ -33,11 +33,11 @@ void main (void) vec4 w1 = C21; vec4 w2 = C12; vec4 w3 = C22; - // x derivative - vec4 x0 = (C21 - C01) / 2.; - vec4 x1 = (C31 - C11) / 2.; - vec4 x2 = (C22 - C02) / 2.; - vec4 x3 = (C32 - C12) / 2.; + // x derivative + vec4 x0 = (C21 - C01) / 2.; + vec4 x1 = (C31 - C11) / 2.; + vec4 x2 = (C22 - C02) / 2.; + vec4 x3 = (C32 - C12) / 2.; // y derivative vec4 y0 = (C12 - C10) / 2.; vec4 y1 = (C22 - C20) / 2.; diff --git a/examples/10.glsl/bicubic_interpolation.vert b/examples/10.glsl/shader/bicubic_interpolation.vert similarity index 100% rename from examples/10.glsl/bicubic_interpolation.vert rename to examples/10.glsl/shader/bicubic_interpolation.vert diff --git a/examples/10.glsl/blur.frag b/examples/10.glsl/shader/blur.frag similarity index 92% rename from examples/10.glsl/blur.frag rename to examples/10.glsl/shader/blur.frag index f54e03ac0..e40588af8 100644 --- a/examples/10.glsl/blur.frag +++ b/examples/10.glsl/shader/blur.frag @@ -2,8 +2,8 @@ uniform sampler2D tex0; uniform vec2 distance; uniform vec2 TX; -void main (void) -{ +void main (void) +{ vec2 texcoord = (gl_TextureMatrix[0] * gl_TexCoord[0]).st; vec4 sample = 0.5 * texture2D(tex0, texcoord - distance); @@ -13,6 +13,4 @@ void main (void) sample /= 2.; gl_FragColor = sample; -} - - +} diff --git a/examples/10.glsl/blur.vert b/examples/10.glsl/shader/blur.vert similarity index 100% rename from examples/10.glsl/blur.vert rename to examples/10.glsl/shader/blur.vert diff --git a/examples/data/brick.frag b/examples/10.glsl/shader/brick.frag similarity index 99% rename from examples/data/brick.frag rename to examples/10.glsl/shader/brick.frag index 53e4f1b62..77744099a 100644 --- a/examples/data/brick.frag +++ b/examples/10.glsl/shader/brick.frag @@ -10,7 +10,7 @@ void main() vec3 color; vec2 position, useBrick; position = MCposition / BrickSize_f; - + if (fract(position.y * 0.5) > 0.5) position.x += 0.5; diff --git a/examples/data/brick.vert b/examples/10.glsl/shader/brick.vert similarity index 92% rename from examples/data/brick.vert rename to examples/10.glsl/shader/brick.vert index 1a54a8bcb..fe8016261 100644 --- a/examples/data/brick.vert +++ b/examples/10.glsl/shader/brick.vert @@ -1,4 +1,4 @@ -attribute vec3 LightPosition; +attribute vec3 LightPosition; attribute vec3 BrickColor, MortarColor; attribute vec2 BrickSize, BrickPct; @@ -35,7 +35,7 @@ void main() spec = pow(spec, 16.0); } - LightIntensity = DiffuseContribution * diffuse + + LightIntensity = DiffuseContribution * diffuse + SpecularContribution * spec; MCposition = gl_Vertex.xy; diff --git a/examples/10.glsl/fetching.frag b/examples/10.glsl/shader/fetching.frag similarity index 96% rename from examples/10.glsl/fetching.frag rename to examples/10.glsl/shader/fetching.frag index 3d1af1f0e..959821306 100644 --- a/examples/10.glsl/fetching.frag +++ b/examples/10.glsl/shader/fetching.frag @@ -4,5 +4,3 @@ void main (void) { gl_FragColor = C; } - - diff --git a/examples/10.glsl/fetching.vert b/examples/10.glsl/shader/fetching.vert similarity index 93% rename from examples/10.glsl/fetching.vert rename to examples/10.glsl/shader/fetching.vert index b41cc1620..3e41f7a07 100644 --- a/examples/10.glsl/fetching.vert +++ b/examples/10.glsl/shader/fetching.vert @@ -4,12 +4,11 @@ void main() { vec4 v = vec4(gl_Vertex); vec4 color = texture2D(MyTex, (gl_TextureMatrix[0] * gl_MultiTexCoord0).st); - v.z = color.r; + v.z = color.r; // v.x += (color.b-0.5)/2.; // v.y += (color.g-0.5)/2.; C=color; gl_Position = gl_ModelViewProjectionMatrix * v; - -} +} diff --git a/examples/10.glsl/fetching2.frag b/examples/10.glsl/shader/fetching2.frag similarity index 87% rename from examples/10.glsl/fetching2.frag rename to examples/10.glsl/shader/fetching2.frag index 1b576a50d..20cebf1e8 100644 --- a/examples/10.glsl/fetching2.frag +++ b/examples/10.glsl/shader/fetching2.frag @@ -13,7 +13,7 @@ vec2 pos_(vec2 V, float x, float y) void main (void) { - vec2 pos = gl_TexCoord[0].st * vec2(90.,62.)/256. ; + vec2 pos = gl_TexCoord[0].st * vec2(90.,62.)/256. ; vec4 color1 = texture2DRect(texture,pos_(pos,-1./256.,-1./256.)); vec4 color2 = texture2DRect(texture,pos_(pos, 0./256.,-1./256.)); @@ -26,11 +26,11 @@ void main (void) vec4 color9 = texture2DRect(texture,pos_(pos, 1./256., 1./256.)); vec4 colorBG = color1 + color2 + color4 + color5; - vec4 colorBD = color3 + color2 + color6 + color5; - vec4 colorHG = color4 + color5 + color7 + color8; + vec4 colorBD = color3 + color2 + color6 + color5; + vec4 colorHG = color4 + color5 + color7 + color8; vec4 colorHD = color5 + color6 + color8 + color9; - vec2 fract_pos = (fract(pos)); + vec2 fract_pos = (fract(pos)); vec4 XB = mix(colorBG,colorBD,fract_pos.x); vec4 XH = mix(colorHG,colorHD,fract_pos.x); @@ -52,5 +52,3 @@ void main (void) gl_FragColor = color; } - - diff --git a/examples/10.glsl/fetching2.vert b/examples/10.glsl/shader/fetching2.vert similarity index 83% rename from examples/10.glsl/fetching2.vert rename to examples/10.glsl/shader/fetching2.vert index 01fbf0ab8..a7f48efac 100644 --- a/examples/10.glsl/fetching2.vert +++ b/examples/10.glsl/shader/fetching2.vert @@ -11,11 +11,10 @@ void main() gl_TexCoord[0] = gl_MultiTexCoord0; - v.x = color.r -0.5; - v.y = color.g -0.5; - v.z = color.b -0.5; + v.x = color.r -0.5; + v.y = color.g -0.5; + v.z = color.b -0.5; gl_Position = gl_ModelViewProjectionMatrix * v; - -} +} diff --git a/examples/10.glsl/game.frag b/examples/10.glsl/shader/game.frag similarity index 99% rename from examples/10.glsl/game.frag rename to examples/10.glsl/shader/game.frag index 9b5800d05..9e2673d58 100644 --- a/examples/10.glsl/game.frag +++ b/examples/10.glsl/shader/game.frag @@ -5,12 +5,12 @@ uniform sampler2D texture; const float dx = 1./500.; // change to gemwin dim void main (void) -{ +{ vec2 tmp = (gl_TextureMatrix[0] * gl_TexCoord[0]).st; float x = tmp.s; float y = tmp.t; - + vec4 c; c = texture2D(texture, vec2(x-dx, y-dx)); c += texture2D(texture, vec2(x, y-dx)); diff --git a/examples/10.glsl/game.vert b/examples/10.glsl/shader/game.vert similarity index 81% rename from examples/10.glsl/game.vert rename to examples/10.glsl/shader/game.vert index 64eb4f475..8d9d76de6 100644 --- a/examples/10.glsl/game.vert +++ b/examples/10.glsl/shader/game.vert @@ -7,8 +7,7 @@ uniform float K3; uniform vec2 offset; void main() -{ +{ gl_TexCoord[0] = gl_MultiTexCoord0; - gl_Position = ftransform(); + gl_Position = ftransform(); } - diff --git a/examples/10.glsl/geo.frag b/examples/10.glsl/shader/geo.frag similarity index 77% rename from examples/10.glsl/geo.frag rename to examples/10.glsl/shader/geo.frag index 7ec0b43c4..557b38edb 100644 --- a/examples/10.glsl/geo.frag +++ b/examples/10.glsl/shader/geo.frag @@ -1,8 +1,7 @@ void main() -{ +{ vec4 tmp = gl_Color; tmp.a /= 10.; - gl_FragColor = tmp; + gl_FragColor = tmp; // set color but alpha is 20 time less } - diff --git a/examples/10.glsl/geo.geom b/examples/10.glsl/shader/geo.geom similarity index 90% rename from examples/10.glsl/geo.geom rename to examples/10.glsl/shader/geo.geom index 3271c6fc7..5be7ab394 100644 --- a/examples/10.glsl/geo.geom +++ b/examples/10.glsl/shader/geo.geom @@ -1,5 +1,5 @@ -#version 120 -#extension GL_EXT_geometry_shader4: enable +#version 120 +#extension GL_EXT_geometry_shader4: enable void main(void) { @@ -23,6 +23,6 @@ void main(void) // the geometry as already been transform in 2d, so we jut have to move it in X and Y EmitVertex(); } - EndPrimitive(); + EndPrimitive(); } } diff --git a/examples/10.glsl/geo.vert b/examples/10.glsl/shader/geo.vert similarity index 100% rename from examples/10.glsl/geo.vert rename to examples/10.glsl/shader/geo.vert diff --git a/examples/10.glsl/interpol.frag b/examples/10.glsl/shader/interpol.frag similarity index 100% rename from examples/10.glsl/interpol.frag rename to examples/10.glsl/shader/interpol.frag diff --git a/examples/10.glsl/shader/light.frag b/examples/10.glsl/shader/light.frag new file mode 100644 index 000000000..93bff45fb --- /dev/null +++ b/examples/10.glsl/shader/light.frag @@ -0,0 +1,38 @@ +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +// from vertex shader +varying vec3 Normal; +varying vec3 Position; + +// light description +uniform vec4 LightPosition; // Light position in eye coords. +uniform vec3 LightLa; // Ambient light intensity +uniform vec3 LightL; // Diffuse and specular light intensity + +// material definition +uniform vec3 MaterialKa; // Ambient reflectivity +uniform vec3 MaterialKd; // Diffuse reflectivity +uniform vec3 MaterialKs; // Specular reflectivity +uniform float MaterialShininess; // Specular shininess factor + +// The lighting model +vec3 blinnPhong( vec3 position, vec3 n) { + vec3 ambient = LightLa * MaterialKa; + vec3 s = normalize( LightPosition.xyz - position ); + float sDotN = max( dot(s,n), 0.0 ); + vec3 diffuse = MaterialKd * sDotN; + vec3 spec = vec3(0.0); + if( sDotN > 0.0 ) { + vec3 v = normalize(-position.xyz); + vec3 h = normalize( v + s ); + spec = MaterialKs * pow( max( dot(h,n), 0.0 ), MaterialShininess ); + } + return ambient + LightL * (diffuse + spec); +} + +void main (void) +{ + gl_FragColor = vec4(blinnPhong(Position, normalize(Normal)), 1.0); + //gl_FragColor = vec4(blinnPhong(Position, Normal), 1.0); +} diff --git a/examples/10.glsl/shader/light.vert b/examples/10.glsl/shader/light.vert new file mode 100644 index 000000000..fe2da0557 --- /dev/null +++ b/examples/10.glsl/shader/light.vert @@ -0,0 +1,12 @@ +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +varying vec3 Normal; +varying vec3 Position; + +void main() +{ + Normal = normalize(gl_NormalMatrix * gl_Normal.xyz); + Position = ( gl_ModelViewMatrix * vec4(gl_Vertex.xyz,1.0) ).xyz; + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; +} diff --git a/examples/10.glsl/link.frag b/examples/10.glsl/shader/link.frag similarity index 91% rename from examples/10.glsl/link.frag rename to examples/10.glsl/shader/link.frag index 053cd5ef3..08c703c4a 100644 --- a/examples/10.glsl/link.frag +++ b/examples/10.glsl/shader/link.frag @@ -4,7 +4,7 @@ uniform sampler2DRect texture_mass, texture_mass_old, texture_normal; uniform float init, gravite; uniform vec2 wind; -uniform float D; +uniform float D; uniform float K1; // rigiditée liaison uniform float W,f,N; // amplitude du Wind et frequence; Noise uniform float t; //temps @@ -29,7 +29,7 @@ void main (void) vec4 pos = texture2DRect(texture_mass, coord );// -vec4(0.5); vec4 pos_old = texture2DRect(texture_mass_old,coord );// -vec4(0.5); vec4 posG = texture2DRect(texture_mass, (coord+vec2(-1., 0.)));// -vec4(0.5); - vec4 posD = texture2DRect(texture_mass, (coord+vec2( 1., 0.)));// -vec4(0.5); + vec4 posD = texture2DRect(texture_mass, (coord+vec2( 1., 0.)));// -vec4(0.5); vec4 posH = texture2DRect(texture_mass, (coord+vec2( 0., 1.)));// -vec4(0.5); vec4 posB = texture2DRect(texture_mass, (coord+vec2( 0.,-1.)));// -vec4(0.5); vec4 posHD = texture2DRect(texture_mass, (coord+vec2( 1.,-1.)));// -vec4(0.5); @@ -42,10 +42,10 @@ void main (void) vec4 pos2B = texture2DRect(texture_mass, (coord+vec2( 0.,-2.)));// -vec4(0.5); // lecture des position des masses voisinnes - force = pos-pos_old; + force = pos-pos_old; // ajout de la force d'inertie (conservation de la vitesse) - force *= 1.-D; + force *= 1.-D; // damping relatif a un point fix // ATTENTION, c'est le seul damping du system! @@ -54,64 +54,64 @@ void main (void) // on ajoute une force ssi la taille est > 0 // on limite aussi ds l'espace pour ne prendre en compte que le lien valide (effet de bord) - dist = pos.xyz - posG.xyz ; + dist = pos.xyz - posG.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x > 1.) ) { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); } - dist = pos.xyz - posD.xyz ; + dist = pos.xyz - posD.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x < 91.) ) { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); } - dist = pos.xyz - posH.xyz ; + dist = pos.xyz - posH.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.y < 63.) ) { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); } - dist = pos.xyz - posB.xyz ; + dist = pos.xyz - posB.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.y > 1.) ) { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); } // 4 liens diagonaux (haut gauche, bas droite, etc) - dist = pos.xyz - posHD.xyz ; + dist = pos.xyz - posHD.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x < 91.) && (coord.y > 1.) ) { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); } - - dist = pos.xyz - posBG.xyz ; + + dist = pos.xyz - posBG.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x > 1.) && (coord.y < 63.) ) { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); } - dist = pos.xyz - posHG.xyz ; + dist = pos.xyz - posHG.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x < 91.) && (coord.y < 63.) ) { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); } - dist = pos.xyz - posBD.xyz ; + dist = pos.xyz - posBD.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x > 1.) && (coord.y > 1.) ) { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); } // 4 liens double longeur (rigidité de flexion) - dist = pos.xyz - pos2G.xyz ; + dist = pos.xyz - pos2G.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x > 2.) ) { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); } - dist = pos.xyz - pos2D.xyz ; + dist = pos.xyz - pos2D.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.x < 90.) ) { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); } - dist = pos.xyz - pos2H.xyz ; + dist = pos.xyz - pos2H.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.y < 62.) ) { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); } - dist = pos.xyz - pos2B.xyz ; + dist = pos.xyz - pos2B.xyz ; taille = length(dist) ; if ( (taille > 0.) && (coord.y > 2.) ) { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); } diff --git a/examples/10.glsl/link.vert b/examples/10.glsl/shader/link.vert similarity index 98% rename from examples/10.glsl/link.vert rename to examples/10.glsl/shader/link.vert index fefc3663a..13ffc195b 100644 --- a/examples/10.glsl/link.vert +++ b/examples/10.glsl/shader/link.vert @@ -3,7 +3,7 @@ varying vec2 coord; void main() { - + coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; gl_Position = ftransform(); diff --git a/examples/10.glsl/mass.frag b/examples/10.glsl/shader/mass.frag similarity index 98% rename from examples/10.glsl/mass.frag rename to examples/10.glsl/shader/mass.frag index 29a2ef2f8..4dbdd6de4 100644 --- a/examples/10.glsl/mass.frag +++ b/examples/10.glsl/shader/mass.frag @@ -15,9 +15,9 @@ void main (void) force = min(max(force,vec4(-0.5)),vec4(0.5)); // on vire les +inf et -inf qui peuvent poser pb en cas d'instabilités - pos += force; + pos += force; //increment de la position - + float reset = step(coord.x,1.); // reset *= step(mod(coord.y,10.),4.); // les point en x<1 sont tjrs reseté : ils sont dc imobiles diff --git a/examples/10.glsl/mass.vert b/examples/10.glsl/shader/mass.vert similarity index 98% rename from examples/10.glsl/mass.vert rename to examples/10.glsl/shader/mass.vert index fefc3663a..13ffc195b 100644 --- a/examples/10.glsl/mass.vert +++ b/examples/10.glsl/shader/mass.vert @@ -3,7 +3,7 @@ varying vec2 coord; void main() { - + coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; gl_Position = ftransform(); diff --git a/examples/10.glsl/multitexture.frag b/examples/10.glsl/shader/multitexture.frag similarity index 81% rename from examples/10.glsl/multitexture.frag rename to examples/10.glsl/shader/multitexture.frag index 9e8ed0ce0..89c8dfcbd 100644 --- a/examples/10.glsl/multitexture.frag +++ b/examples/10.glsl/shader/multitexture.frag @@ -7,7 +7,6 @@ varying vec2 texcoord2; void main (void) { vec4 color = texture2D(MyTex, texcoord1); - vec4 color2 = texture2D(MyTex1, texcoord2); + vec4 color2 = texture2D(MyTex1, texcoord2); gl_FragColor = (color + color2) / 2.; } - diff --git a/examples/10.glsl/multitexture.vert b/examples/10.glsl/shader/multitexture.vert similarity index 99% rename from examples/10.glsl/multitexture.vert rename to examples/10.glsl/shader/multitexture.vert index 2cade19b4..627e4bfe1 100644 --- a/examples/10.glsl/multitexture.vert +++ b/examples/10.glsl/shader/multitexture.vert @@ -3,7 +3,7 @@ varying vec2 texcoord2; void main() { - + texcoord1 = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; texcoord2 = (gl_TextureMatrix[1] * gl_MultiTexCoord1).st; gl_Position = ftransform(); diff --git a/examples/10.glsl/multitexture_rect.frag b/examples/10.glsl/shader/multitexture_rect.frag similarity index 99% rename from examples/10.glsl/multitexture_rect.frag rename to examples/10.glsl/shader/multitexture_rect.frag index 3eb9b2b4c..c77ce199a 100644 --- a/examples/10.glsl/multitexture_rect.frag +++ b/examples/10.glsl/shader/multitexture_rect.frag @@ -12,4 +12,3 @@ void main (void) vec4 color2 = texture2DRect(MyTex1, texcoord1); // texcoord2 does not work. gl_FragColor = (color + color2) / 2.; } - diff --git a/examples/10.glsl/multitexture_rect.vert b/examples/10.glsl/shader/multitexture_rect.vert similarity index 99% rename from examples/10.glsl/multitexture_rect.vert rename to examples/10.glsl/shader/multitexture_rect.vert index 2cade19b4..627e4bfe1 100644 --- a/examples/10.glsl/multitexture_rect.vert +++ b/examples/10.glsl/shader/multitexture_rect.vert @@ -3,7 +3,7 @@ varying vec2 texcoord2; void main() { - + texcoord1 = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; texcoord2 = (gl_TextureMatrix[1] * gl_MultiTexCoord1).st; gl_Position = ftransform(); diff --git a/examples/10.glsl/normal.frag b/examples/10.glsl/shader/normal.frag similarity index 99% rename from examples/10.glsl/normal.frag rename to examples/10.glsl/shader/normal.frag index eef7f86f6..fa7040c83 100644 --- a/examples/10.glsl/normal.frag +++ b/examples/10.glsl/shader/normal.frag @@ -19,7 +19,7 @@ void main (void) vec4 posD = texture2DRect(texture_mass, test1(coord+vec2( 1., 0.))) ; vec4 posH = texture2DRect(texture_mass, test1(coord+vec2( 0.,-1.))) ; vec4 posB = texture2DRect(texture_mass, test1(coord+vec2( 0., 1.))) ; - + vec3 normal = cross((posG.xyz-posD.xyz),(posH.xyz-posB.xyz)); color.xyz = normalize(normal); color.xyz = normal; diff --git a/examples/10.glsl/normal.vert b/examples/10.glsl/shader/normal.vert similarity index 98% rename from examples/10.glsl/normal.vert rename to examples/10.glsl/shader/normal.vert index fefc3663a..13ffc195b 100644 --- a/examples/10.glsl/normal.vert +++ b/examples/10.glsl/shader/normal.vert @@ -3,7 +3,7 @@ varying vec2 coord; void main() { - + coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; gl_Position = ftransform(); diff --git a/examples/10.glsl/panoramique.frag b/examples/10.glsl/shader/panoramique.frag similarity index 100% rename from examples/10.glsl/panoramique.frag rename to examples/10.glsl/shader/panoramique.frag diff --git a/examples/10.glsl/panoramique.vert b/examples/10.glsl/shader/panoramique.vert similarity index 100% rename from examples/10.glsl/panoramique.vert rename to examples/10.glsl/shader/panoramique.vert diff --git a/examples/10.glsl/texture.frag b/examples/10.glsl/shader/texture.frag similarity index 100% rename from examples/10.glsl/texture.frag rename to examples/10.glsl/shader/texture.frag diff --git a/examples/10.glsl/texture.vert b/examples/10.glsl/shader/texture.vert similarity index 100% rename from examples/10.glsl/texture.vert rename to examples/10.glsl/shader/texture.vert diff --git a/examples/10.glsl/texture_rect.frag b/examples/10.glsl/shader/texture_rect.frag similarity index 100% rename from examples/10.glsl/texture_rect.frag rename to examples/10.glsl/shader/texture_rect.frag diff --git a/examples/10.glsl/shader/tri2fan.frag b/examples/10.glsl/shader/tri2fan.frag new file mode 100644 index 000000000..f0d81281e --- /dev/null +++ b/examples/10.glsl/shader/tri2fan.frag @@ -0,0 +1,5 @@ +void main() +{ + gl_FragColor = vec4(1.0,1.0,1.0,0.1); + // set color +} diff --git a/examples/10.glsl/tri2fan.geom b/examples/10.glsl/shader/tri2fan.geom similarity index 92% rename from examples/10.glsl/tri2fan.geom rename to examples/10.glsl/shader/tri2fan.geom index 45961e25c..ff98206fc 100644 --- a/examples/10.glsl/tri2fan.geom +++ b/examples/10.glsl/shader/tri2fan.geom @@ -1,11 +1,11 @@ // Cyrille Henry 2010 -#version 120 +#version 120 #extension GL_EXT_geometry_shader4 : enable void main(void) { - + int i; //increment variable vec4 pos1,pos2, pos3, pos4, pos5; // tmp vec3 high; @@ -16,7 +16,7 @@ void main(void) pos3 = gl_PositionIn[i+2]; pos4 = (pos1 + pos2 + pos3) / 3.; // center of the triangle - high = 10.*cross(pos2.xyz-pos1.xyz,pos3.xyz-pos2.xyz); + high = 10.*cross(pos2.xyz-pos1.xyz,pos3.xyz-pos2.xyz); // hight and orientation of the piramide high = normalize(high); @@ -43,9 +43,8 @@ void main(void) gl_Position = gl_ModelViewProjectionMatrix * pos5; EmitVertex(); - EndPrimitive(); + EndPrimitive(); // new primitive } } - diff --git a/examples/10.glsl/tri2fan.vert b/examples/10.glsl/shader/tri2fan.vert similarity index 88% rename from examples/10.glsl/tri2fan.vert rename to examples/10.glsl/shader/tri2fan.vert index 2d22ff21d..bcc2538d2 100644 --- a/examples/10.glsl/tri2fan.vert +++ b/examples/10.glsl/shader/tri2fan.vert @@ -1,6 +1,4 @@ void main() -{ +{ gl_Position = gl_Vertex; } - - diff --git a/examples/10.glsl/vague.frag b/examples/10.glsl/shader/vague.frag similarity index 79% rename from examples/10.glsl/vague.frag rename to examples/10.glsl/shader/vague.frag index 7b6a2f36e..41961bd93 100644 --- a/examples/10.glsl/vague.frag +++ b/examples/10.glsl/shader/vague.frag @@ -2,12 +2,12 @@ #extension GL_ARB_texture_rectangle : enable -uniform float K; +uniform float K; uniform sampler2DRect texture, texture1, texture2; -const float dx = 1.; -const float dy = 1.; -const float dp = 1.; +const float dx = 1.; +const float dy = 1.; +const float dp = 1.; void main (void) { diff --git a/examples/10.glsl/wave.frag b/examples/10.glsl/shader/wave.frag similarity index 93% rename from examples/10.glsl/wave.frag rename to examples/10.glsl/shader/wave.frag index d455f884a..3f0cdbce5 100644 --- a/examples/10.glsl/wave.frag +++ b/examples/10.glsl/shader/wave.frag @@ -5,7 +5,7 @@ uniform float K1,K3,D1,K; uniform sampler2DRect text; -const float dx = 1.; +const float dx = 1.; const float dy = 1.; void main (void) @@ -17,7 +17,7 @@ void main (void) x=texture1.x; y=texture1.y; - C = texture2DRect(text, vec2(x, y)); + C = texture2DRect(text, vec2(x, y)); vec4 color_cote = texture2DRect(text, vec2(x-dx, y-dy)); color_cote += texture2DRect(text, vec2(x+dx, y-dy)); diff --git a/examples/10.glsl/single_blur.pd b/examples/10.glsl/single_blur.pd index 76088b796..7872c82aa 100644 --- a/examples/10.glsl/single_blur.pd +++ b/examples/10.glsl/single_blur.pd @@ -2,14 +2,9 @@ #X obj 99 59 inlet; #X obj 26 145 gemframebuffer; #X obj 26 215 translateXYZ 0 0 -4; -#X obj 26 285 pix_texture; -#X obj 26 305 square 4; -#X msg 43 264 quality 1 \, rectangle 0; -#X obj 43 243 loadbang; +#X obj 26 345 square 4; #X obj 128 431 outlet; -#X obj 26 195 _glsl blur; -#X obj 47 166 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 47 166 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 248 85 t f f; #X obj 248 17 r blur; #X obj 248 133 pack f f; @@ -25,31 +20,31 @@ #X obj 441 65 * \$2; #X obj 441 41 unpack f f; #X obj 508 65 * \$2; -#X connect 0 0 3 1; -#X connect 1 0 8 0; -#X connect 1 1 7 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 5 0 3 0; -#X connect 6 0 5 0; -#X connect 8 0 2 0; -#X connect 9 0 8 0; -#X connect 10 0 14 0; -#X connect 10 1 15 0; -#X connect 11 0 18 0; -#X connect 12 0 16 0; +#X obj 26 195 glsl shader/blur; +#X obj 26 285 pix_texture \; quality 1 \; rectangle 0; +#X connect 0 0 22 1; +#X connect 1 0 21 0; +#X connect 1 1 4 0; +#X connect 2 0 22 0; +#X connect 5 0 21 0; +#X connect 6 0 10 0; +#X connect 6 1 11 0; +#X connect 7 0 14 0; +#X connect 8 0 12 0; +#X connect 9 0 1 0; +#X connect 10 0 8 0; +#X connect 11 0 8 1; +#X connect 12 0 21 1; #X connect 13 0 1 0; -#X connect 14 0 12 0; -#X connect 15 0 12 1; -#X connect 16 0 8 1; -#X connect 17 0 1 0; -#X connect 18 0 10 0; -#X connect 18 1 19 0; -#X connect 19 0 14 0; -#X connect 19 1 15 0; -#X connect 20 0 23 0; -#X connect 21 0 16 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 23 1 24 0; -#X connect 24 0 21 1; +#X connect 14 0 6 0; +#X connect 14 1 15 0; +#X connect 15 0 10 0; +#X connect 15 1 11 0; +#X connect 16 0 19 0; +#X connect 17 0 12 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 19 1 20 0; +#X connect 20 0 17 1; +#X connect 21 0 2 0; +#X connect 22 0 3 0; diff --git a/examples/10.glsl/tri2fan.frag b/examples/10.glsl/tri2fan.frag deleted file mode 100644 index 391dc6893..000000000 --- a/examples/10.glsl/tri2fan.frag +++ /dev/null @@ -1,6 +0,0 @@ -void main() -{ - gl_FragColor = vec4(1.0,1.0,1.0,0.1); - // set color -} - diff --git a/examples/15.openGL3.2/01.basic.pd b/examples/15.openGL3.2/01.basic.pd new file mode 100644 index 000000000..d23915307 --- /dev/null +++ b/examples/15.openGL3.2/01.basic.pd @@ -0,0 +1,130 @@ +#N canvas 291 103 1078 659 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 267 14 gemhead; +#X msg 411 444 program \$1; +#X obj 433 483 cnv 15 120 30 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X msg 441 489 print_attributes; +#X text 490 444 <----- essential for lookup functions; +#X obj 330 560 print vb; +#X obj 44 9 declare -lib Gem; +#X msg 384 370 attribute position \$1_position \, attribute color \$1_color; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 303 536 t a a; +#X obj 40 175 table \$0_position 9; +#X obj 40 196 table \$0_color 9; +#X obj 41 235 loadbang; +#X obj 41 283 s \$0_position; +#X obj 40 364 s \$0_color; +#X msg 40 341 0 1 0 0 0 1 0 0 0 1; +#X msg 41 260 0 -0.8 -0.8 0 0 0.8 0 0.8 -0.8 0; +#X obj 40 317 loadbang; +#X text 444 124 OpenGL 3.2 deprecated the fixed-function pipeline \, which was less flexible and harder to optimize \, in favor of the programmable pipeline using shaders \, allowing for more customizable and efficient rendering techniques., f 88; +#X text 445 19 OpenGL 3.2 introduced deprecation of immediate mode rendering \, encouraging the use of Vertex Buffer Objects (VBOs) and Vertex Array Objects (VAOs) for more efficient and modern graphics programming. This shift was made to improve performance and flexibility \, aligning OpenGL with contemporary GPU capabilities and programming practices., f 88; +#X text 445 85 VBOs are crucial because they represent the modern and efficient way to manage vertex data in OpenGL \, replacing the older and less performant immediate mode., f 88; +#X text 444 178 With the deprecation of the fixed-function pipeline in OpenGL 3.2 \, users must now manually handle many aspects that were previously automated \, such as matrix transformations and lighting calculations \, by writing their own shaders and managing buffers \, which offers greater control but requires more effort and understanding of the rendering process., f 88; +#X obj 267 276 glsl shader/01.basic; +#X obj 384 343 \$0; +#X text 445 259 This example demonstrates how to use Vertex Buffer Objects (VBOs) in conjunction with shaders in OpenGL. It illustrates the process of creating and binding a VBO to store vertex data \, and then using a vertex shader and fragment shader to render that data., f 88; +#X text 47 522 click to see the shaders; +#X obj 39 399 loadbang; +#X obj 267 588 gemvertexbuffer \; resize 3 \; draw tri; +#X text 421 393 We are using attribute here \, since it's the way the shader will have access to the VBO data; +#X obj 384 321 t b f; +#X obj 55 449 textfile; +#X obj 39 498 textfile; +#X msg 39 474 read shader/01.basic.frag cr; +#X msg 55 426 read shader/01.basic.vert cr; +#X msg 121 450 print; +#X msg 106 497 print; +#X connect 0 0 1 0; +#X connect 2 0 24 0; +#X connect 3 0 11 0; +#X connect 5 0 11 0; +#X connect 9 0 11 0; +#X connect 11 0 29 0; +#X connect 11 1 7 0; +#X connect 14 0 18 0; +#X connect 17 0 16 0; +#X connect 18 0 15 0; +#X connect 19 0 17 0; +#X connect 24 0 29 0; +#X connect 24 1 31 0; +#X connect 25 0 9 0; +#X connect 28 0 34 0; +#X connect 28 0 35 0; +#X connect 31 0 25 0; +#X connect 31 1 3 0; +#X connect 34 0 33 0; +#X connect 35 0 32 0; +#X connect 36 0 32 0; +#X connect 37 0 33 0; diff --git a/examples/15.openGL3.2/02.transformation.pd b/examples/15.openGL3.2/02.transformation.pd new file mode 100644 index 000000000..51c72ff2d --- /dev/null +++ b/examples/15.openGL3.2/02.transformation.pd @@ -0,0 +1,189 @@ +#N canvas 418 184 989 704 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 287 14 gemhead; +#X msg 485 493 program \$1; +#X obj 492 523 cnv 15 120 30 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X msg 500 529 print_attributes; +#X text 569 493 <----- essential for lookup functions; +#X obj 350 610 print vb; +#X obj 44 9 declare -lib Gem; +#X obj 458 437 f \$0; +#X msg 458 469 attribute position \$1_position \, attribute color \$1_color; +#N canvas 171 609 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 323 586 t a a; +#X obj 40 175 table \$0_position 9; +#X obj 40 196 table \$0_color 9; +#X obj 41 235 loadbang; +#X obj 41 283 s \$0_position; +#X obj 40 364 s \$0_color; +#X msg 40 341 0 1 0 0 0 1 0 0 0 1; +#X msg 41 260 0 -0.8 -0.8 0 0 0.8 0 0.8 -0.8 0; +#X obj 40 317 loadbang; +#X obj 533 23 gemhead; +#X floatatom 568 55 5 0 0 0 - - - 0; +#X floatatom 603 55 5 0 0 0 - - - 0; +#X floatatom 638 55 5 0 0 0 - - - 0; +#X floatatom 549 198 5 0 0 0 - - - 0; +#X floatatom 583 198 5 0 0 0 - - - 0; +#X floatatom 617 198 5 0 0 0 - - - 0; +#X floatatom 547 104 5 0 0 0 - - - 0; +#X floatatom 581 104 5 0 0 0 - - - 0; +#X floatatom 615 104 5 0 0 0 - - - 0; +#N canvas 437 191 753 491 shear 0; +#X obj 25 17 inlet; +#X obj 25 270 outlet; +#X obj 108 21 inlet; +#X obj 205 20 inlet; +#X obj 297 18 inlet; +#X text 117 38 ShearXY; +#X text 217 37 ShearXZ; +#X text 306 36 ShearYZ; +#X obj 25 104 shearXY; +#X obj 25 153 shearXZ; +#X obj 25 212 shearYZ; +#X connect 0 0 8 0; +#X connect 2 0 8 1; +#X connect 3 0 9 1; +#X connect 4 0 10 1; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 1 0; +#X restore 533 171 pd shear; +#X obj 533 219 rotateXYZ; +#X obj 533 123 scaleXYZ; +#X floatatom 547 150 5 0 0 0 - - - 0; +#X floatatom 581 150 5 0 0 0 - - - 0; +#X floatatom 615 150 5 0 0 0 - - - 0; +#X obj 533 244 gemlist_matrix; +#X obj 614 271 list prepend transformation_matrix; +#X obj 614 293 list trim; +#X obj 533 78 translateXYZ 0 0 4; +#X text 583 350 The transformation matrix is not sent to the shader \, we need to create one and pass it (like a standard variable) to the shader; +#X obj 287 638 gemvertexbuffer \; resize 9 \; draw tri; +#X obj 287 162 translateXYZ; +#X floatatom 310 117 5 0 0 0 - - - 0; +#X text 349 116 this transformation is ignored..., f 19; +#X text 586 402 Z translation has no effect since the perspective is not yet implemented; +#X obj 458 408 t b f; +#X obj 287 377 glsl shader/02.transformation; +#X obj 39 399 loadbang; +#X obj 39 499 textfile; +#X msg 39 475 read shader/02.transformation.frag cr; +#X obj 59 452 textfile; +#X msg 59 429 read shader/02.transformation.vert cr; +#X msg 101 500 print; +#X msg 121 452 print; +#X connect 0 0 1 0; +#X connect 2 0 43 0; +#X connect 3 0 12 0; +#X connect 5 0 12 0; +#X connect 9 0 10 0; +#X connect 10 0 12 0; +#X connect 12 0 42 0; +#X connect 12 1 7 0; +#X connect 15 0 19 0; +#X connect 18 0 17 0; +#X connect 19 0 16 0; +#X connect 20 0 18 0; +#X connect 21 0 40 0; +#X connect 22 0 40 1; +#X connect 23 0 40 2; +#X connect 24 0 40 3; +#X connect 25 0 32 1; +#X connect 26 0 32 2; +#X connect 27 0 32 3; +#X connect 28 0 33 1; +#X connect 29 0 33 2; +#X connect 30 0 33 3; +#X connect 31 0 32 0; +#X connect 32 0 37 0; +#X connect 33 0 31 0; +#X connect 34 0 31 1; +#X connect 35 0 31 2; +#X connect 36 0 31 3; +#X connect 37 1 38 0; +#X connect 38 0 39 0; +#X connect 39 0 48 1; +#X connect 40 0 33 0; +#X connect 43 0 48 0; +#X connect 44 0 43 1; +#X connect 47 0 9 0; +#X connect 47 1 3 0; +#X connect 48 0 42 0; +#X connect 48 1 47 0; +#X connect 49 0 51 0; +#X connect 49 0 53 0; +#X connect 51 0 50 0; +#X connect 53 0 52 0; +#X connect 54 0 50 0; +#X connect 55 0 52 0; diff --git a/examples/15.openGL3.2/03.matrix.pd b/examples/15.openGL3.2/03.matrix.pd new file mode 100644 index 000000000..3e064ef8d --- /dev/null +++ b/examples/15.openGL3.2/03.matrix.pd @@ -0,0 +1,405 @@ +#N canvas 506 110 1450 697 12; +#X obj 21 209 GEMglLoadIdentity; +#X obj 21 174 gemhead; +#X obj 21 255 translateXYZ; +#X obj 21 302 scaleXYZ; +#X obj 21 348 rotateXYZ; +#X obj 21 371 gemlist_matrix; +#X floatatom 48 232 5 0 0 0 - - - 0; +#X floatatom 87 232 5 0 0 0 - - - 0; +#X floatatom 126 232 5 0 0 0 - - - 0; +#X floatatom 38 278 5 0 0 0 - - - 0; +#X floatatom 77 279 5 0 0 0 - - - 0; +#X floatatom 116 279 5 0 0 0 - - - 0; +#X floatatom 41 325 5 0 0 0 - - - 0; +#X floatatom 80 326 5 0 0 0 - - - 0; +#X floatatom 119 327 5 0 0 0 - - - 0; +#X obj 128 399 print; +#X obj 22 427 list split 4; +#X obj 22 452 list split 4; +#X obj 21 476 list split 4; +#X obj 21 501 list split 4; +#X listbox 119 429 20 0 0 0 - - - 0; +#X listbox 118 455 20 0 0 0 - - - 0; +#X listbox 118 480 20 0 0 0 - - - 0; +#X listbox 118 504 20 0 0 0 - - - 0; +#X obj 288 175 gemhead; +#X obj 288 208 gemlist_matrix; +#X obj 394 242 print; +#X obj 288 430 list split 4; +#X obj 288 455 list split 4; +#X obj 287 479 list split 4; +#X obj 287 504 list split 4; +#X listbox 385 432 20 0 0 0 - - - 0; +#X listbox 384 458 20 0 0 0 - - - 0; +#X listbox 384 483 20 0 0 0 - - - 0; +#X listbox 384 507 20 0 0 0 - - - 0; +#X obj 543 178 gemhead; +#X obj 543 259 translateXYZ; +#X obj 543 306 scaleXYZ; +#X obj 543 352 rotateXYZ; +#X obj 543 375 gemlist_matrix; +#X floatatom 570 236 5 0 0 0 - - - 0; +#X floatatom 609 236 5 0 0 0 - - - 0; +#X floatatom 648 236 5 0 0 0 - - - 0; +#X floatatom 560 282 5 0 0 0 - - - 0; +#X floatatom 599 283 5 0 0 0 - - - 0; +#X floatatom 638 283 5 0 0 0 - - - 0; +#X floatatom 563 329 5 0 0 0 - - - 0; +#X floatatom 602 330 5 0 0 0 - - - 0; +#X floatatom 641 331 5 0 0 0 - - - 0; +#X obj 650 403 print; +#X obj 544 431 list split 4; +#X obj 544 456 list split 4; +#X obj 543 480 list split 4; +#X obj 543 505 list split 4; +#X listbox 641 433 20 0 0 0 - - - 0; +#X listbox 640 459 20 0 0 0 - - - 0; +#X listbox 640 484 20 0 0 0 - - - 0; +#X listbox 640 508 20 0 0 0 - - - 0; +#N canvas 115 312 498 411 build_ortho 0; +#X obj 28 19 inlet; +#X text 89 22 left \, right \, bottom \, top \, nearZ \, farZ; +#X msg 28 97 \$2 \$1; +#X obj 60 153 -; +#X text 95 154 width; +#X obj 28 154 +; +#X msg 60 178 2 \$1; +#X obj 60 202 /; +#X obj 28 129 t a a; +#X obj 28 202 /; +#X obj 28 65 t a a a; +#X obj 179 155 -; +#X obj 147 156 +; +#X msg 179 180 2 \$1; +#X obj 179 204 /; +#X obj 147 131 t a a; +#X obj 147 204 /; +#X obj 298 156 -; +#X obj 266 157 +; +#X obj 298 205 /; +#X obj 266 132 t a a; +#X obj 266 205 /; +#X msg 147 99 \$4 \$3; +#X text 207 156 height; +#X msg 266 100 \$6 \$5; +#X text 333 157 depth; +#X obj 28 268 pack f f f f f f, f 43; +#X obj 28 335 outlet; +#X obj 28 236 * -1; +#X obj 147 237 * -1; +#X obj 266 237 * -1; +#X msg 28 301 \$2 0 0 0 0 \$4 0 0 0 0 \$6 0 \$1 \$3 \$5 1; +#X msg 298 181 -2 \$1; +#X connect 0 0 10 0; +#X connect 2 0 8 0; +#X connect 3 0 6 0; +#X connect 3 0 9 1; +#X connect 5 0 9 0; +#X connect 6 0 7 0; +#X connect 7 0 26 1; +#X connect 8 0 5 0; +#X connect 8 1 3 0; +#X connect 9 0 28 0; +#X connect 10 0 2 0; +#X connect 10 1 22 0; +#X connect 10 2 24 0; +#X connect 11 0 13 0; +#X connect 11 0 16 1; +#X connect 12 0 16 0; +#X connect 13 0 14 0; +#X connect 14 0 26 3; +#X connect 15 0 12 0; +#X connect 15 1 11 0; +#X connect 16 0 29 0; +#X connect 17 0 32 0; +#X connect 17 0 21 1; +#X connect 18 0 21 0; +#X connect 19 0 26 5; +#X connect 20 0 18 0; +#X connect 20 1 17 0; +#X connect 21 0 30 0; +#X connect 22 0 15 0; +#X connect 24 0 20 0; +#X connect 26 0 31 0; +#X connect 28 0 26 0; +#X connect 29 0 26 2; +#X connect 30 0 26 4; +#X connect 31 0 27 0; +#X connect 32 0 19 0; +#X restore 843 220 pd build_ortho; +#X text 953 195 left \, right \, bottom \, top \, nearZ \, farZ; +#X obj 853 253 list split 4; +#X obj 853 278 list split 4; +#X obj 852 302 list split 4; +#X obj 852 327 list split 4; +#X listbox 950 255 20 0 0 0 - - - 0; +#X listbox 949 281 20 0 0 0 - - - 0; +#X listbox 949 306 20 0 0 0 - - - 0; +#X listbox 949 330 20 0 0 0 - - - 0; +#X text 19 140 Model Matrix :; +#X text 287 137 View Matrix :; +#X text 541 138 Model * View Matrix; +#X text 839 145 Projection Matrix; +#X msg 843 193 -4 4 -4 4 0 20; +#X text 853 399 fovY (field of view) \, aspect ratio \, nearZ \, farZ; +#X text 840 378 perspective projection :; +#X text 838 162 orthographic projection :; +#X obj 1233 413 /; +#X obj 1232 272 r __gem; +#X obj 1232 297 route dimen; +#X obj 1232 322 /; +#X floatatom 1233 440 5 0 0 0 - - - 0; +#X obj 843 515 list split 4; +#X obj 843 540 list split 4; +#X obj 842 564 list split 4; +#X obj 842 589 list split 4; +#X listbox 940 517 20 0 0 0 - - - 0; +#X listbox 939 543 20 0 0 0 - - - 0; +#X listbox 939 568 20 0 0 0 - - - 0; +#X listbox 939 592 20 0 0 0 - - - 0; +#X floatatom 1232 351 5 0 0 0 - - - 0; +#X text 1234 240 tips :; +#X obj 27 551 list prepend modelMatrix; +#X obj 287 551 list prepend viewMatrix; +#X obj 814 622 list prepend projMatrix; +#X obj 27 574 list trim; +#X obj 287 574 list trim; +#X obj 814 646 list trim; +#X obj 27 598 s shader_matrix; +#X obj 287 596 s shader_matrix; +#X obj 814 670 s shader_matrix; +#X text 27 35 The model matrix combines the geometry transformations. It can be computed with a specific library \, or with standard openGL objects., f 30; +#N canvas 234 350 511 439 build_perspective 0; +#X obj 37 24 inlet; +#X obj 37 108 * 0.5; +#X obj 37 132 tan; +#X msg 37 83 \$1; +#X msg 37 156 1 \$1; +#X obj 37 181 /; +#X obj 323 190 -; +#X obj 69 234 pack f f; +#X msg 122 210 \$2; +#X msg 183 167 \$3 \$4; +#X obj 183 197 +; +#X msg 261 160 \$3 \$4; +#X obj 261 190 *; +#X obj 37 209 t f f; +#X msg 37 314 \$2 0 0 0 0 \$1 0 0 0 0 \$3 -1 0 0 \$4 0; +#X obj 37 52 t a a a a a, f 35; +#X obj 37 284 pack f f f f, f 32; +#X obj 37 342 outlet; +#X obj 69 259 /; +#X obj 183 240 /; +#X obj 261 217 * 2; +#X obj 261 243 /; +#X msg 323 165 \$3 \$4; +#X connect 0 0 15 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 1 0; +#X connect 4 0 5 0; +#X connect 5 0 13 0; +#X connect 6 0 19 1; +#X connect 6 0 21 1; +#X connect 7 0 18 0; +#X connect 8 0 7 1; +#X connect 9 0 10 0; +#X connect 10 0 19 0; +#X connect 11 0 12 0; +#X connect 12 0 20 0; +#X connect 13 0 16 0; +#X connect 13 1 7 0; +#X connect 14 0 17 0; +#X connect 15 0 3 0; +#X connect 15 1 8 0; +#X connect 15 2 9 0; +#X connect 15 3 11 0; +#X connect 15 4 22 0; +#X connect 16 0 14 0; +#X connect 18 0 16 1; +#X connect 19 0 16 2; +#X connect 20 0 21 0; +#X connect 21 0 16 3; +#X connect 22 0 6 0; +#X restore 843 484 pd build_perspective; +#X text 274 38 The view matrix represents the camera position and orientation. It can be set via a message to the gemwin object, f 31; +#X text 535 34 Since the shader needs only the multiplication of the model matrix and the view matrix \, you can get this combination directly : (not used in this example), f 35; +#N canvas 130 82 1016 644 shader 0; +#X obj 53 27 gemhead; +#X obj 65 164 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 411 94 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X msg 438 110 modelMatrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1; +#X msg 438 137 viewMatrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -4 1; +#X msg 438 164 projMatrix 1.8 0 0 0 0 1.8 0 0 0 0 -1 -1 0 0 -0.2 0; +#X obj 53 79 translateXYZ; +#X floatatom 76 53 5 0 0 0 - - - 0; +#X obj 133 150 r shader_matrix; +#X text 119 52 <- this is useless since the shader can't access the transformation matrix. See next patch for more explanations, f 117; +#X msg 229 283 program \$1; +#X obj 229 432 print vb; +#X obj 197 408 t a a; +#X obj 669 306 table \$0_position 9; +#X obj 666 384 loadbang; +#X obj 666 432 s \$0_position; +#X msg 666 409 0 -0.8 -0.8 0 0 0.8 0 0.8 -0.8 0; +#X obj 665 466 loadbang; +#X obj 197 312 \$0; +#X floatatom 243 227 5 0 0 0 - - - 0; +#X obj 669 328 table \$0_normal 9; +#X obj 665 513 s \$0_normal; +#X obj 53 501 gemvertexbuffer \; resize 3 \; draw tri; +#X msg 665 490 0 0 0 1 0 0 1 0 0 1 0 0 1; +#X obj 197 257 t b f; +#X obj 670 351 table \$0_color 9; +#X obj 664 540 loadbang; +#X obj 664 587 s \$0_color; +#X msg 664 564 0 1 0 0 0 1 0 0 0 1; +#X obj 53 189 glsl shader/03.matrix; +#X msg 221 380 print_attributes; +#X msg 197 336 attribute position \$1_position \, attribute normal \$1_normal \, attribute color \$1_color; +#X obj 329 465 loadbang; +#X obj 329 565 textfile; +#X obj 349 518 textfile; +#X msg 391 566 print; +#X msg 411 518 print; +#X msg 349 495 read shader/03.matrix.vert cr; +#X msg 329 541 read shader/03.matrix.frag cr; +#X connect 0 0 6 0; +#X connect 1 0 29 0; +#X connect 2 0 3 0; +#X connect 2 0 5 0; +#X connect 2 0 4 0; +#X connect 3 0 29 1; +#X connect 4 0 29 1; +#X connect 5 0 29 1; +#X connect 6 0 29 0; +#X connect 7 0 6 1; +#X connect 8 0 29 1; +#X connect 10 0 22 0; +#X connect 12 0 22 0; +#X connect 12 1 11 0; +#X connect 14 0 16 0; +#X connect 16 0 15 0; +#X connect 17 0 23 0; +#X connect 18 0 31 0; +#X connect 23 0 21 0; +#X connect 24 0 18 0; +#X connect 24 1 10 0; +#X connect 26 0 28 0; +#X connect 28 0 27 0; +#X connect 29 0 22 0; +#X connect 29 1 2 0; +#X connect 29 1 19 0; +#X connect 29 1 24 0; +#X connect 30 0 12 0; +#X connect 31 0 12 0; +#X connect 32 0 38 0; +#X connect 32 0 37 0; +#X connect 35 0 33 0; +#X connect 36 0 34 0; +#X connect 37 0 34 0; +#X connect 38 0 33 0; +#X restore 1228 514 pd shader; +#X obj 1228 550 _gemwin; +#X text 27 8 This patch creates the various matrices used by the rendering pipeline, f 103; +#X text 834 28 The projection matrix transforms 3D coordinates from view space to clip space \, defining what is visible to the camera. It determines how objects are projected onto the 2D screen \, either with perspective effects (objects appear smaller with distance) or orthographically (maintaining consistent size regardless of distance). it represents the camera; +#X msg 843 427 1.57 1 0 20; +#X text 948 429 Gem wild angle; +#X text 1264 321 real gemwin aspect ratio; +#X msg 870 457 0.5 1 0 20; +#X msg 1233 385 3.14159 4; +#X text 1282 412 45° fov (this is a wild angle), f 21; +#X floatatom 1139 586 5 0 0 0 - - - 0; +#X msg 1138 617 \$1 1 1 100; +#X msg 1169 481 1.57 1 1 100; +#X text 959 460 smaller vision angle; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 1 16 0; +#X connect 5 1 91 0; +#X connect 6 0 2 1; +#X connect 7 0 2 2; +#X connect 8 0 2 3; +#X connect 9 0 3 1; +#X connect 10 0 3 2; +#X connect 11 0 3 3; +#X connect 12 0 4 1; +#X connect 13 0 4 2; +#X connect 14 0 4 3; +#X connect 16 0 20 0; +#X connect 16 1 17 0; +#X connect 17 0 21 0; +#X connect 17 1 18 0; +#X connect 18 0 22 0; +#X connect 18 1 19 0; +#X connect 19 0 23 0; +#X connect 24 0 25 0; +#X connect 25 1 27 0; +#X connect 25 1 92 0; +#X connect 27 0 31 0; +#X connect 27 1 28 0; +#X connect 28 0 32 0; +#X connect 28 1 29 0; +#X connect 29 0 33 0; +#X connect 29 1 30 0; +#X connect 30 0 34 0; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 37 0 38 0; +#X connect 38 0 39 0; +#X connect 39 1 50 0; +#X connect 40 0 36 1; +#X connect 41 0 36 2; +#X connect 42 0 36 3; +#X connect 43 0 37 1; +#X connect 44 0 37 2; +#X connect 45 0 37 3; +#X connect 46 0 38 1; +#X connect 47 0 38 2; +#X connect 48 0 38 3; +#X connect 50 0 54 0; +#X connect 50 1 51 0; +#X connect 51 0 55 0; +#X connect 51 1 52 0; +#X connect 52 0 56 0; +#X connect 52 1 53 0; +#X connect 53 0 57 0; +#X connect 58 0 60 0; +#X connect 58 0 93 0; +#X connect 60 0 64 0; +#X connect 60 1 61 0; +#X connect 61 0 65 0; +#X connect 61 1 62 0; +#X connect 62 0 66 0; +#X connect 62 1 63 0; +#X connect 63 0 67 0; +#X connect 72 0 58 0; +#X connect 76 0 80 0; +#X connect 77 0 78 0; +#X connect 78 0 79 0; +#X connect 79 0 89 0; +#X connect 81 0 85 0; +#X connect 81 1 82 0; +#X connect 82 0 86 0; +#X connect 82 1 83 0; +#X connect 83 0 87 0; +#X connect 83 1 84 0; +#X connect 84 0 88 0; +#X connect 91 0 94 0; +#X connect 92 0 95 0; +#X connect 93 0 96 0; +#X connect 94 0 97 0; +#X connect 95 0 98 0; +#X connect 96 0 99 0; +#X connect 101 0 81 0; +#X connect 101 0 93 0; +#X connect 108 0 101 0; +#X connect 111 0 101 0; +#X connect 112 0 76 0; +#X connect 114 0 115 0; +#X connect 115 0 101 0; +#X connect 116 0 101 0; diff --git a/examples/15.openGL3.2/04.model.pd b/examples/15.openGL3.2/04.model.pd new file mode 100644 index 000000000..1dbc6857d --- /dev/null +++ b/examples/15.openGL3.2/04.model.pd @@ -0,0 +1,186 @@ +#N canvas 753 73 967 800 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 158 pd fps; +#X floatatom 44 181 5 0 0 1 fps - - 0; +#X obj 267 104 gemhead; +#X msg 410 570 program \$1; +#X obj 423 604 cnv 15 120 30 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X msg 431 610 print_attributes; +#X obj 384 447 t b f; +#X obj 330 670 print vb; +#X obj 44 63 declare -lib Gem; +#N canvas 171 609 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 105 pd gemwin; +#X obj 303 646 t a a; +#X obj 528 105 gemhead; +#X floatatom 563 137 5 0 0 0 - - - 0; +#X floatatom 598 137 5 0 0 0 - - - 0; +#X floatatom 544 250 5 0 0 0 - - - 0; +#X floatatom 578 250 5 0 0 0 - - - 0; +#X floatatom 612 250 5 0 0 0 - - - 0; +#X obj 528 271 rotateXYZ; +#X obj 528 296 gemlist_matrix; +#X obj 609 323 list prepend transformation_matrix; +#X obj 609 345 list trim; +#X obj 528 160 translateXYZ 0 0 4; +#N canvas 1001 526 302 371 table 0; +#X obj 29 30 table table_posX; +#X obj 29 53 table table_posY; +#X obj 29 76 table table_posZ; +#X obj 27 113 table table_normalX; +#X obj 27 136 table table_normalY; +#X obj 27 159 table table_normalZ; +#X obj 28 195 table table_colorR; +#X obj 28 215 table table_colorG; +#X obj 28 235 table table_colorB; +#X obj 28 255 table table_colorA; +#X restore 42 229 pd table; +#N canvas 1279 243 543 538 modelfiler 0; +#X obj 81 277 modelfiler; +#X obj 81 25 loadbang; +#X obj 144 24 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X msg 81 95 open ../data/venus.obj; +#X obj 81 303 route vertices; +#X msg 81 332 resize \$1; +#X obj 81 55 t b b b; +#X msg 201 361 sinesum 8192 0.5 0.25 0.25 0 0.2; +#X obj 81 419 s table_colorR; +#X obj 100 449 s table_colorG; +#X obj 120 479 s table_colorB; +#X msg 220 383 sinesum 8192 0.5 -0.25 0.25 0 0.2; +#X msg 240 409 sinesum 8192 0.5 0.25 -0.25 0 0.2; +#X msg 100 140 list table_pos table_color table_normal; +#X msg 100 163 position \$1X \$1Y \$1Z \, color \$2R \$2G \$2B \$2A \, normal \$3X \$3Y \$3Z, f 22; +#X obj 201 338 t b b b; +#X obj 81 355 t a a a; +#X connect 0 0 4 0; +#X connect 1 0 6 0; +#X connect 2 0 6 0; +#X connect 3 0 0 0; +#X connect 4 0 5 0; +#X connect 5 0 16 0; +#X connect 6 0 3 0; +#X connect 6 1 13 0; +#X connect 6 2 15 0; +#X connect 7 0 8 0; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 13 0 14 0; +#X connect 14 0 0 0; +#X connect 15 0 7 0; +#X connect 15 1 11 0; +#X connect 15 2 12 0; +#X connect 16 0 8 0; +#X connect 16 1 9 0; +#X connect 16 2 10 0; +#X restore 40 259 pd modelfiler; +#X obj 528 205 scaleXYZ 0.003 0.003 0.003; +#X obj 267 698 gemvertexbuffer \; draw tri; +#X obj 267 400 glsl shader/04.model; +#X obj 287 369 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X text 259 19 modelfiler loads a 3d object into tables. The pipeline is unchanges regarding the previous examples, f 93; +#X msg 384 472 attribute positionX table_posX \, attribute positionY table_posY \, attribute positionZ table_posZ \, attribute colorR table_colorR \, attribute colorG table_colorG \, attribute colorB table_colorB, f 67; +#X obj 31 461 loadbang; +#X obj 31 561 textfile; +#X obj 51 514 textfile; +#X msg 93 562 print; +#X msg 113 514 print; +#X msg 51 491 read shader/04.model.vert cr; +#X msg 31 537 read shader/04.model.frag cr; +#X connect 0 0 1 0; +#X connect 2 0 26 0; +#X connect 3 0 10 0; +#X connect 5 0 10 0; +#X connect 6 0 29 0; +#X connect 6 1 3 0; +#X connect 10 0 25 0; +#X connect 10 1 7 0; +#X connect 11 0 21 0; +#X connect 12 0 21 1; +#X connect 13 0 21 2; +#X connect 14 0 17 1; +#X connect 15 0 17 2; +#X connect 16 0 17 3; +#X connect 17 0 18 0; +#X connect 18 1 19 0; +#X connect 19 0 20 0; +#X connect 20 0 26 1; +#X connect 21 0 24 0; +#X connect 24 0 17 0; +#X connect 26 0 25 0; +#X connect 26 1 6 0; +#X connect 27 0 26 0; +#X connect 29 0 10 0; +#X connect 30 0 36 0; +#X connect 30 0 35 0; +#X connect 33 0 31 0; +#X connect 34 0 32 0; +#X connect 35 0 32 0; +#X connect 36 0 31 0; diff --git a/examples/15.openGL3.2/05.texture.pd b/examples/15.openGL3.2/05.texture.pd new file mode 100644 index 000000000..3452cfc27 --- /dev/null +++ b/examples/15.openGL3.2/05.texture.pd @@ -0,0 +1,144 @@ +#N canvas 598 264 892 616 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 368 70 gemhead; +#X msg 470 440 program \$1; +#X obj 464 470 cnv 15 120 30 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X msg 472 476 print_attributes; +#X obj 443 352 t b f; +#X text 548 440 <----- essential for lookup functions; +#X obj 431 536 print vb; +#X obj 44 9 declare -lib Gem; +#X obj 443 374 f \$0; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 404 512 t a a; +#X obj 41 235 loadbang; +#X obj 41 283 s \$0_position; +#X obj 40 317 loadbang; +#X obj 368 98 pix_image ../data/img1.jpg; +#X obj 368 123 pix_texture; +#X msg 41 260 0 -0.8 -0.8 0 -0.8 0.8 0 0.8 0.8 0 0.8 -0.8 0; +#X obj 40 175 table \$0_position 12; +#X obj 40 196 table \$0_texcoord 8; +#X obj 40 364 s \$0_texcoord; +#X msg 443 396 attribute position \$1_position \, attribute texcoord \$1_texcoord, f 63; +#X obj 368 159 pix_image ../data/img2.jpg; +#X floatatom 497 224 5 0 1 0 - - - 0; +#X msg 497 247 mix_factor \$1; +#X msg 40 341 0 0 1 0 0 1 0 1 1; +#X obj 368 184 pix_texture \; texunit 1; +#X obj 368 564 gemvertexbuffer \; draw quad; +#X text 538 223 <--------------------; +#X msg 386 254 print; +#X msg 554 315 Texture2 1; +#X text 263 12 Using textures did not really change; +#X obj 39 399 loadbang; +#X obj 378 229 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 368 281 glsl shader/05.texture; +#X msg 120 502 print; +#X msg 142 452 print; +#X obj 39 502 textfile; +#X obj 59 452 textfile; +#X msg 39 478 read shader/05.texture.frag cr; +#X msg 59 429 read shader/05.texture.vert cr; +#X connect 0 0 1 0; +#X connect 2 0 16 0; +#X connect 3 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 10 0; +#X connect 6 1 3 0; +#X connect 10 0 22 0; +#X connect 12 0 28 0; +#X connect 12 1 8 0; +#X connect 13 0 18 0; +#X connect 15 0 26 0; +#X connect 16 0 17 0; +#X connect 17 0 23 0; +#X connect 18 0 14 0; +#X connect 22 0 12 0; +#X connect 23 0 27 0; +#X connect 24 0 25 0; +#X connect 25 0 35 1; +#X connect 26 0 21 0; +#X connect 27 0 35 0; +#X connect 30 0 35 0; +#X connect 31 0 35 1; +#X connect 33 0 40 0; +#X connect 33 0 41 0; +#X connect 34 0 35 0; +#X connect 35 0 28 0; +#X connect 35 1 6 0; +#X connect 35 1 31 0; +#X connect 36 0 38 0; +#X connect 37 0 39 0; +#X connect 40 0 38 0; +#X connect 41 0 39 0; diff --git a/examples/15.openGL3.2/06.lighting.pd b/examples/15.openGL3.2/06.lighting.pd new file mode 100644 index 000000000..8f0e279c8 --- /dev/null +++ b/examples/15.openGL3.2/06.lighting.pd @@ -0,0 +1,194 @@ +#N canvas 817 105 967 800 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 267 74 gemhead; +#X msg 410 590 program \$1; +#X obj 423 624 cnv 15 120 30 empty empty empty 20 12 0 14 #c4fcc4 #404040 0; +#X msg 431 630 print_attributes; +#X obj 384 467 t b f; +#X obj 330 690 print vb; +#X obj 44 9 declare -lib Gem; +#N canvas 171 609 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 303 666 t a a; +#X obj 401 77 gemhead; +#X floatatom 436 129 5 0 0 0 - - - 0; +#X floatatom 471 129 5 0 0 0 - - - 0; +#X floatatom 417 222 5 0 0 0 - - - 0; +#X floatatom 451 222 5 0 0 0 - - - 0; +#X floatatom 485 222 5 0 0 0 - - - 0; +#X obj 401 243 rotateXYZ; +#X obj 401 268 gemlist_matrix; +#X obj 482 317 list trim; +#N canvas 325 467 302 371 table 0; +#X obj 29 30 table table_posX; +#X obj 29 53 table table_posY; +#X obj 29 76 table table_posZ; +#X obj 27 113 table table_normalX; +#X obj 27 136 table table_normalY; +#X obj 27 159 table table_normalZ; +#X obj 28 195 table table_colorR; +#X obj 28 215 table table_colorG; +#X obj 28 235 table table_colorB; +#X restore 41 229 pd table; +#N canvas 1279 243 543 538 modelfiler 0; +#X obj 81 277 modelfiler; +#X msg 106 132 position table_pos; +#X msg 118 158 color table_color; +#X msg 136 212 normal table_normal; +#X obj 81 25 loadbang; +#X obj 144 24 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 81 303 route vertices; +#X obj 81 55 t b b b; +#X obj 91 419 s table_colorR; +#X obj 91 449 s table_colorG; +#X obj 91 479 s table_colorB; +#X floatatom 110 363 10 0 0 0 - - - 0; +#X msg 81 95 open ../data/venus.obj; +#X msg 116 389 const 1; +#X msg 81 332 resize \$1 \, const 1; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 7 0; +#X connect 5 0 7 0; +#X connect 6 0 14 0; +#X connect 6 0 11 0; +#X connect 7 0 12 0; +#X connect 7 1 1 0; +#X connect 7 1 3 0; +#X connect 12 0 0 0; +#X connect 13 0 8 0; +#X connect 13 0 9 0; +#X connect 13 0 10 0; +#X connect 14 0 8 0; +#X connect 14 0 9 0; +#X connect 14 0 10 0; +#X restore 40 205 pd modelfiler; +#X msg 384 492 attribute positionX table_posX \, attribute positionY table_posY \, attribute positionZ table_posZ \, attribute normal_X table_normalX \, attribute normal_Y table_normalY \, attribute normal_Z table_normalZ \, attribute colorR table_colorR \, attribute colorG table_colorG \, attribute colorB table_colorB, f 67; +#X text 269 10 This example introduces the Blinn-Phong lighting model \, which enhances flexibility \, improves light quality \, and optimizes rendering performance compared to the older fixed-function pipeline., f 86; +#X listbox 726 276 20 0 0 0 - - - 0; +#X obj 288 333 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 30 402 loadbang; +#X obj 267 370 glsl shader/06.light; +#X obj 47 457 textfile; +#X msg 109 457 print; +#X msg 47 433 read shader/06.light.vert cr; +#X msg 30 481 read shader/06.light.frag cr; +#X obj 30 504 textfile; +#X msg 93 504 print; +#X obj 482 295 list prepend modelMatrix; +#X obj 401 187 scaleXYZ 0.01 0.01 0.01; +#X obj 267 718 gemvertexbuffer \; draw tri; +#X obj 401 108 GEMglLoadIdentity; +#X obj 401 152 translateXYZ 0 0 0; +#X floatatom 506 129 5 0 0 0 - - - 0; +#X msg 726 303 LightPosition \$1 \$2 \$3 1; +#X msg 726 249 5 2 5; +#X msg 448 408 LightPosition 5 2 5 1 \, LightL 0.8 0.8 0.8 \, LightLa 0.2 0.2 0.2 \, MaterialKa 0.2 0.2 0.2 \, MaterialKd 0.7 0.7 0.7 \, MaterialKs 1 1 1 \, MaterialShininess 32 \, projMatrix 1 0 0 0 0 1 0 0 0 0 -1 -1 0 0 -2 0 \, viewMatrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -4 1; +#X connect 0 0 1 0; +#X connect 2 0 27 0; +#X connect 3 0 10 0; +#X connect 5 0 10 0; +#X connect 6 0 22 0; +#X connect 6 1 3 0; +#X connect 10 0 36 0; +#X connect 10 1 7 0; +#X connect 11 0 37 0; +#X connect 12 0 38 1; +#X connect 13 0 38 2; +#X connect 14 0 17 1; +#X connect 15 0 17 2; +#X connect 16 0 17 3; +#X connect 17 0 18 0; +#X connect 18 1 34 0; +#X connect 19 0 27 1; +#X connect 22 0 10 0; +#X connect 24 0 40 0; +#X connect 25 0 27 0; +#X connect 26 0 30 0; +#X connect 26 0 31 0; +#X connect 27 0 36 0; +#X connect 27 1 6 0; +#X connect 27 1 42 0; +#X connect 29 0 28 0; +#X connect 30 0 28 0; +#X connect 31 0 32 0; +#X connect 33 0 32 0; +#X connect 34 0 19 0; +#X connect 35 0 17 0; +#X connect 37 0 38 0; +#X connect 38 0 35 0; +#X connect 39 0 38 3; +#X connect 40 0 27 1; +#X connect 41 0 24 0; +#X connect 42 0 27 1; diff --git a/examples/15.openGL3.2/07.geometry.pd b/examples/15.openGL3.2/07.geometry.pd new file mode 100644 index 000000000..ec02a6a61 --- /dev/null +++ b/examples/15.openGL3.2/07.geometry.pd @@ -0,0 +1,191 @@ +#N canvas 201 198 1145 664 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 333 104 gemhead; +#X msg 495 417 program \$1; +#X msg 506 440 print_attributes; +#X obj 495 488 print vb; +#X obj 44 9 declare -lib Gem; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 468 464 t a a; +#X obj 37 174 loadbang; +#X obj 37 228 s \$0_position; +#X obj 37 295 s \$0_color; +#X obj 37 255 loadbang; +#X obj 468 358 f \$0; +#X obj 488 287 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X floatatom 468 312 5 0 0 0 - - - 0; +#X obj 468 335 t b f; +#X obj 37 319 loadbang; +#X obj 37 359 s \$0_normal; +#X obj 36 381 loadbang; +#X obj 36 422 s \$0_texcoord; +#X obj 345 241 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X msg 468 382 attribute position \$1_position \, attribute normal \$1_normal \, attribute texCoord \$1_texcoord; +#X obj 691 171 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X msg 718 187 modelMatrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1; +#X msg 718 268 normalMatrix 1 0 0 0 1 0 0 0 1; +#X msg 718 295 lightPos 2 2 2; +#X msg 718 322 lightColor 1 1 1; +#X msg 718 349 ambientColor 0.2 0.2 0.2; +#X msg 718 214 viewMatrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -4 1; +#X msg 718 241 projMatrix 1.8 0 0 0 0 1.8 0 0 0 0 -1 -1 0 0 -0.2 0; +#X obj 333 156 translateXYZ; +#X floatatom 356 130 5 0 0 0 - - - 0; +#X text 399 129 <- this is useless since the shader can't access to the transformation matrix. See next patch for more explanations, f 117; +#X text 165 32 tables used by the vertex buffer; +#X msg 37 275 0 1 0 0 0 1 0 0 0 1 1 1 0; +#X msg 37 339 0 0 0 1 0 0 1 0 0 1 0 0 1; +#X msg 36 401 0 0 0 0 1 1 0 1 1; +#X msg 37 194 0 -0.8 -0.8 0 -0.8 0.8 0 0.8 -0.8 0 0.8 0.8 0, f 37; +#X obj 333 526 gemvertexbuffer \; resize 4 \; draw tristrip; +#N canvas 125 216 972 620 drawing_type 0; +#X text 40 50 VBO draw type : same as all openGL primitive; +#X text 46 433 geometry shader out type :; +#X text 70 345 points (pour GL_POINTS) \; lines (for GL_LINES \, GL_LINE_STRIP \, GL_LINE_LOOP) \; triangles (for GL_TRIANGLES \, GL_TRIANGLE_STRIP \, GL_TRIANGLE_FAN \; lines_adjacency (for GL_LINES_ADJACENCY) \; triangles_adjacency (for GL_TRIANGLES_ADJACENCY), f 66; +#X text 50 329 geometry shader in type :; +#X text 69 451 points line_strip triangle_strip, f 17; +#X text 78 71 point for GL_POINTS \; points for GL_POINTS \; line for GL_LINE_LOOP \; lineloop for GL_LINE_LOOP \; lines for GL_LINES \; linestrip for GL_LINE_STRIP \; linesadj for GL_LINES_ADJACENCY \; linestripadj for GL_LINE_STRIP_ADJACENCY \; tri for GL_TRIANGLES \; triangle for GL_TRIANGLES \; tristrip for GL_TRIANGLE_STRIP \; trifan for GL_TRIANGLE_FAN \; triadj for GL_TRIANGLES_ADJACENCY \; tristripadj for GL_TRIANGLE_STRIP_ADJACENCY \; quad for GL_QUADS \; quads for GL_QUADS \; quadstrip for GL_QUAD_STRIP \; strip for GL_TRIANGLE_STRIP \; fill for GL_POLYGON \;; +#X text 41 17 version >= 150; +#X text 529 13 version >=410; +#X text 501 370 GL_PATCHES for teselarisation; +#X text 754 9 version >=420; +#X obj 714 5 cnv 2 2 600 empty empty empty 20 12 0 10 #202020 #404040 0; +#X obj 474 7 cnv 2 2 600 empty empty empty 20 12 0 10 #202020 #404040 0; +#X text 744 461 invocations; +#X restore 981 576 pd drawing_type; +#X obj 40 462 loadbang; +#X obj 60 510 textfile; +#X obj 60 565 textfile; +#X obj 60 615 textfile; +#X text 449 12 This example introduces a simple geometry shader; +#X obj 167 53 table \$0_position 12; +#X obj 167 74 table \$0_color 12; +#X obj 167 95 table \$0_normal 12; +#X obj 167 116 table \$0_texcoord 8; +#X msg 119 511 print; +#X msg 122 566 print; +#X msg 123 614 print; +#X msg 60 486 read shader/07.geometry.frag cr; +#X msg 60 542 read shader/07.geometry.geom cr; +#X msg 60 592 read shader/07.geometry.vert cr; +#X obj 333 266 glsl shader/07.geometry; +#X text 422 39 A geometry shader sits between the vertex and fragment shaders in the graphics pipeline \, allowing for the creation \, modification \, or removal of primitives to dynamically generate new geometries based on the input vertices., f 80; +#X connect 0 0 1 0; +#X connect 2 0 31 0; +#X connect 3 0 8 0; +#X connect 4 0 8 0; +#X connect 8 0 39 0; +#X connect 8 1 5 0; +#X connect 9 0 38 0; +#X connect 12 0 35 0; +#X connect 13 0 22 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 13 0; +#X connect 16 1 3 0; +#X connect 17 0 36 0; +#X connect 19 0 37 0; +#X connect 21 0 56 0; +#X connect 22 0 8 0; +#X connect 23 0 24 0; +#X connect 23 0 28 0; +#X connect 23 0 27 0; +#X connect 23 0 26 0; +#X connect 23 0 30 0; +#X connect 23 0 29 0; +#X connect 23 0 25 0; +#X connect 24 0 56 1; +#X connect 25 0 56 1; +#X connect 26 0 56 1; +#X connect 27 0 56 1; +#X connect 28 0 56 1; +#X connect 29 0 56 1; +#X connect 30 0 56 1; +#X connect 31 0 56 0; +#X connect 32 0 31 1; +#X connect 35 0 11 0; +#X connect 36 0 18 0; +#X connect 37 0 20 0; +#X connect 38 0 10 0; +#X connect 41 0 53 0; +#X connect 41 0 54 0; +#X connect 41 0 55 0; +#X connect 50 0 42 0; +#X connect 51 0 43 0; +#X connect 52 0 44 0; +#X connect 53 0 42 0; +#X connect 54 0 43 0; +#X connect 55 0 44 0; +#X connect 56 0 39 0; +#X connect 56 1 15 0; +#X connect 56 1 23 0; diff --git a/examples/15.openGL3.2/08.adjacency.pd b/examples/15.openGL3.2/08.adjacency.pd new file mode 100644 index 000000000..353b4252f --- /dev/null +++ b/examples/15.openGL3.2/08.adjacency.pd @@ -0,0 +1,145 @@ +#N canvas 651 236 1145 664 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 328 157 gemhead; +#X msg 484 360 program \$1; +#X msg 495 383 print_attributes; +#X obj 484 431 print vb; +#X obj 44 9 declare -lib Gem; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 457 407 t a a; +#X obj 37 174 loadbang; +#X obj 457 301 f \$0; +#X obj 477 230 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X floatatom 457 255 5 0 0 0 - - - 0; +#X obj 457 278 t b f; +#X obj 340 184 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X text 38 299 tables used by the vertex buffer; +#X obj 40 462 loadbang; +#X obj 60 510 textfile; +#X obj 60 565 textfile; +#X obj 60 615 textfile; +#X msg 119 511 print; +#X msg 122 566 print; +#X msg 123 614 print; +#N canvas 0 50 450 250 (subpatch) 0; +#X array \$0_positionY 10 float 3; +#A 0 -0.27142 0.557135 0.485707 -0.0857122 0.0571443 -0.371423 0.228574 0.442858 -0.471418 0.0571475; +#X coords 0 1 10 -1 200 140 1 0 0; +#X restore 881 424 graph; +#X obj 455 512 f \$0; +#X obj 455 465 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 37 218 s \$0_positionX; +#X msg 457 325 attribute positionX \$1_positionX \, attribute positionY \$1_positionY, f 67; +#X msg 455 536 attribute positionY \$1_positionY; +#X msg 37 196 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8; +#X obj 35 270 table \$0_positionX 10; +#X obj 328 569 gemvertexbuffer \; resize 10 \; draw linestripadj; +#X obj 455 488 metro 50; +#X text 480 465 <- switch on to update the position \, and play with the tab ->, f 64; +#X text 449 12 This example introduces adjacency; +#X text 323 32 This shader demonstrates cubic interpolation using adjacency information in a geometry shader. It takes a sequence of points and creates a smooth curved line passing through them \, using neighbouring points to calculate the curve's trajectory., f 94; +#X text 321 85 The vertex shader passes the input points to the geometry shader \, which uses the GL_LINES_ADJACENCY primitive type to access four consecutive vertices at once. For each set of four points \, it performs cubic interpolation to generate a smooth curve segment between the middle two points \, while using the outer points to influence the curvature., f 94; +#X obj 328 209 glsl shader/08.adjacency; +#X msg 60 486 read shader/08.adjacency.frag cr; +#X msg 60 542 read shader/08.adjacency.geom cr; +#X msg 60 592 read shader/08.adjacency.vert cr; +#X connect 0 0 1 0; +#X connect 2 0 37 0; +#X connect 3 0 8 0; +#X connect 4 0 8 0; +#X connect 8 0 31 0; +#X connect 8 1 5 0; +#X connect 9 0 29 0; +#X connect 10 0 27 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 10 0; +#X connect 13 1 3 0; +#X connect 14 0 37 0; +#X connect 16 0 39 0; +#X connect 16 0 40 0; +#X connect 16 0 38 0; +#X connect 20 0 17 0; +#X connect 21 0 18 0; +#X connect 22 0 19 0; +#X connect 24 0 28 0; +#X connect 25 0 32 0; +#X connect 27 0 8 0; +#X connect 28 0 31 0; +#X connect 29 0 26 0; +#X connect 32 0 24 0; +#X connect 37 0 31 0; +#X connect 37 1 12 0; +#X connect 38 0 17 0; +#X connect 39 0 18 0; +#X connect 40 0 19 0; diff --git a/examples/15.openGL3.2/09.tessellation.pd b/examples/15.openGL3.2/09.tessellation.pd new file mode 100644 index 000000000..9b31b2178 --- /dev/null +++ b/examples/15.openGL3.2/09.tessellation.pd @@ -0,0 +1,137 @@ +#N canvas 661 224 1019 676 10; +#X declare -lib Gem; +#N canvas 640 443 450 300 fps 0; +#X obj 60 28 gemhead; +#X obj 60 68 realtime; +#X obj 60 48 t b b; +#X obj 60 130 /; +#X msg 60 110 1000 \$1; +#X obj 60 235 outlet; +#X obj 60 152 + 0.5; +#X obj 60 214 i; +#N canvas 3 119 450 300 iir 0; +#X obj 63 31 inlet; +#X obj 63 81 +; +#X obj 63 107 / 21; +#X obj 119 138 * 20; +#X obj 63 176 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 1 1; +#X restore 60 182 pd iir; +#X connect 0 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X restore 44 104 pd fps; +#X floatatom 44 127 5 0 0 1 fps - - 0; +#X obj 302 246 gemhead; +#X msg 458 469 program \$1; +#X msg 469 492 print_attributes; +#X obj 458 540 print vb; +#X obj 44 9 declare -lib Gem; +#N canvas 340 107 682 322 gemwin 0; +#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 102 161 r \$0-gemstart; +#X obj 102 182 select 1 0; +#X msg 102 214 create \, 1; +#X msg 177 215 destroy; +#X obj 102 239 t a; +#X obj 318 54 inlet; +#X obj 318 255 gemwin; +#X obj 318 100 t a a; +#X obj 318 287 outlet; +#X obj 350 128 route create destroy; +#X obj 350 150 t b; +#X msg 350 172 1; +#X obj 390 150 t b; +#X msg 390 172 0; +#X obj 350 195 t f; +#X msg 350 219 set \$1; +#X text 118 122 rendering; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 8 1 10 0; +#X connect 10 0 11 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X coords 0 -1 1 1 85 40 1 100 100; +#X restore 42 51 pd gemwin; +#X obj 431 516 t a a; +#X obj 37 174 loadbang; +#X obj 431 410 f \$0; +#X obj 481 346 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X floatatom 431 364 5 0 0 0 - - - 0; +#X obj 431 387 t b f; +#X obj 314 303 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 40 402 loadbang; +#X obj 60 450 textfile; +#X obj 60 505 textfile; +#X obj 60 555 textfile; +#X msg 119 451 print; +#X msg 122 506 print; +#X msg 123 554 print; +#X text 453 11 This example introduces tessellation shaders; +#X obj 302 328 glsl shader/09.tessellation; +#X obj 302 277 GEMglPatchParameteri 3; +#X obj 37 218 s \$0_position; +#X msg 37 196 0 -0.8 -0.8 0 0 0.8 0 0.8 -0.8 0; +#X obj 302 578 gemvertexbuffer \; resize 3 \; draw patches; +#X msg 431 434 attribute position \$1_position, f 32; +#X obj 37 259 table \$0_position 9; +#X msg 60 426 read shader/09.tessellation.vert cr; +#X obj 60 605 textfile; +#X msg 123 604 print; +#X msg 60 480 read shader/09.tessellation.tesc cr; +#X msg 60 532 read shader/09.tessellation.tese cr; +#X msg 60 582 read shader/09.tessellation.frag cr; +#X text 283 34 This shader pipeline performs tessellation on a triangle primitive. Here's how it works: \; \; - The vertex shader (09.tessellation.vert) passes the original triangle vertices without modification. \; - The tessellation control shader (09.tessellation.tesc) sets up tessellation levels (5.0 for inner and outer edges) and passes vertex data to the tessellation evaluation shader. \; - The tessellation evaluation shader (09.tessellation.tese) subdivides the triangle into smaller triangles based on the tessellation levels and interpolates positions and normals for each new vertex. It also calculates pseudo random colors for each new vertex using cosine functions based on position. \; - Finally \, the fragment shader (09.tessellation.frag) renders each fragment with the color computed during tessellation. \; \; The result is a single triangle subdivided into many smaller triangles with a procedural color pattern that creates a visual effect with color variations based on position., f 94; +#X connect 0 0 1 0; +#X connect 2 0 24 0; +#X connect 3 0 8 0; +#X connect 4 0 8 0; +#X connect 8 0 27 0; +#X connect 8 1 5 0; +#X connect 9 0 26 0; +#X connect 10 0 28 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 10 0; +#X connect 13 1 3 0; +#X connect 14 0 23 0; +#X connect 15 0 33 0; +#X connect 15 0 34 0; +#X connect 15 0 30 0; +#X connect 15 0 35 0; +#X connect 19 0 16 0; +#X connect 20 0 17 0; +#X connect 21 0 18 0; +#X connect 23 0 27 0; +#X connect 23 1 12 0; +#X connect 24 0 23 0; +#X connect 26 0 25 0; +#X connect 28 0 8 0; +#X connect 30 0 16 0; +#X connect 32 0 31 0; +#X connect 33 0 17 0; +#X connect 34 0 18 0; +#X connect 35 0 31 0; diff --git a/examples/15.openGL3.2/shader/01.basic.frag b/examples/15.openGL3.2/shader/01.basic.frag new file mode 100644 index 000000000..ba695e533 --- /dev/null +++ b/examples/15.openGL3.2/shader/01.basic.frag @@ -0,0 +1,17 @@ +#version 460 + +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +// This is the fragment shader : it is executed for every pixel to display + +in vec3 Color_to_frag; +// the variable commint from the VBO + +out vec4 FragColor; +// The only output of this shader : the color of the pixel + +void main() { + FragColor = vec4(Color_to_frag, 1.0); + // the "Color_to_frag" variable is already interpolated between the 2 shaders. +} diff --git a/examples/15.openGL3.2/shader/01.basic.vert b/examples/15.openGL3.2/shader/01.basic.vert new file mode 100644 index 000000000..0255b675d --- /dev/null +++ b/examples/15.openGL3.2/shader/01.basic.vert @@ -0,0 +1,25 @@ +#version 460 + +//simple test shader +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +// This is the vertex shader, the 1st on the pipeline. It is executed for every vertex. + +layout (location=0) in vec3 position; +layout (location=1) in vec3 color; +// declare the mandatory input : we need 2 attributes named position and color from the VBO +// location must match the program_index from gemvertexbuffer (thanks to the print_attribute message) + +out vec3 Color_to_frag; +// the output of this shader is only a color. +// This variable will be interpolated between all vertices + +void main() +{ + Color_to_frag = color; + // initialise the variable to pass to the frag shader with data coming from the VBO + + gl_Position = vec4(position,1.0); // update vertex position from the VBO; + // No perspective is apply in this example +} diff --git a/examples/15.openGL3.2/shader/02.transformation.frag b/examples/15.openGL3.2/shader/02.transformation.frag new file mode 100644 index 000000000..ba695e533 --- /dev/null +++ b/examples/15.openGL3.2/shader/02.transformation.frag @@ -0,0 +1,17 @@ +#version 460 + +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +// This is the fragment shader : it is executed for every pixel to display + +in vec3 Color_to_frag; +// the variable commint from the VBO + +out vec4 FragColor; +// The only output of this shader : the color of the pixel + +void main() { + FragColor = vec4(Color_to_frag, 1.0); + // the "Color_to_frag" variable is already interpolated between the 2 shaders. +} diff --git a/examples/15.openGL3.2/shader/02.transformation.vert b/examples/15.openGL3.2/shader/02.transformation.vert new file mode 100644 index 000000000..c71a4c166 --- /dev/null +++ b/examples/15.openGL3.2/shader/02.transformation.vert @@ -0,0 +1,32 @@ +#version 460 +; +//simple test shader +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +// This is the vertex shader, the 1st on the pipeline. It is executed for every vertex. + +layout (location=0) in vec3 position; +layout (location=1) in vec3 color; +// declare the mandatory input : we need 2 attributes named position and color from the VBO +// location must match the program_index from gemvertexbuffer (thanks to the print_attribute message) + +uniform mat4 transformation_matrix; +// The transformation matrix we want to apply to the vertex. +// The shader did not receive the transformation matrix from the pipeline, +// so we need to create one and pass it as an argument. +// In this example, we use gemlist_matrix in the patch to get the transformation matrix. +// The perspective matrix (set with the perspec message to gemwin) is not used. + +out vec3 Color_to_frag; +// the output of this shader is only a color. +// This variable will be interpolated between all vertices + +void main() +{ + Color_to_frag = color; + // initialise the variable to pass to the frag shader with data coming from the VBO + + gl_Position = transformation_matrix * vec4(position,1.0); // update vertex position from the VBO + // No perspective is apply in this example +} diff --git a/examples/15.openGL3.2/shader/03.matrix.frag b/examples/15.openGL3.2/shader/03.matrix.frag new file mode 100644 index 000000000..520bfd514 --- /dev/null +++ b/examples/15.openGL3.2/shader/03.matrix.frag @@ -0,0 +1,21 @@ +#version 150 +// Cyrille Henry 2025 + +// simple shader that compute very simple light + +// from geometry shader +in vec3 vertNormal; +in vec3 vertColor; + +// to rendering +out vec4 FragColor; + +void main() { + // Normalize the normal vector + vec3 normal = normalize(vertNormal); + + // color calculation + float color = abs(dot(vec3(0., 0., 1.),vertNormal)); + + FragColor = vec4(color*vertColor, 1.); +} diff --git a/examples/15.openGL3.2/shader/03.matrix.vert b/examples/15.openGL3.2/shader/03.matrix.vert new file mode 100644 index 000000000..b353d2ebf --- /dev/null +++ b/examples/15.openGL3.2/shader/03.matrix.vert @@ -0,0 +1,23 @@ +#version 150 +// Cyrille Henry 2025 + +// from VBO +in vec3 position; +in vec3 normal; +in vec3 color; + +// to geometry shader +out vec3 vertNormal; +out vec3 vertColor; + +// the model view projection matrix used for transformation +uniform mat4 modelMatrix; +uniform mat4 viewMatrix; +uniform mat4 projMatrix; + +void main() { + mat3 normalMatrix = mat3(transpose(inverse(viewMatrix * modelMatrix))); + vertNormal = normalMatrix * normal; + vertColor = color; + gl_Position = (projMatrix * viewMatrix * modelMatrix * vec4(position, 1.0)); +} diff --git a/examples/15.openGL3.2/shader/04.model.frag b/examples/15.openGL3.2/shader/04.model.frag new file mode 100644 index 000000000..2d539f8b2 --- /dev/null +++ b/examples/15.openGL3.2/shader/04.model.frag @@ -0,0 +1,10 @@ +#version 460 +// Cyrille Henry 2024 + +in vec4 Color; + +out vec4 FragColor; + +void main() { + FragColor = Color; +} diff --git a/examples/15.openGL3.2/shader/04.model.vert b/examples/15.openGL3.2/shader/04.model.vert new file mode 100644 index 000000000..62cf2d3b0 --- /dev/null +++ b/examples/15.openGL3.2/shader/04.model.vert @@ -0,0 +1,24 @@ +#version 460 + +// Cyrille Henry 2024 + +layout (location=0) in float positionX; +layout (location=1) in float positionY; +layout (location=2) in float positionZ; +layout (location=3) in float colorR; +layout (location=4) in float colorG; +layout (location=5) in float colorB; + +uniform mat4 transformation_matrix; + +out vec4 Color; +out vec3 Normal; +out vec4 Position; + +void main() +{ + Color = vec4(colorR, colorG, colorB, 1.); + vec3 pos = vec3(positionX, positionY, positionZ); + Position = transformation_matrix * vec4(pos,1.0); + gl_Position = Position; +} diff --git a/examples/15.openGL3.2/shader/05.texture.frag b/examples/15.openGL3.2/shader/05.texture.frag new file mode 100644 index 000000000..28c070715 --- /dev/null +++ b/examples/15.openGL3.2/shader/05.texture.frag @@ -0,0 +1,19 @@ +#version 460 + +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +in vec2 TexCoord; + +uniform sampler2D Texture1; // Texture 1 with using the textunit 0 +uniform sampler2D Texture2; // Texture 2 need to be set to 1 to use the correct texture +uniform float mix_factor; + +out vec4 FragColor; + +void main() { + vec4 color1 = texture(Texture1, TexCoord); + vec4 color2 = texture(Texture2, TexCoord); + + FragColor = mix(color1, color2, mix_factor); +} diff --git a/examples/15.openGL3.2/shader/05.texture.vert b/examples/15.openGL3.2/shader/05.texture.vert new file mode 100644 index 000000000..37cf6b027 --- /dev/null +++ b/examples/15.openGL3.2/shader/05.texture.vert @@ -0,0 +1,16 @@ +#version 460 + +//simple test shader +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +in vec3 position; +in vec2 texcoord; + +out vec2 TexCoord; + +void main() +{ + TexCoord = texcoord; // pass the data from VBO to the frag shader + gl_Position = vec4(position,1.0); +} diff --git a/examples/15.openGL3.2/shader/06.light.frag b/examples/15.openGL3.2/shader/06.light.frag new file mode 100644 index 000000000..269b4f360 --- /dev/null +++ b/examples/15.openGL3.2/shader/06.light.frag @@ -0,0 +1,53 @@ +#version 460 +// Cyrille Henry 2025 + +// Light in world space +uniform vec4 LightPosition; // Light position in world space +uniform vec3 LightLa; // Ambient intensity +uniform vec3 LightL; // Diffuse/specular intensity +uniform vec3 CameraPosition; // Camera position in world space + +// Material +uniform vec3 MaterialKa; // Ambient reflectivity +uniform vec3 MaterialKd; // Diffuse reflectivity +uniform vec3 MaterialKs; // Specular reflectivity +uniform float MaterialShininess; // Shininess + +in vec4 Color; +in vec3 Normal; +in vec3 FragPos; // Fragment position in world space +in vec3 ViewPos; // Position in view space (for debugging) + +out vec4 FragColor; // Final color + +vec3 blinnPhong(vec3 position, vec3 n) { + + // Ambient component + vec3 ambient = LightLa * MaterialKa; + + // Vector to the light + vec3 lightDir = normalize(LightPosition.xyz - position); + + // Diffuse component + float diff = max(dot(n, lightDir), 0.0); + vec3 diffuse = MaterialKd * diff; + + // Vector to the viewer (camera) + vec3 viewDir = normalize(CameraPosition - position); + + // Specular component + vec3 specular = vec3(0.0); + if (diff > 0.0) { + vec3 halfwayDir = normalize(lightDir + viewDir); + float spec = pow(max(dot(n, halfwayDir), 0.0), MaterialShininess); + specular = MaterialKs * spec; + } + + return ambient + LightL * (diffuse + specular); +} + +void main() { + vec3 lighting = blinnPhong(FragPos, normalize(Normal)); + FragColor = Color * vec4(lighting, 1.0); +} + diff --git a/examples/15.openGL3.2/shader/06.light.vert b/examples/15.openGL3.2/shader/06.light.vert new file mode 100644 index 000000000..90befb8a7 --- /dev/null +++ b/examples/15.openGL3.2/shader/06.light.vert @@ -0,0 +1,47 @@ +#version 460 + +// Cyrille Henry 2025 + +layout (location=0) in float positionX; +layout (location=1) in float positionY; +layout (location=2) in float positionZ; +layout (location=3) in float normal_X; +layout (location=4) in float normal_Y; +layout (location=5) in float normal_Z; +layout (location=6) in float colorR; +layout (location=7) in float colorG; +layout (location=8) in float colorB; + +uniform mat4 modelMatrix; // Transforms from object space to world space +uniform mat4 viewMatrix; // Transforms from world space to camera space +uniform mat4 projMatrix; // Transforms from camera space to clip space + +out vec4 Color; +out vec3 Normal; +out vec3 FragPos; // Position in world space for lighting calculations +out vec3 ViewPos; // Position in view space + +void main() +{ + // Pass color as is + Color = vec4(colorR, colorG, colorB, 1.0); + + // Position in object space + vec4 objectPos = vec4(positionX, positionY, positionZ, 1.0); + + // Position in world space - for lighting calculations + vec4 worldPos = modelMatrix * objectPos; + FragPos = worldPos.xyz; + + // Position in view space + vec4 viewPos = viewMatrix * worldPos; + ViewPos = viewPos.xyz; + + // Final position in clip space - what the rendering hardware uses + gl_Position = projMatrix * viewPos; + // Equivalent to: gl_Position = projMatrix * viewMatrix * modelMatrix * objectPos; + + // Normal transformation - uses only the model matrix for lighting calculations in world space + mat3 normalMatrix = mat3(transpose(inverse(modelMatrix))); + Normal = normalize(normalMatrix * vec3(normal_X, normal_Y, normal_Z)); +} diff --git a/examples/15.openGL3.2/shader/07.geometry.frag b/examples/15.openGL3.2/shader/07.geometry.frag new file mode 100644 index 000000000..e766ffa53 --- /dev/null +++ b/examples/15.openGL3.2/shader/07.geometry.frag @@ -0,0 +1,42 @@ +#version 150 +// Cyrille Henry 2025 + +// from geometry shader +in vec3 geomPosition; +in vec3 geomNormal; +in vec2 geomTexCoord; +in vec3 barycentric; + +// to rendering +out vec4 fragColor; + +// uniform to compute the pixel color +uniform vec3 lightPos; +uniform vec3 lightColor; +uniform vec3 ambientColor; +uniform sampler2D diffuseTexture; + +void main() { + // Normalize the normal vector + vec3 normal = normalize(geomNormal); + + // Calculate the light direction and distance + vec3 lightDir = normalize(lightPos - geomPosition); + + // Diffuse shading + float diff = max(dot(normal, lightDir), 0.0); + vec3 diffuse = diff * lightColor; + + // Texture sampling + vec4 texColor = texture(diffuseTexture, geomTexCoord); + + // Wire effect using barycentric coordinates + float minBary = min(min(barycentric.x, barycentric.y), barycentric.z); + float edgeFactor = smoothstep(0.0, 0.2, minBary); + + // Final color calculation + vec3 result = (ambientColor + diffuse) * texColor.rgb; + result = mix(vec3(0.0, 0.7, 1.0), result, edgeFactor); // Blue wireframe + + fragColor = vec4(result, texColor.a); +} diff --git a/examples/15.openGL3.2/shader/07.geometry.geom b/examples/15.openGL3.2/shader/07.geometry.geom new file mode 100644 index 000000000..995a3405a --- /dev/null +++ b/examples/15.openGL3.2/shader/07.geometry.geom @@ -0,0 +1,33 @@ +#version 150 +// Cyrille Henry 2025 + +layout(triangles) in; +// the triangle_strip is split in multiples triangles before this shader +layout(triangle_strip, max_vertices = 3) out; + +// from vertex shader +in vec3 vertPosition[]; +in vec3 vertNormal[]; +in vec2 vertTexCoord[]; + +// to fragment shader +out vec3 geomPosition; +out vec3 geomNormal; +out vec2 geomTexCoord; +out vec3 barycentric; + +void main() { + for(int i = 0; i < 3; i++) { + geomPosition = vertPosition[i]; + geomNormal = vertNormal[i]; + geomTexCoord = vertTexCoord[i]; + + // Passing barycentric coordinates for fragment shading + barycentric = vec3(0.0); + barycentric[i] = 1.0; + + gl_Position = gl_in[i].gl_Position; + EmitVertex(); + } + EndPrimitive(); +} diff --git a/examples/15.openGL3.2/shader/07.geometry.vert b/examples/15.openGL3.2/shader/07.geometry.vert new file mode 100644 index 000000000..e57cc512c --- /dev/null +++ b/examples/15.openGL3.2/shader/07.geometry.vert @@ -0,0 +1,25 @@ +#version 150 +// Cyrille Henry 2025 + +// from VBO +in vec3 position; +in vec3 normal; +in vec2 texCoord; + +// to geometry shader +out vec3 vertPosition; +out vec3 vertNormal; +out vec2 vertTexCoord; + +// transformation matrices +uniform mat4 modelMatrix; +uniform mat4 viewMatrix; +uniform mat4 projMatrix; +uniform mat3 normalMatrix; + +void main() { + vertPosition = vec3(modelMatrix * vec4(position, 1.0)); + vertNormal = normalMatrix * normal; + vertTexCoord = texCoord; + gl_Position = projMatrix * viewMatrix * modelMatrix * vec4(position, 1.0); +} diff --git a/examples/15.openGL3.2/shader/08.adjacency.frag b/examples/15.openGL3.2/shader/08.adjacency.frag new file mode 100644 index 000000000..1a3c0911a --- /dev/null +++ b/examples/15.openGL3.2/shader/08.adjacency.frag @@ -0,0 +1,12 @@ +#version 150 +// Cyrille Henry 2025 + +// from geometry shader +in vec3 geomPosition; + +// to rendering +out vec4 fragColor; + +void main() { + fragColor = vec4(1.); +} diff --git a/examples/15.openGL3.2/shader/08.adjacency.geom b/examples/15.openGL3.2/shader/08.adjacency.geom new file mode 100644 index 000000000..97c3366b4 --- /dev/null +++ b/examples/15.openGL3.2/shader/08.adjacency.geom @@ -0,0 +1,51 @@ +#version 150 +// Cyrille Henry 2025 + +// this shader add vertices between 2 vertices of the original geometry. +// It use 4 vertices input, in order to do a cubix interpolation, for smooth rendering. + +layout(lines_adjacency) in; +layout(line_strip, max_vertices = 256) out; + +// from vertex shader +in vec3 vertPosition[]; + +// to fragment shader +out vec3 geomPosition; + +const int NUM_SEGMENTS = 8; + +vec3 cubicInterpolate(vec3 p0, vec3 p1, vec3 p2, vec3 p3, float t) { + float t2 = t * t; + float t3 = t2 * t; + + vec3 a = -0.5 * p0 + 1.5 * p1 - 1.5 * p2 + 0.5 * p3; + vec3 b = p0 - 2.5 * p1 + 2.0 * p2 - 0.5 * p3; + vec3 c = -0.5 * p0 + 0.5 * p2; + vec3 d = p1; + + return a * t3 + b * t2 + c * t + d; +} + +void main() { + vec3 p0 = gl_in[0].gl_Position.xyz; + vec3 p1 = gl_in[1].gl_Position.xyz; + vec3 p2 = gl_in[2].gl_Position.xyz; + vec3 p3 = gl_in[3].gl_Position.xyz; + + //only generate a curve between point 1 and 2 + for (int j = 0; j <= NUM_SEGMENTS; j++) { + float t = float(j) / float(NUM_SEGMENTS); + vec3 interpolatedPosition = mix(p1, p2, t); + // adjusting point position thanks to adjacency points + if (j > 0 && j < NUM_SEGMENTS) { + vec3 cubicPos = cubicInterpolate(p0, p1, p2, p3, t); + interpolatedPosition = cubicPos; + } + + geomPosition = interpolatedPosition; + gl_Position = vec4(interpolatedPosition, 1.0); + EmitVertex(); + } + EndPrimitive(); +} diff --git a/examples/15.openGL3.2/shader/08.adjacency.vert b/examples/15.openGL3.2/shader/08.adjacency.vert new file mode 100644 index 000000000..89703691e --- /dev/null +++ b/examples/15.openGL3.2/shader/08.adjacency.vert @@ -0,0 +1,14 @@ +#version 150 +// Cyrille Henry 2025 + +// from VBO +in float positionX; +in float positionY; + +// to geometry shader +out vec3 vertPosition; + +void main() { + vertPosition = vec3(positionX, positionY, 0.0); + gl_Position = vec4(positionX, positionY, 0.0, 1.0); +} diff --git a/examples/15.openGL3.2/shader/09.tessellation.frag b/examples/15.openGL3.2/shader/09.tessellation.frag new file mode 100644 index 000000000..cc08f484b --- /dev/null +++ b/examples/15.openGL3.2/shader/09.tessellation.frag @@ -0,0 +1,16 @@ +#version 400 +// Cyrille Henry 2025 + +in VS_OUT { + vec3 pos; + vec3 norm; + vec3 color; +} fs_in; + +out vec4 FragColor; + +void main() { +// interpolation of the color computed at each vertices, after subdivision by the teselarisation shader + FragColor = vec4(fs_in.color, 1.0); +} + diff --git a/examples/15.openGL3.2/shader/09.tessellation.tesc b/examples/15.openGL3.2/shader/09.tessellation.tesc new file mode 100644 index 000000000..23579618c --- /dev/null +++ b/examples/15.openGL3.2/shader/09.tessellation.tesc @@ -0,0 +1,30 @@ +#version 400 +// Cyrille Henry 2025 + +layout(vertices = 3) out; // traw triangle + +in VS_OUT { + vec3 pos; + vec3 norm; + vec3 color; +} tcs_in[]; + +out TCS_OUT { + vec3 pos; + vec3 norm; + vec3 color; +} tcs_out[]; + +void main() { + // tessellarisation level + gl_TessLevelInner[0] = 5.0; + gl_TessLevelOuter[0] = 5.0; + gl_TessLevelOuter[1] = 5.0; + gl_TessLevelOuter[2] = 5.0; + + // Pass this data to control vertex + tcs_out[gl_InvocationID].pos = tcs_in[gl_InvocationID].pos; + tcs_out[gl_InvocationID].norm = tcs_in[gl_InvocationID].norm; + tcs_out[gl_InvocationID].color = tcs_in[gl_InvocationID].color; +} + diff --git a/examples/15.openGL3.2/shader/09.tessellation.tese b/examples/15.openGL3.2/shader/09.tessellation.tese new file mode 100644 index 000000000..ee15f4070 --- /dev/null +++ b/examples/15.openGL3.2/shader/09.tessellation.tese @@ -0,0 +1,39 @@ +#version 400 +// Cyrille Henry 2025 + +layout(triangles, equal_spacing, cw) in; + +in TCS_OUT { + vec3 pos; + vec3 norm; + vec3 color; +} tes_in[]; + +out VS_OUT { + vec3 pos; + vec3 norm; + vec3 color; +} vs_out; + +void main() { + // interpolate vertex position + vec3 p0 = tes_in[0].pos; + vec3 p1 = tes_in[1].pos; + vec3 p2 = tes_in[2].pos; + + vec3 n0 = tes_in[0].norm; + vec3 n1 = tes_in[1].norm; + vec3 n2 = tes_in[2].norm; + + vec3 pos = (gl_TessCoord.x * p0) + (gl_TessCoord.y * p1) + (gl_TessCoord.z * p2); + vec3 norm = normalize((gl_TessCoord.x * n0) + (gl_TessCoord.y * n1) + (gl_TessCoord.z * n2)); + + vs_out.pos = pos; + vs_out.norm = norm; + gl_Position = vec4(pos, 1.0); + vec3 mycolor; // custom pseudo random color at each vertices after subdivision + mycolor.rg = cos(1.+12.12*pos.xy); + mycolor.b = cos(1.+12.12*pos.x*pos.y); + vs_out.color = vec3(0.5)+0.5*mycolor; +} + diff --git a/examples/15.openGL3.2/shader/09.tessellation.vert b/examples/15.openGL3.2/shader/09.tessellation.vert new file mode 100644 index 000000000..bc35a9cc5 --- /dev/null +++ b/examples/15.openGL3.2/shader/09.tessellation.vert @@ -0,0 +1,16 @@ +#version 400 +// Cyrille Henry 2025 + +layout(location = 0) in vec3 position; + +out VS_OUT { + vec3 pos; + vec3 norm; + vec3 color; +} vs_out; + +void main() { + vs_out.pos = position; + vs_out.norm = vec3(0.,0.,1.); + gl_Position = vec4(position, 1.0); +} diff --git a/examples/Makefile.am b/examples/Makefile.am index f4cb38e0b..3b65b081a 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -38,6 +38,8 @@ nobase_dist_gemexamples_DATA = \ 02.advanced/21.basic_LSystem.pd \ 02.advanced/22.double-iterative.pd \ 02.advanced/23.SplitScreen.pd \ + 02.advanced/24.query_GPU.pd \ + 02.advanced/25.feedback.pd \ 02.advanced/snapshotHD.pd \ 03.lighting/01.world_light.pd \ 03.lighting/02.light.pd \ @@ -106,6 +108,7 @@ nobase_dist_gemexamples_DATA = \ 07.texture/09.sharedTextures.pd \ 07.texture/10.framebuffer.pd \ 07.texture/11.multiples_gemhead_in_a_framebuffer.pd \ + 07.texture/12.floatingpoint_framebuffer.pd \ 08.io/01.Mouse.pd \ 08.io/02.Tablet.pd \ 08.io/03.Orb.pd \ @@ -115,12 +118,15 @@ nobase_dist_gemexamples_DATA = \ 09.openGL/03.stencilBuffer.pd \ 09.openGL/04.clearZ.pd \ 09.openGL/05.load_identity_matrix.pd \ + 09.openGL/06.clear_framebuffer.pd \ 10.glsl/01.simple_texture.pd \ 10.glsl/02.primitive_distortion.pd \ 10.glsl/03.texture_distortion.pd \ 10.glsl/04.game_of_life.pd \ + 10.glsl/04.game_of_life_bis.pd \ 10.glsl/05.multitexture.pd \ 10.glsl/05.multitexture_bis.pd \ + 10.glsl/05.multitexture_basic.pd \ 10.glsl/06.rectangle_multitexture.pd \ 10.glsl/07.framebuffer_and_shader.pd \ 10.glsl/08.multi_pass_rendering.pd \ @@ -132,55 +138,55 @@ nobase_dist_gemexamples_DATA = \ 10.glsl/14.blur.pd \ 10.glsl/15.bicubic_image_interpolation.pd \ 10.glsl/16.vertexbuffer_attributes.pd \ - 10.glsl/bicubic_interpolation.frag \ - 10.glsl/bicubic_interpolation.vert \ - 10.glsl/blur.frag \ - 10.glsl/blur.vert \ - 10.glsl/cam1.jpg \ - 10.glsl/cam2.jpg \ - 10.glsl/cam3.jpg \ - 10.glsl/cam4.jpg \ - 10.glsl/fetching2.frag \ - 10.glsl/fetching2.vert \ - 10.glsl/fetching.frag \ - 10.glsl/fetching.vert \ - 10.glsl/game.frag \ - 10.glsl/game.vert \ - 10.glsl/geo.frag \ - 10.glsl/geo.geom \ - 10.glsl/geo.vert \ - 10.glsl/_glsl.pd \ - 10.glsl/GLSL_mix.frag \ - 10.glsl/GLSL_mix.vert \ - 10.glsl/img1.jpg \ - 10.glsl/img2.jpg \ - 10.glsl/img3.jpg \ - 10.glsl/interpol.frag \ - 10.glsl/link.frag \ - 10.glsl/link.vert \ - 10.glsl/mass.frag \ - 10.glsl/mass.vert \ - 10.glsl/multitexture.frag \ - 10.glsl/multitexture_rect.frag \ - 10.glsl/multitexture_rect.vert \ - 10.glsl/multitexture.vert \ - 10.glsl/normal.frag \ - 10.glsl/normal.vert \ - 10.glsl/panoramique.frag \ - 10.glsl/panoramique.vert \ - 10.glsl/P_distord.frag \ - 10.glsl/P_distord.vert \ + 10.glsl/17.light.pd \ + 10.glsl/18.additive_audio_synthesis.pd \ 10.glsl/single_blur.pd \ - 10.glsl/T_distord.frag \ - 10.glsl/T_distord.vert \ - 10.glsl/texture.frag \ - 10.glsl/texture_rect.frag \ - 10.glsl/texture.vert \ - 10.glsl/tri2fan.frag \ - 10.glsl/tri2fan.geom \ - 10.glsl/tri2fan.vert \ - 10.glsl/vague.frag \ - 10.glsl/wave.frag \ + 10.glsl/shader/additive.frag \ + 10.glsl/shader/additive.vert \ + 10.glsl/shader/bicubic_interpolation.frag \ + 10.glsl/shader/bicubic_interpolation.vert \ + 10.glsl/shader/blur.frag \ + 10.glsl/shader/blur.vert \ + 10.glsl/shader/fetching2.frag \ + 10.glsl/shader/fetching2.vert \ + 10.glsl/shader/fetching.frag \ + 10.glsl/shader/fetching.vert \ + 10.glsl/shader/game.frag \ + 10.glsl/shader/game.vert \ + 10.glsl/shader/geo.frag \ + 10.glsl/shader/geo.geom \ + 10.glsl/shader/geo.vert \ + 10.glsl/shader/GLSL_mix.frag \ + 10.glsl/shader/GLSL_mix.vert \ + 10.glsl/shader/interpol.frag \ + 10.glsl/shader/light.frag \ + 10.glsl/shader/light.vert \ + 10.glsl/shader/link.frag \ + 10.glsl/shader/link.vert \ + 10.glsl/shader/mass.frag \ + 10.glsl/shader/mass.vert \ + 10.glsl/shader/multitexture.frag \ + 10.glsl/shader/multitexture_rect.frag \ + 10.glsl/shader/multitexture_rect.vert \ + 10.glsl/shader/multitexture.vert \ + 10.glsl/shader/normal.frag \ + 10.glsl/shader/normal.vert \ + 10.glsl/shader/panoramique.frag \ + 10.glsl/shader/panoramique.vert \ + 10.glsl/shader/P_distord.frag \ + 10.glsl/shader/P_distord.vert \ + 10.glsl/shader/T_distord.frag \ + 10.glsl/shader/T_distord.vert \ + 10.glsl/shader/texture.frag \ + 10.glsl/shader/texture_rect.frag \ + 10.glsl/shader/texture.vert \ + 10.glsl/shader/tri2fan.frag \ + 10.glsl/shader/tri2fan.geom \ + 10.glsl/shader/tri2fan.vert \ + 10.glsl/shader/vague.frag \ + 10.glsl/shader/wave.frag \ + 10.glsl/shader/brick.frag \ + 10.glsl/shader/brick.vert \ 11.obj-exporter/obj_cube.pd \ 11.obj-exporter/obj_exporter-help.pd \ 11.obj-exporter/obj_exporter.pd \ @@ -221,13 +227,49 @@ nobase_dist_gemexamples_DATA = \ 14.multiple_windows/01.basic_example.pd \ 14.multiple_windows/02.switch_context.pd \ 14.multiple_windows/03.texture_sharing.pd \ + 15.openGL3.2/01.basic.pd \ + 15.openGL3.2/02.transformation.pd \ + 15.openGL3.2/03.matrix.pd \ + 15.openGL3.2/04.model.pd \ + 15.openGL3.2/05.texture.pd \ + 15.openGL3.2/06.lighting.pd \ + 15.openGL3.2/07.geometry.pd \ + 15.openGL3.2/08.adjacency.pd \ + 15.openGL3.2/09.tessellation.pd \ + 15.openGL3.2/shader/01.basic.frag \ + 15.openGL3.2/shader/01.basic.vert \ + 15.openGL3.2/shader/02.transformation.frag \ + 15.openGL3.2/shader/02.transformation.vert \ + 15.openGL3.2/shader/03.matrix.frag \ + 15.openGL3.2/shader/03.matrix.vert \ + 15.openGL3.2/shader/04.model.frag \ + 15.openGL3.2/shader/04.model.vert \ + 15.openGL3.2/shader/05.texture.frag \ + 15.openGL3.2/shader/05.texture.vert \ + 15.openGL3.2/shader/06.light.frag \ + 15.openGL3.2/shader/06.light.vert \ + 15.openGL3.2/shader/07.geometry.frag \ + 15.openGL3.2/shader/07.geometry.geom \ + 15.openGL3.2/shader/07.geometry.vert \ + 15.openGL3.2/shader/08.adjacency.frag \ + 15.openGL3.2/shader/08.adjacency.geom \ + 15.openGL3.2/shader/08.adjacency.vert \ + 15.openGL3.2/shader/09.tessellation.frag \ + 15.openGL3.2/shader/09.tessellation.tesc \ + 15.openGL3.2/shader/09.tessellation.tese \ + 15.openGL3.2/shader/09.tessellation.vert \ 99.games/puzzle.pd \ + data/img1.jpg \ + data/img2.jpg \ + data/img3.jpg \ + data/cam1.jpg \ + data/cam2.jpg \ + data/cam3.jpg \ + data/cam4.jpg \ data/64shade.tif \ data/alea.mpg \ data/anim-1.mov \ data/bitmap_font_6x8.bmp \ - data/brick.frag \ - data/brick.vert \ data/blob0.tif \ data/blob1.tif \ data/blob2.tif \ diff --git a/examples/10.glsl/cam1.jpg b/examples/data/cam1.jpg similarity index 100% rename from examples/10.glsl/cam1.jpg rename to examples/data/cam1.jpg diff --git a/examples/10.glsl/cam2.jpg b/examples/data/cam2.jpg similarity index 100% rename from examples/10.glsl/cam2.jpg rename to examples/data/cam2.jpg diff --git a/examples/10.glsl/cam3.jpg b/examples/data/cam3.jpg similarity index 100% rename from examples/10.glsl/cam3.jpg rename to examples/data/cam3.jpg diff --git a/examples/10.glsl/cam4.jpg b/examples/data/cam4.jpg similarity index 100% rename from examples/10.glsl/cam4.jpg rename to examples/data/cam4.jpg diff --git a/examples/10.glsl/img1.jpg b/examples/data/img1.jpg similarity index 100% rename from examples/10.glsl/img1.jpg rename to examples/data/img1.jpg diff --git a/examples/10.glsl/img2.jpg b/examples/data/img2.jpg similarity index 100% rename from examples/10.glsl/img2.jpg rename to examples/data/img2.jpg diff --git a/examples/10.glsl/img3.jpg b/examples/data/img3.jpg similarity index 100% rename from examples/10.glsl/img3.jpg rename to examples/data/img3.jpg diff --git a/extra/pix_artoolkit/pix_artoolkit.cpp b/extra/pix_artoolkit/pix_artoolkit.cpp index 156782024..bb55a9921 100644 --- a/extra/pix_artoolkit/pix_artoolkit.cpp +++ b/extra/pix_artoolkit/pix_artoolkit.cpp @@ -74,7 +74,7 @@ pix_artoolkit :: pix_artoolkit() m_object[i].center[0] = 0.0; m_object[i].center[1] = 0.0; } - m_image.setCsizeByFormat(GEM_GRAY); + m_image.setFormat(GEM_GRAY); # if AR_HEADER_VERSION_MAJOR >= 5 m_patterns = arPattCreateHandle(); # endif @@ -287,8 +287,8 @@ void pix_artoolkit :: processRGBAImage(imageStruct &image) m_image.ysize = image.ysize; m_image.fromGray(image.data); image.data = m_image.data; - image.notowned = 0; - image.setCsizeByFormat(m_image.format); + image.not_owned = 0; + image.setFormat(m_image.format); } ///////////////////////////////////////////////////////// @@ -303,8 +303,8 @@ void pix_artoolkit :: processYUVImage(imageStruct &image) m_image.ysize = image.ysize; m_image.fromUYVY(image.data); image.data = m_image.data; - image.notowned = 0; - image.setCsizeByFormat(m_image.format); + image.not_owned = 0; + image.setFormat(m_image.format); } ///////////////////////////////////////////////////////// diff --git a/help/GEMgl-help.pd b/help/GEMgl-help.pd new file mode 100644 index 000000000..e59ee0eb0 --- /dev/null +++ b/help/GEMgl-help.pd @@ -0,0 +1,54 @@ +#N canvas 1032 163 577 707 10; +#X text 52 31 [GEMgl...] - wrappers for openGL functions; +#X text 32 64 you can use "any" openGL-command (like "glBegin") as a Gem-object with a prepended "GEM" (like [GEMglBegin]); +#N canvas 735 461 450 300 online 0; +#X obj 41 26 inlet; +#X obj 41 49 t b; +#X msg 41 87 browse https://registry.khronos.org/OpenGL-Refpages/gl2.1/; +#X obj 41 110 pdcontrol; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X restore 397 142 pd online reference; +#X msg 397 121 bang; +#X text 44 116 as there are several hundred such objects \, they do not documented separately. Instead please consult your openGL book \, or the online reference:, f 55; +#X obj 61 352 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 67 358 _gemwin; +#X obj 290 277 gemhead; +#X obj 290 366 GEMglBegin GL_POLYGON; +#X obj 290 592 GEMglEnd; +#X obj 290 406 GEMglColor4f 1 0 0 1; +#X obj 290 466 GEMglColor4f 0 1 0 1; +#X obj 290 526 GEMglColor4f 0 0 1 1; +#X obj 290 336 GEMglShadeModel GL_SMOOTH; +#X obj 290 622 GEMglShadeModel GL_FLAT; +#X obj 290 429 GEMglVertex3f -2 -1 0; +#X obj 290 549 GEMglVertex3f 2 -1 0; +#X obj 290 490 GEMglVertex3f 0 2 0; +#X msg 397 190 bang; +#N canvas 1059 494 450 300 examples/09.openGL 0; +#X obj 41 26 inlet; +#X obj 41 49 t b; +#X obj 41 160 pdcontrol; +#X msg 41 72 dir; +#X obj 41 95 pdcontrol; +#X msg 41 118 browse \$1/../examples/09.openGL; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X restore 397 211 pd examples/09.openGL; +#X text 49 186 Gem also comes with some examples on how to use those low-level wrappers:; +#X connect 3 0 2 0; +#X connect 7 0 13 0; +#X connect 8 0 10 0; +#X connect 9 0 14 0; +#X connect 10 0 15 0; +#X connect 11 0 17 0; +#X connect 12 0 16 0; +#X connect 13 0 8 0; +#X connect 15 0 11 0; +#X connect 16 0 9 0; +#X connect 17 0 12 0; +#X connect 18 0 19 0; diff --git a/help/GEMglBegin-help.pd b/help/GEMglBegin-help.pd deleted file mode 100644 index b2e875dbc..000000000 --- a/help/GEMglBegin-help.pd +++ /dev/null @@ -1,14 +0,0 @@ -#N canvas 144 70 497 292 10; -#X text 21 22 GEMglBegin - delimit the vertices of a primitive or a -group of like primitives; -#X text 21 61 C Specification: void glBegin( GLenum mode ); -#X text 21 91 Parameters; -#X text 42 115 mode; -#X text 77 116 Specifies the primitive or primitives that will be created -from vertices presented between glBegin and the subsequent glEnd. Ten -symbolic constants are accepted: GL_POINTS \, GL_LINES \, GL_LINE_STRIP -\, GL_LINE_LOOP \, GL_TRIANGLES \, GL_TRIANGLE_STRIP \, GL_TRIANGLE_FAN -\, GL_QUADS \, GL_QUAD_STRIP \, and GL_POLYGON.; -#X text 71 244 http://www.glprogramming.com/blue/ch05.html#id5450783 -; -#X text 22 228 OpenGL Reference page:; diff --git a/help/GLdefine-help.pd b/help/GLdefine-help.pd index 09235e0d3..aeffe9456 100644 --- a/help/GLdefine-help.pd +++ b/help/GLdefine-help.pd @@ -1,67 +1,42 @@ #N canvas 78 61 701 310 10; #X declare -lib Gem; -#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 584 234 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 589 273 pd gemwin; -#X msg 589 254 create; -#X text 585 233 Create window:; +#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 525 29 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 217 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 452 8 GEM object; #X text 11 266 Outlets:; -#X obj 522 71 cnv 15 150 140 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 522 71 cnv 15 150 140 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 530 192 GEMglBegin; #X obj 534 77 loadbang; #X text 54 30 Class: GEMgl object; #X text 33 14 Synopsis: [GLdefine]; -#X text 15 88 Send an OpenGL configuration constant to a GEMglBegin -to set up the OpenGL environment. These constants are defined in GL/gl.h -in the OpenGL C++ code.; -#X floatatom 584 167 5 0 0 0 - - -; +#X text 15 88 Send an OpenGL configuration constant to a GEMglBegin to set up the OpenGL environment. These constants are defined in GL/gl.h in the OpenGL C++ code.; +#X floatatom 584 167 5 0 0 0 - - - 0; #X text 29 229 Inlet 1: bang; #X text 23 279 Outlet 1: float; -#X text 14 137 for more \, see: http://www.glprogramming.com/blue/ch04.html -; +#X text 14 137 for more \, see: http://www.glprogramming.com/blue/ch04.html; #X text 7 69 Description: gets the value of a OpenGL constant; #X text 29 245 Inlet 1: message - the name of the constant; #X text 17 175 Arguments:; -#X text 29 189 the name of a OpenGL constant (e.g. GL_LINES or GL_POLYGON) -; +#X text 29 189 the name of a OpenGL constant (e.g. GL_LINES or GL_POLYGON); #X msg 542 98 GL_LINES; #X obj 534 142 GLdefine GL_ADD; #X msg 553 119 symbol GL_ACCUM; -#X obj 588 8 declare -lib Gem; -#X connect 2 0 3 0; -#X connect 3 0 2 0; -#X connect 14 0 27 0; -#X connect 26 0 27 0; -#X connect 27 0 13 1; -#X connect 27 0 18 0; -#X connect 28 0 27 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION gets the value of a OpenGL constant; +#X text 10 65 KEYWORDS Gem openGL; +#X text 20 85 INLET_0 bang message; +#X text 20 105 OUTLET_0 float; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 568 228 _gemwin; +#X connect 10 0 23 0; +#X connect 22 0 23 0; +#X connect 23 0 9 1; +#X connect 23 0 14 0; +#X connect 24 0 23 0; diff --git a/help/Gem-help.pd b/help/Gem-help.pd index b73a472e1..e132af758 100644 --- a/help/Gem-help.pd +++ b/help/Gem-help.pd @@ -1,8 +1,8 @@ -#N canvas 85 65 472 375 12; -#X text 54 38 idiosyncracies in Gem objects; -#X text 54 53 =============================; -#X text 33 106 most (if not all) Gem objects share some common behaviour \, that you might want to be aware of \, in order to correctly and efficiently use them.; -#N canvas 2803 369 624 486 init-messages 0; +#N canvas 85 65 578 389 12; +#X declare -lib Gem; +#X text 54 118 idiosyncrasies in Gem objects; +#X text 33 176 most (if not all) Gem objects share some common behaviour \, that you might want to be aware of \, in order to correctly and efficiently use them.; +#N canvas 251 126 624 486 init-messages 0; #X obj 85 146 rectangle 4 3 \; draw line \; width 3; #X text 53 53 Gem objects accept additional creation arguments \, that can be used to send initial messages to the object.; #X obj 377 181 rectangle 4 3; @@ -16,9 +16,44 @@ #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 8 0 7 0; -#X restore 61 204 pd init-messages; -#N canvas 2655 474 670 343 "gem_state" 0; -#X text 31 101 These messages can be created by [gemhead] and are then passed to downstream objects. You cannot (and shoud not attempt to) create such messages yourself.; +#X restore 61 274 pd init-messages; +#N canvas 269 117 510 275 "gem_state" 0; +#X text 31 101 These messages can be created by [gemhead] and are then passed to downstream objects. You cannot (and should not attempt to) create such messages yourself.; #X text 31 163 Typically these messages occur once per rendering tick (e.g. every 50ms) \, so it's easy to flood your Pd-console with printing them (or connecting the 1st outlet of a Gem object to an object that does not understand these messages), f 61; #X text 31 25 Any Gem-object that can be used within a render-chain accepts a special Gem message with the selector "gem_state" on the 1st inlet \, and will also output such special Gem message on the 1st outlet.; -#X restore 61 171 pd "gem_state" messages; +#X restore 61 241 pd "gem_state" messages; +#N canvas 375 374 585 541 debugging 0; +#X text 27 114 This indicates a bug \, either in a Gem object or your patch.; +#X text 74 80 GL[0x504]: stack underflow; +#X text 32 35 Every now and then you might see openGL error messages when rendering:; +#X text 23 161 The error is only emitted at the end of a render cycle (once all objects have been executed).; +#X text 26 198 If you want to track down the object that triggered the error \, you must enable the "debugGL" mode via the [Gem] object:; +#X obj 159 257 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X msg 159 282 debugGL \$1; +#X obj 159 307 Gem; +#X text 259 265 <- turn on/off per-object debugging; +#X text 257 307 <- turn it on/off for *all* Gem objects; +#X text 37 357 Tracking down openGL errors can be rather costly \, so it's not enabled by default.; +#X text 38 407 You can also turn debugging GL on/off for individual objects:; +#X obj 130 434 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X msg 130 459 debugGL \$1; +#X obj 130 484 cube; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X restore 61 311 pd debugging GL; +#X text 44 38 Gem - Graphics Environment for Multimedia; +#X text 44 48 =========================================; +#X text 54 133 -----------------------------; +#X obj 123 81 Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X text 10 45 DESCRIPTION Gem meta object; +#X text 10 65 KEYWORDS Gem; +#X text 20 105 INLET_0 debugGL ; +#X restore 498 18 pd META; diff --git a/help/Makefile.am b/help/Makefile.am index caf4824c4..69cc59a4a 100644 --- a/help/Makefile.am +++ b/help/Makefile.am @@ -35,7 +35,7 @@ dist_gemhelp_DATA += \ cubemaptosphere.frag \ cubemaptocube.vert \ cubemaptocube.frag \ - GEMglBegin-help.pd \ + GEMgl-help.pd \ gemhead-help.pd \ gemkeyboard-help.pd \ gemkeyname-help.pd \ @@ -60,6 +60,9 @@ dist_gemhelp_DATA += \ gemsdl2window-help.pd \ gemw32window-help.pd \ GLdefine-help.pd \ + glsl-help.pd \ + glsl_test.frag \ + glsl_test.vert \ glsl_fragment-help.pd \ glsl_geometry-help.pd \ glsl_program-help.pd \ @@ -70,6 +73,7 @@ dist_gemhelp_DATA += \ mesh_line-help.pd \ mesh_square-help.pd \ model-help.pd \ + modelfiler-help.pd \ multimodel-help.pd \ newWave-help.pd \ ortho-help.pd \ @@ -80,8 +84,10 @@ dist_gemhelp_DATA += \ part_gravity-help.pd \ part_head-help.pd \ part_info-help.pd \ + part_information-help.pd \ part_killold-help.pd \ part_killslow-help.pd \ + part_move-help.pd \ part_orbitpoint-help.pd \ part_render-help.pd \ part_sink-help.pd \ @@ -186,6 +192,7 @@ dist_gemhelp_DATA += \ pix_snap-help.pd \ pix_subtract-help.pd \ pix_takealpha-help.pd \ + pix_test-help.pd \ pix_texture-help.pd \ pix_threshold_bernsen-help.pd \ pix_threshold-help.pd \ @@ -237,4 +244,13 @@ dist_gemhelp_DATA += \ triangle-help.pd \ tube-help.pd \ vertex_program-help.pd \ - world_light-help.pd + world_light-help.pd \ + $(empty) + +dist_gemhelp_DATA += \ + _backendinfo.pd \ + _gemwin.pd \ + _pix2rectangle.pd \ + _textbbox.pd \ + _textbbox-help.pd \ + $(empty) diff --git a/help/_backendinfo.pd b/help/_backendinfo.pd new file mode 100644 index 000000000..6d6b8812e --- /dev/null +++ b/help/_backendinfo.pd @@ -0,0 +1,172 @@ +#N canvas 651 26 695 516 12; +#X obj 104 102 bng 15 250 50 0 \$0-backendinfo \$0-backendinfo <--show_info_on_backends 17 8 0 10 #fcfcfc #000000 #000000; +#N canvas 15 49 489 343 \$0-backendinfo 0; +#X restore 184 207 pd \$0-backendinfo; +#X obj 184 240 r \$0-backendinfo; +#X msg 323 341 clear; +#X obj 323 365 s pd-\$0-backendinfo; +#X msg 207 415 backend; +#N canvas 4 49 685 300 fake 0; +#X obj 178 5 inlet bang; +#X msg 178 25 currentbackend v4l2 \, backends 3 \, backend v4l2 analog \, backend v4l analog \, backend dc1394 iidc \, backend unicap analog \, backend vlc; +#X obj 178 67 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 445 224 pd fake; +#N canvas 147 535 627 326 content 0; +#X obj 123 134 route backend backends currentbackend; +#N canvas 509 196 644 372 numbackends 0; +#X obj 119 11 inlet; +#X obj 119 316 outlet; +#X obj 119 81 f; +#X obj 277 69 inlet reset; +#X msg 277 89 0; +#X obj 119 298 list prepend text 50; +#X msg 119 154 50 On this system you have \$1 backends available; +#X obj 119 101 t f f; +#X obj 146 201 select 0; +#X obj 119 31 route bang float; +#X msg 191 223 90 Click on any of the patches below for information about a specific backend:; +#X connect 0 0 9 0; +#X connect 2 0 7 0; +#X connect 3 0 4 0; +#X connect 4 0 2 1; +#X connect 5 0 1 0; +#X connect 6 0 5 0; +#X connect 7 0 6 0; +#X connect 7 1 8 0; +#X connect 8 1 10 0; +#X connect 9 0 2 0; +#X connect 9 1 2 1; +#X connect 10 0 5 0; +#X restore 196 189 pd numbackends; +#N canvas 12 49 638 300 currentbackend 0; +#X obj 119 31 inlet; +#X obj 119 186 outlet; +#X obj 119 82 symbol ; +#X obj 325 33 inlet reset; +#X obj 325 53 symbol ; +#X obj 119 102 select ; +#X obj 119 164 list prepend text 50 65; +#X obj 119 51 route bang; +#X obj 202 54 symbol; +#X msg 224 124 You are currently using the '\$1' backend; +#X msg 119 144 Currently you are not using any specific backend...; +#X connect 0 0 7 0; +#X connect 2 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 2 1; +#X connect 5 0 10 0; +#X connect 5 1 9 0; +#X connect 6 0 1 0; +#X connect 7 0 2 0; +#X connect 7 1 8 0; +#X connect 8 0 2 1; +#X connect 9 0 6 0; +#X connect 10 0 6 0; +#X restore 330 189 pd currentbackend; +#N canvas 443 146 538 511 listbackends 0; +#X obj 149 61 inlet; +#X obj 149 297 outlet; +#X obj 261 61 inlet reset; +#X obj 149 84 list split 1; +#X obj 149 107 symbol unknown; +#X obj 261 107 symbol unknown; +#X obj 149 130 t b s; +#X obj 149 153 i; +#X obj 149 199 t f f; +#X obj 149 274 list prepend obj 60; +#X obj 311 163 makefilename $%d; +#X obj 149 176 + 25; +#X msg 194 131 120; +#X msg 311 140 1; +#X obj 149 222 pack 0 s s s; +#X obj 438 163 symbol \$2; +#X obj 261 84 t b b b b; +#X msg 149 245 \$1 \$2-\$4plugin \$3; +#X connect 0 0 3 0; +#X connect 2 0 16 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 5 0 4 1; +#X connect 6 0 7 0; +#X connect 6 1 14 1; +#X connect 7 0 11 0; +#X connect 8 0 14 0; +#X connect 8 1 7 1; +#X connect 9 0 1 0; +#X connect 10 0 14 2; +#X connect 11 0 8 0; +#X connect 12 0 7 1; +#X connect 13 0 10 0; +#X connect 14 0 17 0; +#X connect 15 0 14 3; +#X connect 16 0 5 0; +#X connect 16 1 12 0; +#X connect 16 2 13 0; +#X connect 16 3 15 0; +#X connect 17 0 9 0; +#X restore 123 159 pd listbackends; +#X obj 196 221 t a; +#X obj 400 134 t b b b; +#X obj 400 47 inlet reset; +#X obj 196 261 s pd-\$0-backendinfo; +#X obj 196 241 list trim; +#X obj 146 25 inlet finalize; +#X obj 146 49 t b b b; +#X obj 123 109 spigot; +#X msg 195 83 0; +#X obj 400 69 t b b; +#X msg 427 91 1; +#X obj 123 84 r \$1-info; +#X connect 0 0 3 0; +#X connect 0 1 1 0; +#X connect 0 2 2 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 3 1; +#X connect 5 1 1 1; +#X connect 5 2 2 1; +#X connect 6 0 13 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 1 0; +#X connect 10 1 2 0; +#X connect 10 2 12 0; +#X connect 11 0 0 0; +#X connect 12 0 11 1; +#X connect 13 0 5 0; +#X connect 13 1 14 0; +#X connect 14 0 11 1; +#X connect 15 0 11 0; +#X restore 351 315 pd content; +#X obj 207 385 t b; +#X msg 422 168 bang; +#X obj 184 290 t b b; +#X obj 323 290 t b b, f 14; +#X obj 184 260 t b b b; +#X msg 184 321 loadbang \, vis 1; +#X obj 207 446 s \$1-ctl; +#X obj 445 247 s \$1-info; +#X obj 422 196 t b b b; +#X text 79 45 this is a helper-abstraction for use in Gem's helppatches; +#X connect 2 0 12 0; +#X connect 3 0 4 0; +#X connect 5 0 14 0; +#X connect 6 0 15 0; +#X connect 8 0 5 0; +#X connect 9 0 16 0; +#X connect 10 0 13 0; +#X connect 10 1 7 0; +#X connect 11 0 3 0; +#X connect 11 1 7 1; +#X connect 12 0 10 0; +#X connect 12 1 8 0; +#X connect 12 2 11 0; +#X connect 13 0 4 0; +#X connect 16 0 10 0; +#X connect 16 1 6 0; +#X connect 16 2 11 0; +#X coords 0 -1 1 1 170 20 2 100 100; diff --git a/help/_gemwin.pd b/help/_gemwin.pd new file mode 100644 index 000000000..db6bf05b8 --- /dev/null +++ b/help/_gemwin.pd @@ -0,0 +1,126 @@ +#N canvas 735 459 904 450 12; +#X obj 297 337 gemwin; +#X obj 102 121 cnv 25 25 25 empty empty empty 20 12 0 12 #000000 #404040 0; +#X obj 104 123 tgl 21 0 \$0-tgl \$0-tgl create 25 10 0 12 #fcfcfc #000000 #000000 0 1; +#N canvas 735 459 784 307 tgl 0; +#X obj 70 51 r \$0-tgl; +#X obj 70 101 t f f; +#X obj 70 126 select 0 1; +#X msg 70 151 0 \, destroy; +#X msg 152 151 create \, 1; +#X obj 230 126 select 0 1; +#X msg 230 151 create; +#X msg 282 151 destroy; +#X obj 230 176 symbol; +#X msg 230 201 label \$1; +#X obj 230 226 s \$0-tgl; +#X obj 207 20 loadbang; +#X obj 70 176 s \$0-gemwin; +#X obj 70 76 route float; +#X obj 460 61 inlet; +#X msg 460 117 set \$1; +#X obj 460 142 s \$0-tgl; +#X obj 279 65 t b; +#X obj 249 65 t b; +#X obj 460 92 route float destroy create; +#X connect 0 0 13 0; +#X connect 1 0 2 0; +#X connect 1 1 5 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 3 0 12 0; +#X connect 4 0 12 0; +#X connect 5 0 6 0; +#X connect 5 1 7 0; +#X connect 6 0 8 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 13 0 1 0; +#X connect 14 0 19 0; +#X connect 15 0 16 0; +#X connect 17 0 7 0; +#X connect 18 0 6 0; +#X connect 19 0 15 0; +#X connect 19 1 18 0; +#X connect 19 2 17 0; +#X restore 364 149 pd tgl; +#X obj 160 280 r \$0-gemwin; +#X obj 264 99 inlet; +#X obj 264 124 t a a; +#X obj 264 149 s \$0-gemwin; +#X obj 537 59 loadbang; +#X obj 537 124 gemargs; +#X msg 482 59 bang; +#X obj 537 149 route float; +#X obj 538 174 t a a; +#X obj 538 239 s \$0-gemwin; +#X obj 297 362 outlet; +#X obj 537 84 t b b; +#X msg 664 108 reset; +#N canvas 0 0 524 388 args 0; +#X obj 78 113 list split 2; +#X obj 78 136 list split 1; +#X obj 59 90 t b a b; +#X obj 78 159 route float; +#X obj 112 187 route bang; +#X obj 59 256 pack 0 f s; +#X obj 271 191 unpack f s; +#X obj 59 283 route 0; +#X obj 59 306 unpack f s; +#X msg 116 213 symbol \$1; +#X msg 271 145 symbol; +#X msg 271 168 20 \$1; +#X obj 59 62 inlet args; +#X obj 59 329 outlet rate; +#X obj 151 329 outlet contextname; +#X text 52 22 taken from [gemwin]; +#X connect 0 0 1 0; +#X connect 0 2 1 0; +#X connect 1 0 3 0; +#X connect 1 1 4 0; +#X connect 2 0 5 0; +#X connect 2 1 0 0; +#X connect 2 2 10 0; +#X connect 3 0 5 1; +#X connect 3 1 4 0; +#X connect 4 1 9 0; +#X connect 5 0 7 0; +#X connect 6 0 5 1; +#X connect 6 1 5 2; +#X connect 7 0 8 0; +#X connect 8 0 13 0; +#X connect 8 1 14 0; +#X connect 9 0 5 2; +#X connect 10 0 11 0; +#X connect 11 0 6 0; +#X connect 12 0 2 0; +#X restore 663 156 pd args; +#X msg 663 181 frame \$1; +#X msg 742 183 context \$1; +#X text 745 208 ???; +#X obj 160 309 t a a, f 20; +#X obj 160 339 route float; +#X obj 160 363 outlet rendering; +#X connect 0 0 14 0; +#X connect 4 0 21 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 6 1 3 0; +#X connect 8 0 15 0; +#X connect 9 0 11 0; +#X connect 9 1 17 0; +#X connect 10 0 15 0; +#X connect 11 1 12 0; +#X connect 12 0 13 0; +#X connect 15 0 9 0; +#X connect 15 1 16 0; +#X connect 16 0 13 0; +#X connect 17 0 18 0; +#X connect 17 1 19 0; +#X connect 18 0 13 0; +#X connect 21 0 22 0; +#X connect 21 1 0 0; +#X connect 22 0 23 0; +#X coords 0 -1 1 1 85 46 1 100 100; diff --git a/help/_pix2rectangle.pd b/help/_pix2rectangle.pd new file mode 100644 index 000000000..abb069300 --- /dev/null +++ b/help/_pix2rectangle.pd @@ -0,0 +1,29 @@ +#N canvas 282 264 450 413 12; +#X text 54 25 This is really just a small wrapper to for quickly displaying images in Gem's help-patches; +#X obj 82 330 cnv 20 133 80 empty empty empty 20 12 0 12 #e0e0e0 #404040 0; +#X obj 72 115 inlet; +#X obj 104 266 pix_info, f 29; +#X obj 104 345 pix_texture; +#X obj 104 370 rectangle; +#X obj 143 302 /; +#X obj 72 153 t a a; +#X obj 104 237 separator; +#X obj 72 178 outlet; +#X obj 104 215 scale; +#X obj 214 115 loadbang; +#X obj 214 140 gemargs; +#X obj 212 167 route bang; +#X connect 2 0 7 0; +#X connect 3 0 4 0; +#X connect 3 1 6 0; +#X connect 3 2 6 1; +#X connect 4 0 5 0; +#X connect 6 0 5 1; +#X connect 7 0 9 0; +#X connect 7 1 10 0; +#X connect 8 0 3 0; +#X connect 10 0 8 0; +#X connect 11 0 12 0; +#X connect 12 0 4 0; +#X connect 12 1 13 0; +#X connect 13 1 10 1; diff --git a/help/_textbbox-help.pd b/help/_textbbox-help.pd new file mode 100644 index 000000000..c76ea8764 --- /dev/null +++ b/help/_textbbox-help.pd @@ -0,0 +1,88 @@ +#N canvas 940 184 822 678 10; +#X declare -lib Gem; +#X text 54 30 Class: geometric object; +#X obj 465 65 cnv 15 180 600 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 53 434 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 7 65 cnv 15 450 330 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 453 11 GEM object; +#X text 471 47 Example:; +#X obj 470 473 cnv 15 170 180 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 471 70 gemhead; +#X floatatom 510 389 5 0 100 1 size - - 0; +#X msg 481 154 font \$1; +#X obj 481 135 openpanel; +#X obj 481 118 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X msg 489 180 text hello world!; +#X msg 509 202 1 2 3 4; +#X msg 519 249 justify left base; +#X floatatom 575 74 5 0 0 0 - - - 0; +#X floatatom 534 69 4 0 0 0 - - - 0; +#X obj 471 91 rotateXYZ; +#X msg 515 224 string 48 49 32 51 52; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a line of text; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist font text list string justify alias; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 528 8 pd META; +#X msg 522 276 string 20320 10 22909 10 19990 10 30028, f 17; +#X msg 521 326 text مرحبا بالعالم; +#X msg 518 353 alias \$1; +#X obj 577 353 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 59 441 _gemwin; +#X obj 471 410 text3d; +#X obj 553 631 - 1; +#X obj 471 451 color 1 0 0; +#X text 33 14 Synopsis: [_textbbox]; +#X text 7 69 Description: helper to draw a bounding box around [text*] output; +#X text 12 107 Gem's [text*] objects output boundbox information via their last outlet.; +#X text 14 137 Use [_textbbox] to quickly visualise this bounding box; +#X obj 553 481 vradio 18 1 0 8 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0; +#X text 572 479 no bbox; +#X text 572 497 global bbox; +#X text 571 516 line#1; +#X text 571 535 line#2; +#X text 571 554 line#3; +#X text 571 573 line#4; +#X text 577 595 ...; +#X obj 471 616 _textbbox 1 \; width 2; +#X text 16 205 Arguments:; +#X text 35 223 initial bbox selection (see Inlet#3); +#X text 19 247 Inlets:; +#X text 36 302 Inlet 2: bbox messages (from [text...]); +#X text 36 322 Inlet 3: bbox selection; +#X text 102 339 0...global bbox; +#X text 102 353 1...line#1 bbox; +#X text 102 366 2...line#2 bbox; +#X text 15 154 You can select whether to display the global bounding box for all lines \, or a specific line. Out of bound lines (e.g. negative lines) will disable rendering; +#X msg 482 558 width \$1; +#X floatatom 482 534 5 0 0 0 - - - 0; +#X text 36 262 Inlet 1: gemlist; +#X text 36 282 Inlet 1: message: width ; +#X connect 7 0 17 0; +#X connect 8 0 25 1; +#X connect 9 0 25 0; +#X connect 10 0 9 0; +#X connect 11 0 10 0; +#X connect 12 0 25 0; +#X connect 13 0 25 0; +#X connect 14 0 25 0; +#X connect 15 0 17 3; +#X connect 16 0 17 1; +#X connect 17 0 25 0; +#X connect 18 0 25 0; +#X connect 20 0 25 0; +#X connect 21 0 25 0; +#X connect 22 0 25 0; +#X connect 23 0 22 0; +#X connect 25 0 27 0; +#X connect 25 1 40 1; +#X connect 26 0 40 2; +#X connect 27 0 40 0; +#X connect 32 0 26 0; +#X connect 50 0 40 0; +#X connect 51 0 50 0; diff --git a/help/_textbbox.pd b/help/_textbbox.pd new file mode 100644 index 000000000..fe77563ef --- /dev/null +++ b/help/_textbbox.pd @@ -0,0 +1,54 @@ +#N canvas 2076 404 880 589 12; +#X obj 234 146 inlet; +#X obj 32 270 spigot; +#X text 97 283 global bounding box; +#X obj 32 403 polygon 4 \; draw line; +#X msg 233 405 \$1 \$2 \$3 \$1 \$5 \$3 \$4 \$5 \$3 \$4 \$2 \$3; +#X obj 233 373 route 0; +#X obj 32 145 inlet gemlist; +#X obj 137 145 inlet bbox; +#X obj 233 196 >= 0; +#X obj 280 308 - 1; +#X obj 137 309 list prepend -1; +#X msg 284 436 0 0 0 0 0 0 0 0 0 0 0 0; +#X obj 137 244 route bbox bboxline ascender; +#X obj 233 436 t a a; +#X text 487 438 clear for out-of-range lines; +#X text 47 31 helper for drawing boundingboxes for [text*] objects; +#X obj 537 59 loadbang; +#X obj 537 124 gemargs; +#X msg 482 59 bang; +#X obj 234 171 t f f; +#X obj 32 170 route width; +#X obj 537 267 t f; +#X msg 537 292 width \$1; +#X obj 537 242 route width; +#X obj 537 84 t b; +#X obj 583 151 route float; +#X connect 0 0 19 0; +#X connect 1 0 3 0; +#X connect 4 0 13 0; +#X connect 5 0 4 0; +#X connect 6 0 20 0; +#X connect 7 0 12 0; +#X connect 8 0 1 1; +#X connect 9 0 5 1; +#X connect 10 0 5 0; +#X connect 11 0 13 0; +#X connect 12 0 10 0; +#X connect 12 1 5 0; +#X connect 12 2 11 0; +#X connect 13 0 3 0; +#X connect 16 0 24 0; +#X connect 17 0 23 0; +#X connect 17 1 25 0; +#X connect 18 0 24 0; +#X connect 19 0 8 0; +#X connect 19 1 9 0; +#X connect 20 0 21 0; +#X connect 20 1 1 0; +#X connect 21 0 22 0; +#X connect 22 0 3 0; +#X connect 23 0 21 0; +#X connect 24 0 17 0; +#X connect 25 0 19 0; diff --git a/help/accumrotate-help.pd b/help/accumrotate-help.pd index 3adcade7d..b0d33f47d 100644 --- a/help/accumrotate-help.pd +++ b/help/accumrotate-help.pd @@ -2,59 +2,26 @@ #X declare -lib Gem; #X text 452 8 GEM object; #X text 50 12 Synopsis: [accumrotate]; -#X obj 8 197 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 197 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 63 225 Inlet 1: message: reset; -#X text 64 254 Inlet 3: float: delta-rotation around Y-axis (in deg) -; -#X text 64 242 Inlet 2: float: delta-rotation around X-axis (in deg) -; -#X text 64 266 Inlet 4: float: delta-rotation around Z-axis (in deg) -; +#X text 64 254 Inlet 3: float: delta-rotation around Y-axis (in deg); +#X text 64 242 Inlet 2: float: delta-rotation around X-axis (in deg); +#X text 64 266 Inlet 4: float: delta-rotation around Z-axis (in deg); #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 282 Outlets:; #X text 57 295 Outlet 1: gemlist; -#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 63 166 initial rotations around X \, Y \, Z-axes; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 42 95 [accumrotate] accepts a gemList and changes the current -transformation matrix by the specified delta-rotation; -#X text 41 130 the delta-values add to the current rotation-matrix. -; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 42 95 [accumrotate] accepts a gemList and changes the current transformation matrix by the specified delta-rotation; +#X text 41 130 the delta-values add to the current rotation-matrix.; #X text 29 77 Description: accumulated rotation; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 233 square; #X msg 478 108 reset; @@ -66,12 +33,22 @@ transformation matrix by the specified delta-rotation; #X text 34 335 see also:; #X obj 143 337 rotateXYZ; #X obj 95 337 rotate; -#X obj 520 8 declare -lib Gem; -#X connect 21 0 22 0; -#X connect 22 0 21 0; -#X connect 26 0 31 0; -#X connect 28 0 31 0; -#X connect 29 0 31 2; -#X connect 31 0 27 0; -#X connect 32 0 31 1; -#X connect 33 0 31 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION accumulated rotation; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist reset; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 520 8 pd META; +#X obj 524 263 _gemwin; +#X connect 22 0 27 0; +#X connect 24 0 27 0; +#X connect 25 0 27 2; +#X connect 27 0 23 0; +#X connect 28 0 27 1; +#X connect 29 0 27 3; diff --git a/help/alpha-help.pd b/help/alpha-help.pd index a7d6f8c3a..808259944 100644 --- a/help/alpha-help.pd +++ b/help/alpha-help.pd @@ -1,74 +1,38 @@ #N canvas 50 237 711 539 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 330 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 330 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 37 195 Inlets:; #X text 453 355 Outlets:; #X text 461 366 Outlet 1: gemlist; -#X obj 8 161 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 161 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 160 Arguments:; -#X obj 8 76 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 250 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 250 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 584 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 589 293 pd gemwin; -#X msg 589 274 create; -#X text 585 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 451 197 cnv 15 80 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 451 197 cnv 15 80 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 579 186 color 1 0 0 0.5; -#X text 60 219 Inlet 1: float: turn alpha blending on/off (default:1) -; +#X text 60 219 Inlet 1: float: turn alpha blending on/off (default:1); #X text 50 12 Synopsis: [alpha]; #X text 29 77 Description: enable alpha blending; #X obj 458 310 square; #X obj 458 233 alpha; #X obj 458 108 color 0 1 0 0.5; #X text 61 208 Inlet 1: gemlist; -#X text 60 231 Inlet 1: message "auto 1" | "auto 0" turn on/off automatic -depth detection; -#X floatatom 583 139 5 0 0 0 - - -; +#X text 60 231 Inlet 1: message "auto 1" | "auto 0" turn on/off automatic depth detection; +#X floatatom 583 139 5 0 0 0 - - - 0; #X obj 458 86 gemhead 51; #X obj 579 211 sphere; #X obj 458 137 rotate 114 0 1 0; #X obj 579 162 gemhead 50; #X msg 474 176 auto \$1; -#X obj 474 158 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 474 158 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 583 108 0 1 0 \$1; -#X floatatom 583 88 5 0 1 0 - - -; -#X obj 628 88 hsl 64 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; -#X text 22 91 [alpha] turns on and off alpha blending. Be aware that -the rendering order matters \, so you probably want to set the gemhead -order number high so that the object is rendered after all of the non-alpha -blended ones.; -#X text 63 171 float : blending function (default:GL_ONE_MINUS_SRC_ALPHA) -; +#X floatatom 583 88 5 0 1 0 - - - 0; +#X obj 628 88 hsl 64 15 0 1 0 0 empty empty empty -2 -8 0 10 #fcfcfc #000000 #000000 0 1; +#X text 22 91 [alpha] turns on and off alpha blending. Be aware that the rendering order matters \, so you probably want to set the gemhead order number high so that the object is rendered after all of the non-alpha blended ones.; +#X text 63 171 float : blending function (default:GL_ONE_MINUS_SRC_ALPHA); #X text 60 260 Inlet 2: float: blending function; #X text 70 272 0=GL_ONE_MINUS_SOURCE_ALPHA; #X text 70 282 1=GL_ONE; @@ -90,23 +54,30 @@ blended ones.; #X text 70 474 17=GL_ONE_MINUS_SRC1_COLOR; #X text 70 486 18=GL_SRC1_ALPHA; #X text 70 498 19=GL_ONE_MINUS_SRC1_ALPHA; -#X obj 477 210 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X floatatom 501 210 2 0 19 0 - - -; -#X obj 588 8 declare -lib Gem; -#X connect 11 0 12 0; -#X connect 12 0 11 0; -#X connect 16 0 27 0; -#X connect 21 0 20 0; -#X connect 22 0 28 0; -#X connect 25 0 28 1; -#X connect 26 0 22 0; -#X connect 28 0 21 0; -#X connect 29 0 16 0; -#X connect 30 0 21 0; -#X connect 31 0 30 0; -#X connect 32 0 22 1; -#X connect 33 0 32 0; -#X connect 34 0 33 0; -#X connect 58 0 21 0; -#X connect 59 0 21 1; +#X obj 477 210 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 501 210 2 0 19 0 - - - 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION enable alpha blending; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist float message; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 588 271 _gemwin; +#X connect 12 0 23 0; +#X connect 17 0 16 0; +#X connect 18 0 24 0; +#X connect 21 0 24 1; +#X connect 22 0 18 0; +#X connect 24 0 17 0; +#X connect 25 0 12 0; +#X connect 26 0 17 0; +#X connect 27 0 26 0; +#X connect 28 0 18 1; +#X connect 29 0 28 0; +#X connect 30 0 29 0; +#X connect 54 0 17 0; +#X connect 55 0 17 1; diff --git a/help/ambient-help.pd b/help/ambient-help.pd index edf8b9afb..b78caffc6 100644 --- a/help/ambient-help.pd +++ b/help/ambient-help.pd @@ -1,46 +1,18 @@ -#N canvas 260 145 639 369 10; +#N canvas 443 161 639 369 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 252 Outlets:; #X text 57 265 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 29 77 Description: ambient colouring; #X obj 451 193 cube; @@ -49,22 +21,28 @@ #X obj 500 211 rotate 180 1 0 0; #X text 62 156 a list of 3 (RGB) or 4 (RGBA) float-values.; #X text 60 171 defaults: 0.2 0.2 0.2 1; -#X text 22 91 [ambient] accepts a gemList and sets the ambient-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 22 91 [ambient] accepts a gemList and sets the ambient-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X text 50 12 Synopsis: [ambient]; #X obj 451 156 ambient 0 1 0; #X msg 478 130 0.4 0.8 1; #X text 63 229 Inlet 2: list: 3(RGB) or 4(RGBA) float values; -#X floatatom 549 193 5 0 0 0 - - -; +#X floatatom 549 193 5 0 0 0 - - - 0; #X obj 84 332 ambientRGB; #X text 21 332 see also:; -#X obj 519 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 27 0; -#X connect 20 0 22 0; -#X connect 22 0 21 0; -#X connect 27 0 19 0; -#X connect 28 0 27 1; -#X connect 30 0 22 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION ambient colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 519 8 pd META; +#X obj 461 256 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 23 0; +#X connect 16 0 18 0; +#X connect 18 0 17 0; +#X connect 23 0 15 0; +#X connect 24 0 23 1; +#X connect 26 0 18 1; diff --git a/help/ambientRGB-help.pd b/help/ambientRGB-help.pd index 970fecaf7..109cae985 100644 --- a/help/ambientRGB-help.pd +++ b/help/ambientRGB-help.pd @@ -1,55 +1,25 @@ #N canvas 6 61 641 366 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 292 Outlets:; #X text 57 305 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 29 77 Description: ambient colouring; #X obj 451 193 cube; #X obj 500 192 gemhead; #X obj 500 230 world_light; #X text 50 12 Synopsis: [ambientRGB]; -#X text 22 91 [ambientRGB] accepts a gemList and sets the ambient-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 22 91 [ambientRGB] accepts a gemList and sets the ambient-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X text 62 156 a list of 3 (RGB) or 4 (RGBA) float-values.; #X text 60 171 defaults: 0.2 0.2 0.2 1; #X text 63 229 Inlet 2: float: red value; @@ -57,23 +27,34 @@ see any effects.; #X text 63 259 Inlet 4: float: blue value; #X text 63 274 Inlet 5: float: alpha value; #X obj 451 156 ambientRGB 0 1 0; -#X floatatom 477 122 3 0 1 0 - - -; -#X floatatom 504 122 3 0 1 0 - - -; -#X floatatom 531 122 3 0 1 0 - - -; -#X floatatom 558 122 3 0 1 0 - - -; -#X floatatom 548 192 5 0 0 0 - - -; +#X floatatom 477 122 3 0 1 0 - - - 0; +#X floatatom 504 122 3 0 1 0 - - - 0; +#X floatatom 531 122 3 0 1 0 - - - 0; +#X floatatom 558 122 3 0 1 0 - - - 0; +#X floatatom 548 192 5 0 0 0 - - - 0; #X obj 500 211 rotate 70 1 0 0; #X text 20 333 see also:; #X obj 93 332 ambient; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 30 0; -#X connect 20 0 36 0; -#X connect 30 0 19 0; -#X connect 31 0 30 1; -#X connect 32 0 30 2; -#X connect 33 0 30 3; -#X connect 34 0 30 4; -#X connect 35 0 36 1; -#X connect 36 0 21 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION ambient colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 453 260 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 26 0; +#X connect 16 0 32 0; +#X connect 26 0 15 0; +#X connect 27 0 26 1; +#X connect 28 0 26 2; +#X connect 29 0 26 3; +#X connect 30 0 26 4; +#X connect 31 0 32 1; +#X connect 32 0 17 0; diff --git a/help/camera-help.pd b/help/camera-help.pd index 3b0cec1b9..3782c9d36 100644 --- a/help/camera-help.pd +++ b/help/camera-help.pd @@ -23,33 +23,6 @@ #X floatatom 379 207 5 0 0 0 - - - 0; #X floatatom 379 170 5 0 0 0 - - - 0; #X msg 67 213 distance \$1; -#X obj 170 305 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X obj 67 41 route create destroy; -#X obj 298 42 loadbang; -#X msg 298 65 lighting 1; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 1 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 3 0; -#X connect 7 0 6 0; -#X connect 7 1 4 0; -#X connect 7 1 5 0; -#X connect 7 2 0 0; -#X connect 8 0 9 0; -#X connect 9 0 0 0; -#X restore 175 344 pd gemwin; -#X msg 175 325 create; -#X text 171 304 Create window:; #X obj 488 18 declare -lib Gem; #X msg 537 279 bang; #X obj 699 307 gemhead; @@ -68,44 +41,43 @@ #X obj 699 353 route 0 1; #X text 715 157 0.."local" mode; #X text 716 172 1.."gemwin" mode; +#X obj 227 387 _gemwin \; 0 \; 0 \; lighting 1; #X connect 0 0 12 0; #X connect 1 0 11 0; #X connect 2 0 4 0; #X connect 3 0 5 0; -#X connect 4 0 36 0; -#X connect 5 0 36 0; +#X connect 4 0 32 0; +#X connect 5 0 32 0; #X connect 6 0 9 0; #X connect 7 0 8 0; -#X connect 8 0 36 0; -#X connect 9 0 36 0; -#X connect 10 0 36 0; -#X connect 11 0 36 0; -#X connect 12 0 36 0; -#X connect 13 0 36 0; +#X connect 8 0 32 0; +#X connect 9 0 32 0; +#X connect 10 0 32 0; +#X connect 11 0 32 0; +#X connect 12 0 32 0; +#X connect 13 0 32 0; #X connect 14 0 13 0; #X connect 15 0 22 0; -#X connect 16 0 36 0; -#X connect 17 0 36 0; -#X connect 18 0 36 0; +#X connect 16 0 32 0; +#X connect 17 0 32 0; +#X connect 18 0 32 0; #X connect 19 0 16 0; #X connect 20 0 18 0; #X connect 21 0 17 0; -#X connect 22 0 36 0; -#X connect 24 0 25 0; -#X connect 25 0 24 0; -#X connect 28 0 36 0; -#X connect 29 0 37 0; -#X connect 31 0 32 0; -#X connect 32 0 24 0; -#X connect 33 0 34 0; -#X connect 35 1 31 0; -#X connect 36 0 35 0; -#X connect 36 1 40 0; -#X connect 37 0 42 0; -#X connect 38 0 39 0; -#X connect 39 0 41 0; -#X connect 39 1 37 1; -#X connect 40 0 30 0; -#X connect 41 0 36 0; -#X connect 42 0 40 0; -#X connect 42 1 30 0; +#X connect 22 0 32 0; +#X connect 24 0 32 0; +#X connect 25 0 33 0; +#X connect 27 0 28 0; +#X connect 28 0 41 0; +#X connect 29 0 30 0; +#X connect 31 1 27 0; +#X connect 32 0 31 0; +#X connect 32 1 36 0; +#X connect 33 0 38 0; +#X connect 34 0 35 0; +#X connect 35 0 37 0; +#X connect 35 1 33 1; +#X connect 36 0 26 0; +#X connect 37 0 32 0; +#X connect 38 0 36 0; +#X connect 38 1 26 0; diff --git a/help/circle-help.pd b/help/circle-help.pd index 5ed5a05b1..027936cd1 100644 --- a/help/circle-help.pd +++ b/help/circle-help.pd @@ -3,18 +3,12 @@ #X text 33 14 Synopsis: [circle]; #X text 54 30 Class: geometric object; #X text 525 29 Example:; -#X obj 7 65 cnv 15 450 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 7 69 Description: Renders a circle.; -#X text 16 86 The circle object renders a circle flat disc at the current -position with current color. The look of the circle can be changed -with the draw message \, its size can be changed via the second inlet. -; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X text 16 86 The circle object renders a circle flat disc at the current position with current color. The look of the circle can be changed with the draw message \, its size can be changed via the second inlet.; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 166 cnv 15 450 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 166 cnv 15 450 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 165 Arguments:; #X text 27 261 Inlet 2: float: size; #X text 452 8 GEM object; @@ -22,46 +16,29 @@ with the draw message \, its size can be changed via the second inlet. #X text 9 280 Outlets:; #X text 21 293 Outlet 1: gemlist; #X text 63 177 size of the circle; -#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 584 224 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 589 263 pd gemwin; -#X msg 589 244 create; -#X text 585 223 Create window:; -#X obj 525 80 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 525 80 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 593 159 circle; #X msg 535 95 draw line; #X msg 535 116 draw fill; #X msg 535 138 draw point; #X obj 593 54 gemhead; -#X floatatom 626 130 5 0 0 2 size - -; +#X floatatom 626 130 5 0 0 2 size - - 0; #X text 64 191 default:1; #X text 27 247 Inlet 1: message: draw [line|fill|point|default]; -#X obj 588 8 declare -lib Gem; -#X connect 18 0 19 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a circle.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 541 245 _gemwin; #X connect 19 0 18 0; -#X connect 23 0 22 0; -#X connect 24 0 22 0; -#X connect 25 0 22 0; -#X connect 26 0 22 0; -#X connect 27 0 22 1; +#X connect 20 0 18 0; +#X connect 21 0 18 0; +#X connect 22 0 18 0; +#X connect 23 0 18 1; diff --git a/help/color-help.pd b/help/color-help.pd index 94af8b1c9..c7c8cc79c 100644 --- a/help/color-help.pd +++ b/help/color-help.pd @@ -1,46 +1,18 @@ #N canvas 48 102 639 342 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 292 Outlets:; #X text 57 305 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 66 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 66 cnv 15 170 200 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 66 cnv 15 170 200 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 49 Example:; -#X obj 510 183 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 515 222 pd gemwin; -#X msg 515 203 create; -#X text 511 182 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 107 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 107 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 73 gemhead; #X obj 451 182 cube; #X text 62 156 a list of 3 (RGB) or 4 (RGBA) float-values.; @@ -48,17 +20,22 @@ #X obj 451 145 color 0 1 0; #X msg 487 116 0 0 1; #X text 63 229 Inlet 2: list: 3(RGB) or 4(RGBA) float values; -#X text 22 81 [color] sets the colour of all subsequent shape and vertex -operations until reset by another [color]/[colorRGB] object. If you -set the alpha-value \, you will need an [alpha] object to enable alpha-blending -; +#X text 22 81 [color] sets the colour of all subsequent shape and vertex operations until reset by another [color]/[colorRGB] object. If you set the alpha-value \, you will need an [alpha] object to enable alpha-blending; #X text 50 12 Synopsis: [color]; #X text 29 67 Description: colouring; #X text 449 272 see also:; #X obj 452 301 colorRGB; -#X obj 519 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 21 0; -#X connect 21 0 18 0; -#X connect 22 0 21 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 519 8 pd META; +#X obj 517 213 _gemwin; +#X connect 13 0 17 0; +#X connect 17 0 14 0; +#X connect 18 0 17 1; diff --git a/help/colorRGB-help.pd b/help/colorRGB-help.pd index 85cd3520d..bd959a410 100644 --- a/help/colorRGB-help.pd +++ b/help/colorRGB-help.pd @@ -1,46 +1,18 @@ #N canvas 42 61 639 342 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 292 Outlets:; #X text 57 305 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 66 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 66 cnv 15 170 200 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 66 cnv 15 170 200 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 49 Example:; -#X obj 514 190 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 229 pd gemwin; -#X msg 519 210 create; -#X text 515 189 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 107 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 107 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 73 gemhead; #X obj 451 182 cube; #X text 62 156 a list of 3 (RGB) or 4 (RGBA) float-values.; @@ -48,26 +20,34 @@ #X text 63 244 Inlet 3: float: green value; #X text 63 259 Inlet 4: float: blue value; #X text 63 274 Inlet 5: float: alpha value; -#X floatatom 479 111 3 0 1 0 - - -; -#X floatatom 508 111 3 0 1 0 - - -; -#X floatatom 536 111 3 0 1 0 - - -; -#X floatatom 565 111 3 0 1 0 - - -; +#X floatatom 479 111 3 0 1 0 - - - 0; +#X floatatom 508 111 3 0 1 0 - - - 0; +#X floatatom 536 111 3 0 1 0 - - - 0; +#X floatatom 565 111 3 0 1 0 - - - 0; #X text 60 171 defaults: 0 0 0 1; #X text 50 12 Synopsis: [colorRGB]; #X obj 451 145 colorRGB 0 1 0; #X text 29 67 Description: colouring; -#X text 22 81 [colorRGB] sets the colour of all subsequent shape and -vertex operations until reset by another [color]/[colorRGB] object. -If you set the alpha-value \, you will need an [alpha] object to enable -alpha-blending; +#X text 22 81 [colorRGB] sets the colour of all subsequent shape and vertex operations until reset by another [color]/[colorRGB] object. If you set the alpha-value \, you will need an [alpha] object to enable alpha-blending; #X text 447 272 see also:; #X obj 449 297 color; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 30 0; -#X connect 24 0 30 1; -#X connect 25 0 30 2; -#X connect 26 0 30 3; -#X connect 27 0 30 4; -#X connect 30 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 528 213 _gemwin; +#X connect 13 0 26 0; +#X connect 20 0 26 1; +#X connect 21 0 26 2; +#X connect 22 0 26 3; +#X connect 23 0 26 4; +#X connect 26 0 14 0; diff --git a/help/colorSquare-help.pd b/help/colorSquare-help.pd index 7944e6d24..b1a8bbcc7 100644 --- a/help/colorSquare-help.pd +++ b/help/colorSquare-help.pd @@ -1,38 +1,11 @@ #N canvas 130 61 696 468 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 107 cnv 15 200 250 empty empty empty 20 12 0 14 -228992 --66577 0; -#X obj 494 284 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 499 323 pd gemwin; -#X msg 499 304 create; -#X text 495 283 Create window:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 196 cnv 15 450 200 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 479 107 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 196 cnv 15 450 200 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 201 Inlets:; -#X obj 8 156 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 27 227 Inlet 1: message: draw [line|fill|point]; #X text 27 241 Inlet 2: float: size; @@ -41,16 +14,14 @@ #X text 9 350 Outlets:; #X text 21 363 Outlet 1: gemlist; #X text 485 89 Example:; -#X obj 482 137 cnv 15 190 110 empty empty empty 20 12 0 14 -81876 -66577 -0; +#X obj 482 137 cnv 15 190 110 empty empty empty 20 12 0 14 #4cfc4c #404040 0; #X text 33 14 Synopsis: [colorSquare]; -#X obj 534 252 cnv 15 100 30 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 534 252 cnv 15 100 30 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 485 145 draw line; #X msg 485 166 draw fill; #X msg 485 188 draw point; #X obj 543 114 gemhead; -#X floatatom 557 143 5 0 0 1 size - -; +#X floatatom 557 143 5 0 0 1 size - - 0; #X text 7 69 Description: Renders a square with several colors.; #X text 63 166 size of the square; #X obj 543 259 colorSquare; @@ -58,27 +29,32 @@ #X msg 600 203 0 0 1; #X msg 586 184 0 1 0; #X msg 571 165 1 0 0; -#X text 27 268 Inlet 3: list: 3(RGB) float values for the lowerleft -corner; -#X text 27 285 Inlet 4: list: 3(RGB) float values for the lowerright -corner; -#X text 27 305 Inlet 5: list: 3(RGB) float values for the upperright -corner; -#X text 27 322 Inlet 6: list: 3(RGB) float values for the upperleft -corner; -#X text 16 86 The colorSquare object renders a square at the current -position. The size of the square can be changed via the second inlet. -The colors of the 4 corners can be specified separately and are drawn -as gradients.; -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 21 0 28 0; -#X connect 22 0 28 0; -#X connect 23 0 28 0; -#X connect 24 0 28 0; -#X connect 25 0 28 1; -#X connect 29 0 28 5; -#X connect 30 0 28 4; -#X connect 31 0 28 3; -#X connect 32 0 28 2; +#X text 27 268 Inlet 3: list: 3(RGB) float values for the lowerleft corner; +#X text 27 285 Inlet 4: list: 3(RGB) float values for the lowerright corner; +#X text 27 305 Inlet 5: list: 3(RGB) float values for the upperright corner; +#X text 27 322 Inlet 6: list: 3(RGB) float values for the upperleft corner; +#X text 16 86 The colorSquare object renders a square at the current position. The size of the square can be changed via the second inlet. The colors of the 4 corners can be specified separately and are drawn as gradients.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a square with several colors.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 INLET_3 list; +#X text 20 165 INLET_4 list; +#X text 20 185 INLET_5 list; +#X text 20 205 OUTLET_0 gemlist; +#X text 10 225 AUTHOR IOhannes m zmölnig; +#X text 10 245 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 587 308 _gemwin; +#X connect 17 0 24 0; +#X connect 18 0 24 0; +#X connect 19 0 24 0; +#X connect 20 0 24 0; +#X connect 21 0 24 1; +#X connect 25 0 24 5; +#X connect 26 0 24 4; +#X connect 27 0 24 3; +#X connect 28 0 24 2; diff --git a/help/cone-help.pd b/help/cone-help.pd index 2beb1377e..b115d223e 100644 --- a/help/cone-help.pd +++ b/help/cone-help.pd @@ -1,39 +1,12 @@ #N canvas 290 157 710 345 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 47 cnv 15 180 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 544 224 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 549 263 pd gemwin; -#X msg 549 244 create; -#X text 545 223 Create window:; +#X obj 479 47 cnv 15 180 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 29 Example:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 146 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; #X text 27 261 Inlet 2: float: size; #X text 452 8 GEM object; @@ -42,30 +15,36 @@ #X text 21 300 Outlet 1: gemlist; #X text 33 14 Synopsis: [cone]; #X text 7 69 Description: Renders a cone.; -#X text 14 86 The cone object renders a cone at the current position -with current color. The look of the cone can be changed with the draw -message \, its size can be changed via the second inlet.; -#X obj 542 130 cnv 15 100 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X text 14 86 The cone object renders a cone at the current position with current color. The look of the cone can be changed with the draw message \, its size can be changed via the second inlet.; +#X obj 542 130 cnv 15 100 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 485 65 draw line; #X msg 485 86 draw fill; #X msg 485 108 draw point; #X obj 553 54 gemhead; -#X floatatom 569 144 5 0 0 2 size - -; +#X floatatom 569 144 5 0 0 2 size - - 0; #X obj 553 79 rotateXYZ 90 0 0; -#X floatatom 586 171 5 0 0 2 segments - -; +#X floatatom 586 171 5 0 0 2 segments - - 0; #X text 27 272 Inlet 3: int: number of segments; #X obj 553 189 cone 1; #X text 64 180 defaults: 1 10; #X text 63 162 size of the cone \, number of segments; #X text 27 247 Inlet 1: message: draw [line|fill|point|default]; -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 21 0 29 0; -#X connect 22 0 29 0; -#X connect 23 0 29 0; -#X connect 24 0 26 0; -#X connect 25 0 29 1; -#X connect 26 0 29 0; -#X connect 27 0 29 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a cone.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 int; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 540 224 _gemwin; +#X connect 17 0 25 0; +#X connect 18 0 25 0; +#X connect 19 0 25 0; +#X connect 20 0 22 0; +#X connect 21 0 25 1; +#X connect 22 0 25 0; +#X connect 23 0 25 2; diff --git a/help/cube-help.pd b/help/cube-help.pd index e0ef5eaee..009a3415e 100644 --- a/help/cube-help.pd +++ b/help/cube-help.pd @@ -1,38 +1,11 @@ #N canvas 289 160 710 345 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 584 224 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 589 263 pd gemwin; -#X msg 589 244 create; -#X text 585 223 Create window:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 27 261 Inlet 2: float: size; @@ -43,24 +16,29 @@ #X text 33 14 Synopsis: [cube]; #X text 7 69 Description: Renders a cube.; #X text 63 186 size of the cube; -#X text 16 86 The cube object renders a cube at the current position -with current color. The size of the cube can be changed via the second -inlet.; +#X text 16 86 The cube object renders a cube at the current position with current color. The size of the cube can be changed via the second inlet.; #X text 525 29 Example:; -#X obj 522 78 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 522 78 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 525 128 draw point; #X obj 593 54 gemhead; -#X floatatom 624 114 5 0 0 0 - - -; +#X floatatom 624 114 5 0 0 0 - - - 0; #X text 624 98 size; #X obj 593 159 cube; #X msg 525 106 draw line; #X msg 525 85 draw default; -#X obj 588 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 23 0 27 0; -#X connect 24 0 27 0; -#X connect 25 0 27 1; -#X connect 28 0 27 0; -#X connect 29 0 27 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a cube.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 583 236 _gemwin; +#X connect 19 0 23 0; +#X connect 20 0 23 0; +#X connect 21 0 23 1; +#X connect 24 0 23 0; +#X connect 25 0 23 0; diff --git a/help/cuboid-help.pd b/help/cuboid-help.pd index edd04f184..4dfc0d829 100644 --- a/help/cuboid-help.pd +++ b/help/cuboid-help.pd @@ -1,75 +1,55 @@ #N canvas 289 160 710 363 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 584 224 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 589 263 pd gemwin; -#X msg 589 244 create; -#X text 585 223 Create window:; +#X obj 519 47 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 525 29 Example:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 452 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 310 Outlets:; #X text 21 323 Outlet 1: gemlist; -#X obj 522 82 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 522 82 cnv 15 160 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 525 95 draw line; #X msg 525 116 draw fill; #X msg 525 138 draw point; #X obj 593 54 gemhead; -#X floatatom 605 104 5 0 0 0 - - -; +#X floatatom 605 104 5 0 0 0 - - - 0; #X obj 593 179 cuboid; -#X floatatom 617 134 5 0 0 0 - - -; -#X floatatom 630 162 5 0 0 0 - - -; +#X floatatom 617 134 5 0 0 0 - - - 0; +#X floatatom 630 162 5 0 0 0 - - - 0; #X text 605 88 length; #X text 617 118 height; #X text 630 146 depth; #X text 63 167 dimensions of the cuboid (length width height); #X text 7 69 Description: Renders a cuboid box.; -#X text 16 86 The cuboid object renders a cuboid (box) at the current -position with current color. The dimensions of the cuboid can be changed -via the last three inlets.; +#X text 16 86 The cuboid object renders a cuboid (box) at the current position with current color. The dimensions of the cuboid can be changed via the last three inlets.; #X text 33 14 Synopsis: [cuboid]; #X text 27 260 Inlet 2: float: length (dimX); #X text 27 275 Inlet 3: float: height (dimY); #X text 27 289 Inlet 4: float: depth (dimZ); #X text 65 181 default: 1 1 0; -#X obj 588 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 23 0; -#X connect 19 0 23 0; -#X connect 20 0 23 0; -#X connect 21 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 23 2; -#X connect 25 0 23 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a cuboid box.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 595 244 _gemwin; +#X connect 14 0 19 0; +#X connect 15 0 19 0; +#X connect 16 0 19 0; +#X connect 17 0 19 0; +#X connect 18 0 19 1; +#X connect 20 0 19 2; +#X connect 21 0 19 3; diff --git a/help/curve-help.pd b/help/curve-help.pd index 7a0811ae1..86d05da28 100644 --- a/help/curve-help.pd +++ b/help/curve-help.pd @@ -2,72 +2,37 @@ #X declare -lib Gem; #X text 54 30 Class: geometric object; #X text 475 39 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 180 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 452 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 358 Outlets:; #X text 21 371 Outlet 1: gemlist; -#X obj 469 58 cnv 15 200 295 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 568 359 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 573 398 pd gemwin; -#X msg 573 379 create; -#X text 569 358 Create window:; -#X obj 474 112 cnv 15 190 200 empty empty empty 20 12 0 14 -85973 -66577 -0; -#X obj 521 319 cnv 15 100 30 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X text 21 138 Each (additional) inlet will accept an X Y Z point which -is where the control point will be.; +#X obj 469 58 cnv 15 200 295 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 474 112 cnv 15 190 200 empty empty empty 20 12 0 14 #50fc50 #404040 0; +#X obj 521 319 cnv 15 100 30 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X text 21 138 Each (additional) inlet will accept an X Y Z point which is where the control point will be.; #X text 28 323 Inlet 2: list: 3(XYZ) float values; #X text 28 344 Inlet N: list: 3(XYZ) float values; #X text 52 330 ...; #X text 33 14 Synopsis: [curve]; #X text 7 69 Description: Renders a bezier-curve; #X text 63 187 number of control-points of the curve (mandatory); -#X text 27 247 Inlet 1: message: draw [line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip] -; -#X text 22 88 [curve] creates a bezier curve. The initial argument -is the number of control-points of the curve. There is no maximum number -of control-points.; -#X text 27 306 Inlet 1: message: res : interpolation-resolution(30) -; +#X text 27 247 Inlet 1: message: draw [line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip]; +#X text 22 88 [curve] creates a bezier curve. The initial argument is the number of control-points of the curve. There is no maximum number of control-points.; +#X text 27 306 Inlet 1: message: res : interpolation-resolution(30); #X text 27 293 Inlet 1: message: width : line-width(1); -#X obj 596 233 cnv 15 65 75 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 596 233 cnv 15 65 75 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 479 163 draw line; #X msg 479 118 draw fill; #X msg 479 140 draw point; #X obj 537 64 gemhead; #X msg 585 115 1 1 0; #X msg 593 135 1 -1 0; -#X floatatom 605 196 5 0 0 0 - - -; +#X floatatom 605 196 5 0 0 0 - - - 0; #X msg 603 175 -2 1 0; #X msg 599 155 -1 -1 -3; #X msg 479 183 draw linestrip; @@ -77,38 +42,47 @@ of control-points.; #X msg 478 269 draw quad; #X msg 478 291 draw quadstrip; #X obj 537 88 rotateXYZ; -#X floatatom 595 65 5 0 0 0 - - -; -#X obj 537 326 curve 5; +#X floatatom 595 65 5 0 0 0 - - - 0; +#X obj 537 326 curve 5, f 12; #X obj 608 89 loadbang; -#X floatatom 599 237 5 0 10 0 - - -; +#X floatatom 599 237 5 0 10 0 - - - 0; #X msg 599 253 width \$1; -#X floatatom 600 274 5 0 100 0 - - -; +#X floatatom 600 274 5 0 100 0 - - - 0; #X msg 600 291 res \$1; #X msg 605 213 \$1 \$1 \$1; -#X obj 569 8 declare -lib Gem; -#X connect 13 0 14 0; -#X connect 14 0 13 0; -#X connect 30 0 47 0; -#X connect 31 0 47 0; -#X connect 32 0 47 0; -#X connect 33 0 45 0; -#X connect 34 0 47 1; -#X connect 35 0 47 2; -#X connect 36 0 53 0; -#X connect 37 0 47 4; -#X connect 38 0 47 3; -#X connect 39 0 47 0; -#X connect 40 0 47 0; -#X connect 41 0 47 0; -#X connect 42 0 47 0; -#X connect 43 0 47 0; -#X connect 44 0 47 0; -#X connect 45 0 47 0; -#X connect 46 0 45 1; -#X connect 46 0 45 3; -#X connect 48 0 34 0; -#X connect 49 0 50 0; -#X connect 50 0 47 0; -#X connect 51 0 52 0; -#X connect 52 0 47 0; -#X connect 53 0 47 5; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a bezier-curve; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw width res; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_N list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 569 8 pd META; +#X obj 571 357 _gemwin; +#X connect 26 0 43 0; +#X connect 27 0 43 0; +#X connect 28 0 43 0; +#X connect 29 0 41 0; +#X connect 30 0 43 1; +#X connect 31 0 43 2; +#X connect 32 0 49 0; +#X connect 33 0 43 4; +#X connect 34 0 43 3; +#X connect 35 0 43 0; +#X connect 36 0 43 0; +#X connect 37 0 43 0; +#X connect 38 0 43 0; +#X connect 39 0 43 0; +#X connect 40 0 43 0; +#X connect 41 0 43 0; +#X connect 42 0 41 1; +#X connect 42 0 41 3; +#X connect 44 0 30 0; +#X connect 45 0 46 0; +#X connect 46 0 43 0; +#X connect 47 0 48 0; +#X connect 48 0 43 0; +#X connect 49 0 43 5; diff --git a/help/curve3d-help.pd b/help/curve3d-help.pd index 25307c6d5..192ef37bd 100644 --- a/help/curve3d-help.pd +++ b/help/curve3d-help.pd @@ -1,56 +1,19 @@ #N canvas 362 96 968 580 10; #X declare -lib Gem; #X text 145 42 Class: geometric object; -#X obj 13 64 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 13 212 cnv 15 450 220 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 13 64 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 13 212 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 17 214 Inlets:; -#X obj 13 173 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 13 173 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 22 172 Arguments:; #X text 32 229 Inlet 1: gemlist; #X text 14 401 Outlets:; #X text 28 413 Outlet 1: gemlist; #X text 146 24 Synopsis: [curve3d]; -#X obj 475 63 cnv 15 480 500 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 845 484 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 455 304 gemwin 0; -#X obj 132 182 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X obj 294 56 gemhead; -#X obj 294 76 world_light; -#X msg 207 155 lighting 1; -#X obj 207 134 loadbang; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 9 0; -#X connect 10 0 0 0; -#X connect 11 0 10 0; -#X restore 861 523 pd gemwin; -#X msg 861 504 create; -#X text 857 483 Create window:; -#X obj 796 74 cnv 15 150 150 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 796 234 cnv 15 150 150 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 486 74 cnv 15 300 310 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 475 63 cnv 15 480 500 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 796 74 cnv 15 150 150 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 796 234 cnv 15 150 150 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 486 74 cnv 15 300 310 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 519 175 draw line; #X msg 519 155 draw fill; #X msg 519 195 draw point; @@ -81,15 +44,14 @@ #X obj 490 344 s curve3d; #X text 660 139 of the curve; #X text 647 125 draw control point; -#X obj 486 398 cnv 15 300 150 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 486 398 cnv 15 300 150 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 494 407 gemhead; -#X floatatom 522 450 5 0 0 0 - - -; -#X floatatom 557 450 5 0 0 0 - - -; -#X floatatom 593 450 5 0 0 0 - - -; -#X floatatom 562 408 5 0 0 0 - - -; -#X floatatom 610 408 5 0 0 0 - - -; -#X floatatom 659 408 5 0 0 0 - - -; +#X floatatom 522 450 5 0 0 0 - - - 0; +#X floatatom 557 450 5 0 0 0 - - - 0; +#X floatatom 593 450 5 0 0 0 - - - 0; +#X floatatom 562 408 5 0 0 0 - - - 0; +#X floatatom 610 408 5 0 0 0 - - - 0; +#X floatatom 659 408 5 0 0 0 - - - 0; #X obj 494 471 rotateXYZ 0 0 0; #X obj 494 428 translateXYZ -2.5 -2.5 -2; #X obj 504 496 r curve3d; @@ -99,8 +61,7 @@ #X text 826 250 curve grid; #X text 28 389 Inlet 2: not used; #X text 32 243 Inlet 1: message: draw [line|fill|point|...]; -#X obj 13 443 cnv 15 450 120 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 13 443 cnv 15 450 120 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #N canvas 253 49 691 493 forme2 0; #N canvas 0 0 353 257 tripleRnd 0; #X obj 12 63 random 100; @@ -1107,10 +1068,8 @@ #X connect 51 0 24 0; #X connect 52 0 25 0; #X restore 136 509 pd forme2; -#X obj 136 490 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 57 490 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 136 490 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X obj 57 490 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 253 49 697 499 forme1 0; #X obj 76 418 outlet; #X obj 36 15 inlet; @@ -1570,9 +1529,9 @@ #X text 77 489 shape1; #X text 156 489 shape2; #X obj 57 469 loadbang; -#X floatatom 214 464 5 0 0 0 - - -; +#X floatatom 214 464 5 0 0 0 - - - 0; #X msg 214 506 set 3 2 \$1 \$2 \$3; -#X floatatom 247 464 5 0 0 0 - - -; +#X floatatom 247 464 5 0 0 0 - - - 0; #N canvas 0 0 173 130 pak 0; #X obj 73 39 t b f; #X obj 108 39 t b f; @@ -1590,72 +1549,74 @@ #X connect 5 0 0 0; #X connect 6 0 1 0; #X restore 214 484 pd pak f f f; -#X floatatom 281 464 5 0 0 0 - - -; +#X floatatom 281 464 5 0 0 0 - - - 0; #X obj 214 532 s examples_shape; #X obj 136 532 s curve3d; #X obj 57 532 s curve3d; #X text 13 68 Description: Renders a 3d bezier curve.; #X text 68 183 size of the control matrix (default : 2 2); #X obj 494 521 curve3d 5 5; -#X text 276 3 Create a 3D bezier curve \, using a matrix of control -points; +#X text 276 3 Create a 3D bezier curve \, using a matrix of control points; #X text 31 336 Inlet 1 : message: set Mx My X Y Z; #X text 31 296 Inlet 1: message: grid X Y; #X text 31 259 Inlet 1: message: res X Y; -#X text 53 272 This message is use for changing the size of the control -matrix (X \, Y are 2 int); -#X text 52 310 This message is use for changing the subdivision of -the displayed curve (X Y are 2 int); -#X text 53 349 This message can be use to set the position of a control -point. (Mx \, My : position of the point in the matrix. X \, Y \, Z -: position of this control point; +#X text 53 272 This message is use for changing the size of the control matrix (X \, Y are 2 int); +#X text 52 310 This message is use for changing the subdivision of the displayed curve (X Y are 2 int); +#X text 53 349 This message can be use to set the position of a control point. (Mx \, My : position of the point in the matrix. X \, Y \, Z : position of this control point; #X text 21 447 examples :; -#X text 29 87 The curve3d object renders a curve at the current position -with current color or texture. The shape of the curve is controlled -from a matrix. Note that control points are not necessarily part of -the curve.; -#X obj 848 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 18 0 45 0; -#X connect 19 0 45 0; -#X connect 20 0 45 0; -#X connect 21 0 45 0; -#X connect 22 0 45 0; -#X connect 23 0 45 0; -#X connect 24 0 45 0; -#X connect 25 0 45 0; -#X connect 26 0 45 0; -#X connect 27 0 42 0; -#X connect 28 0 42 0; -#X connect 29 0 42 0; -#X connect 30 0 42 0; -#X connect 31 0 42 0; -#X connect 32 0 43 0; -#X connect 33 0 44 0; -#X connect 34 0 43 0; -#X connect 35 0 44 0; -#X connect 36 0 44 0; -#X connect 37 0 43 0; -#X connect 38 0 43 0; -#X connect 39 0 44 0; -#X connect 49 0 57 0; -#X connect 50 0 56 1; -#X connect 51 0 56 2; -#X connect 52 0 56 3; -#X connect 53 0 57 1; -#X connect 54 0 57 2; -#X connect 55 0 57 3; -#X connect 56 0 83 0; -#X connect 57 0 56 0; -#X connect 58 0 83 0; -#X connect 66 0 79 0; -#X connect 67 0 66 0; -#X connect 68 0 69 0; -#X connect 69 0 80 0; -#X connect 72 0 68 0; -#X connect 73 0 76 0; -#X connect 74 0 78 0; -#X connect 75 0 76 1; -#X connect 76 0 74 0; -#X connect 77 0 76 2; +#X text 29 87 The curve3d object renders a curve at the current position with current color or texture. The shape of the curve is controlled from a matrix. Note that control points are not necessarily part of the curve.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a 3d bezier curve.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw res grid set; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 848 8 pd META; +#X obj 863 486 _gemwin \; 0 \; 0 \; lighting 1; +#X obj 871 416 gemhead; +#X obj 871 439 world_light; +#X connect 14 0 41 0; +#X connect 15 0 41 0; +#X connect 16 0 41 0; +#X connect 17 0 41 0; +#X connect 18 0 41 0; +#X connect 19 0 41 0; +#X connect 20 0 41 0; +#X connect 21 0 41 0; +#X connect 22 0 41 0; +#X connect 23 0 38 0; +#X connect 24 0 38 0; +#X connect 25 0 38 0; +#X connect 26 0 38 0; +#X connect 27 0 38 0; +#X connect 28 0 39 0; +#X connect 29 0 40 0; +#X connect 30 0 39 0; +#X connect 31 0 40 0; +#X connect 32 0 40 0; +#X connect 33 0 39 0; +#X connect 34 0 39 0; +#X connect 35 0 40 0; +#X connect 45 0 53 0; +#X connect 46 0 52 1; +#X connect 47 0 52 2; +#X connect 48 0 52 3; +#X connect 49 0 53 1; +#X connect 50 0 53 2; +#X connect 51 0 53 3; +#X connect 52 0 79 0; +#X connect 53 0 52 0; +#X connect 54 0 79 0; +#X connect 62 0 75 0; +#X connect 63 0 62 0; +#X connect 64 0 65 0; +#X connect 65 0 76 0; +#X connect 68 0 64 0; +#X connect 69 0 72 0; +#X connect 70 0 74 0; +#X connect 71 0 72 1; +#X connect 72 0 70 0; +#X connect 73 0 72 2; +#X connect 91 0 92 0; diff --git a/help/cylinder-help.pd b/help/cylinder-help.pd index 0628d331c..dc6187758 100644 --- a/help/cylinder-help.pd +++ b/help/cylinder-help.pd @@ -1,72 +1,50 @@ #N canvas 291 154 674 345 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 47 cnv 15 180 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 544 224 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 549 263 pd gemwin; -#X msg 549 244 create; -#X text 545 223 Create window:; +#X obj 479 47 cnv 15 180 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 29 Example:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 27 261 Inlet 2: float: size; #X text 452 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 287 Outlets:; #X text 21 300 Outlet 1: gemlist; -#X obj 546 130 cnv 15 100 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 546 130 cnv 15 100 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 485 65 draw line; #X msg 485 86 draw fill; #X msg 485 108 draw point; #X obj 553 54 gemhead; -#X floatatom 575 144 5 0 0 2 size - -; +#X floatatom 575 144 5 0 0 2 size - - 0; #X obj 553 79 rotateXYZ 90 0 0; -#X floatatom 598 172 3 0 0 2 segments - -; +#X floatatom 598 172 3 0 0 2 segments - - 0; #X text 27 272 Inlet 3: int: number of segments; #X text 33 14 Synopsis: [cylinder]; #X obj 553 189 cylinder; #X text 7 69 Description: Renders a cylinder.; -#X text 14 86 The cylinder object renders a cylinder at the current -position with current color. The look of the cylinder can be changed -with the draw message \, its size can be changed via the second inlet. -; +#X text 14 86 The cylinder object renders a cylinder at the current position with current color. The look of the cylinder can be changed with the draw message \, its size can be changed via the second inlet.; #X text 63 167 size of the cylinder \, segments; #X text 63 182 defaults: 1 \, 10; #X text 27 247 Inlet 1: message: draw [line|fill|point|default]; -#X obj 558 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 27 0; -#X connect 19 0 27 0; -#X connect 20 0 27 0; -#X connect 21 0 23 0; -#X connect 22 0 27 1; -#X connect 23 0 27 0; -#X connect 24 0 27 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a cylinder.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 int; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 558 8 pd META; +#X obj 561 241 _gemwin; +#X connect 14 0 23 0; +#X connect 15 0 23 0; +#X connect 16 0 23 0; +#X connect 17 0 19 0; +#X connect 18 0 23 1; +#X connect 19 0 23 0; +#X connect 20 0 23 2; diff --git a/help/depth-help.pd b/help/depth-help.pd index 38ddb56f5..b1272b132 100644 --- a/help/depth-help.pd +++ b/help/depth-help.pd @@ -1,87 +1,55 @@ #N canvas 15 61 724 431 10; #X declare -lib Gem; -#X obj 17 299 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 17 299 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 28 302 Inlets:; #X text 28 339 Outlets:; -#X obj 17 264 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 17 264 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 26 263 Arguments:; -#X obj 17 69 cnv 15 430 190 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 17 69 cnv 15 430 190 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 46 352 Outlet 1: gemlist; #X text 52 316 Inlet 1: gemlist; #X text 466 15 GEM object; -#X obj 459 77 cnv 15 250 300 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 459 77 cnv 15 250 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 463 60 Example:; -#X obj 604 313 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 16 419 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 268 112 destroy; -#X msg 132 112 create \, 1; -#X obj 264 174 gemhead; -#X obj 264 200 world_light; -#X obj 238 68 r \$0-gemwin; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 9 0; -#X connect 10 0 0 0; -#X restore 609 352 pd gemwin; -#X msg 609 333 create; -#X text 605 312 Create window:; -#X obj 460 106 cnv 15 240 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 460 106 cnv 15 240 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 461 84 gemhead 51; #X obj 461 172 depth; #X text 60 22 Synopsis: [depth]; #X text 81 41 Class: manips object; #X text 27 72 Description: Activate / Deactivate depth test; -#X text 26 93 [depth] turns on and off depth test (also known as Z-buffering). -This is very useful if you are in single-buffer mode \, because then -a painting effect can be achieved. In double-buffered mode \, you probably -do not want to turn off the depth test \, unless you have taken control -of the rendering order by setting the priority of each gemhead (see -the gemhead example for explanation).; -#X obj 496 114 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X text 26 189 By default \, this object will turn OFF depth buffering -for the objects "below".; +#X text 26 93 [depth] turns on and off depth test (also known as Z-buffering). This is very useful if you are in single-buffer mode \, because then a painting effect can be achieved. In double-buffered mode \, you probably do not want to turn off the depth test \, unless you have taken control of the rendering order by setting the priority of each gemhead (see the gemhead example for explanation).; +#X obj 496 114 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 26 189 By default \, this object will turn OFF depth buffering for the objects "below".; #X text 72 274 float (0/1) : depth test on/off; #X text 52 329 Inlet 1: float (0/1) : depth test on/off; #X obj 461 293 cube; #X obj 461 260 rotateXYZ 0 30 30; -#X floatatom 560 239 5 0 0 0 - - -; -#X floatatom 494 202 5 0 0 0 - - -; -#X floatatom 527 218 5 0 0 0 - - -; -#X obj 607 210 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X floatatom 560 239 5 0 0 0 - - - 0; +#X floatatom 494 202 5 0 0 0 - - - 0; +#X floatatom 527 218 5 0 0 0 - - - 0; +#X obj 607 210 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 607 229 lighting \$1; -#X obj 607 252 s \$0-gemwin; #X text 630 210 lighting; #X text 516 113 turn depth test on/off; -#X obj 608 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Activate / Deactivate depth test; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist float; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 608 8 pd META; +#X obj 607 326 _gemwin; +#X obj 622 274 gemhead; +#X obj 622 297 world_light; #X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 16 0 17 0; -#X connect 17 0 27 0; -#X connect 22 0 17 0; -#X connect 27 0 26 0; -#X connect 28 0 27 3; -#X connect 29 0 27 1; -#X connect 30 0 27 2; -#X connect 31 0 32 0; -#X connect 32 0 33 0; +#X connect 13 0 23 0; +#X connect 18 0 13 0; +#X connect 23 0 22 0; +#X connect 24 0 23 3; +#X connect 25 0 23 1; +#X connect 26 0 23 2; +#X connect 27 0 28 0; +#X connect 28 0 32 0; +#X connect 33 0 34 0; diff --git a/help/diffuse-help.pd b/help/diffuse-help.pd index cbaecb2e2..b8f68049e 100644 --- a/help/diffuse-help.pd +++ b/help/diffuse-help.pd @@ -1,46 +1,18 @@ -#N canvas 61 61 630 385 10; +#N canvas 61 61 636 395 10; #X declare -lib Gem; #X text 432 8 GEM object; -#X obj 8 196 cnv 15 430 180 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 34 198 Inlets:; #X text 58 211 Inlet 1: gemlist; #X text 34 252 Outlets:; #X text 52 265 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 193 cube; #X obj 500 192 gemhead; @@ -51,20 +23,26 @@ #X text 50 12 Synopsis: [diffuse]; #X text 29 77 Description: diffuse colouring; #X text 61 170 defaults: 0.8 0.8 0.8 1; -#X text 22 91 [diffuse] accepts a gemList and sets the diffuse-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; -#X floatatom 561 190 5 0 0 0 - - -; +#X text 22 91 [diffuse] accepts a gemList and sets the diffuse-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; +#X floatatom 561 190 5 0 0 0 - - - 0; #X obj 500 211 rotate 66 1 0 0; #X obj 451 156 diffuse 0 1 0; #X obj 451 355 diffuseRGB; #X text 448 332 see also:; -#X obj 508 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 30 0; -#X connect 19 0 29 0; -#X connect 22 0 30 1; -#X connect 28 0 29 1; -#X connect 29 0 20 0; -#X connect 30 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION diffuse colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 508 8 pd META; +#X obj 525 253 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 26 0; +#X connect 15 0 25 0; +#X connect 18 0 26 1; +#X connect 24 0 25 1; +#X connect 25 0 16 0; +#X connect 26 0 14 0; diff --git a/help/diffuseRGB-help.pd b/help/diffuseRGB-help.pd index 7f5a97deb..4d0e739f7 100644 --- a/help/diffuseRGB-help.pd +++ b/help/diffuseRGB-help.pd @@ -1,46 +1,18 @@ #N canvas 61 61 632 388 10; #X declare -lib Gem; #X text 432 8 GEM object; -#X obj 8 196 cnv 15 430 180 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 292 Outlets:; #X text 57 305 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 193 cube; #X obj 500 192 gemhead; @@ -50,28 +22,37 @@ #X text 63 244 Inlet 3: float: green value; #X text 63 259 Inlet 4: float: blue value; #X text 63 274 Inlet 5: float: alpha value; -#X floatatom 477 122 3 0 1 0 - - -; -#X floatatom 504 122 3 0 1 0 - - -; -#X floatatom 531 122 3 0 1 0 - - -; -#X floatatom 558 122 3 0 1 0 - - -; +#X floatatom 477 122 3 0 1 0 - - - 0; +#X floatatom 504 122 3 0 1 0 - - - 0; +#X floatatom 531 122 3 0 1 0 - - - 0; +#X floatatom 558 122 3 0 1 0 - - - 0; #X text 50 12 Synopsis: [diffuseRGB]; #X text 29 77 Description: diffuse colouring; -#X text 22 91 [diffuseRGB] accepts a gemList and sets the diffuse-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 22 91 [diffuseRGB] accepts a gemList and sets the diffuse-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X obj 451 156 diffuseRGB 0 1 0; #X text 60 171 defaults: 0.8 0.8 0.8 1; #X obj 500 211 rotate 63 1 0 0; #X text 447 331 see also:; #X obj 449 353 diffuse; -#X obj 508 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 33 0; -#X connect 19 0 35 0; -#X connect 26 0 33 1; -#X connect 27 0 33 2; -#X connect 28 0 33 3; -#X connect 29 0 33 4; -#X connect 33 0 18 0; -#X connect 35 0 20 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION diffuse colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 508 8 pd META; +#X obj 529 257 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 29 0; +#X connect 15 0 31 0; +#X connect 22 0 29 1; +#X connect 23 0 29 2; +#X connect 24 0 29 3; +#X connect 25 0 29 4; +#X connect 29 0 14 0; +#X connect 31 0 16 0; diff --git a/help/disk-help.pd b/help/disk-help.pd index 0219f1163..ad511ebc1 100644 --- a/help/disk-help.pd +++ b/help/disk-help.pd @@ -1,74 +1,52 @@ #N canvas 291 154 667 345 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 47 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 544 224 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 549 263 pd gemwin; -#X msg 549 244 create; -#X text 545 223 Create window:; +#X obj 479 47 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 29 Example:; -#X obj 7 65 cnv 15 450 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 166 cnv 15 450 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 166 cnv 15 450 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 165 Arguments:; #X text 452 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 307 Outlets:; #X text 21 320 Outlet 1: gemlist; -#X obj 481 81 cnv 15 165 140 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 481 81 cnv 15 165 140 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 485 95 draw line; #X msg 485 116 draw fill; #X msg 485 138 draw point; #X obj 553 54 gemhead; -#X floatatom 564 102 5 0 0 1 R - -; -#X floatatom 576 122 3 0 0 1 segments - -; -#X floatatom 589 147 5 0 0 1 r - -; +#X floatatom 564 102 5 0 0 1 R - - 0; +#X floatatom 576 122 3 0 0 1 segments - - 0; +#X floatatom 589 147 5 0 0 1 r - - 0; #X text 27 261 Inlet 2: float: size (= outer radius); #X text 33 14 Synopsis: [disk]; #X text 7 69 Description: Renders a disk.; -#X text 14 86 The disk object renders a flat disk with a hole in the -middle at the current position with current color. The look of the -disk can be changed with the draw message \, its size can be changed -via the second inlet \, the size of the hole via the third inlet.; +#X text 14 86 The disk object renders a flat disk with a hole in the middle at the current position with current color. The look of the disk can be changed with the draw message \, its size can be changed via the second inlet \, the size of the hole via the third inlet.; #X text 26 286 Inlet 4: float: inner radius (default:0); #X obj 553 199 disk 1; #X text 27 273 Inlet 3: int: number of segments (default:10); -#X text 28 177 disk size(=outer radius) \, segments \, hole size(=inner -radius); +#X text 28 177 disk size(=outer radius) \, segments \, hole size(=inner radius); #X text 29 191 defaults: 1 \, 10 \, 0; #X text 27 247 Inlet 1: message: draw [line|fill|point|default]; -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 17 0 29 0; -#X connect 18 0 29 0; -#X connect 19 0 29 0; -#X connect 20 0 29 0; -#X connect 21 0 29 1; -#X connect 22 0 29 2; -#X connect 23 0 29 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a disk.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 int; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 557 241 _gemwin; +#X connect 13 0 25 0; +#X connect 14 0 25 0; +#X connect 15 0 25 0; +#X connect 16 0 25 0; +#X connect 17 0 25 1; +#X connect 18 0 25 2; +#X connect 19 0 25 3; diff --git a/help/emission-help.pd b/help/emission-help.pd index c84f8daeb..de92fb47b 100644 --- a/help/emission-help.pd +++ b/help/emission-help.pd @@ -1,51 +1,18 @@ #N canvas 61 61 639 342 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 252 Outlets:; #X text 57 265 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 200 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 200 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 510 209 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X msg 277 206 lighting \$1; -#X obj 313 182 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 8 0; -#X restore 515 248 pd gemwin; -#X msg 515 229 create; -#X text 511 208 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 193 cube; #X text 62 156 a list of 3 (RGB) or 4 (RGBA) float-values.; @@ -55,14 +22,20 @@ #X text 50 12 Synopsis: [emission]; #X obj 451 156 emission 0 1 0; #X text 29 77 Description: emission colouring; -#X text 21 91 [emission] accepts a gemList and sets the emission-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 21 91 [emission] accepts a gemList and sets the emission-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X text 448 285 see also:; #X obj 450 308 emissionRGB; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 24 0; -#X connect 20 0 24 1; -#X connect 24 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION emission colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 527 206 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 20 0; +#X connect 16 0 20 1; +#X connect 20 0 14 0; diff --git a/help/emissionRGB-help.pd b/help/emissionRGB-help.pd index ee74e0eb3..a2aeb4358 100644 --- a/help/emissionRGB-help.pd +++ b/help/emissionRGB-help.pd @@ -1,46 +1,18 @@ #N canvas 61 61 639 342 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 63 211 Inlet 1: gemlist; #X text 39 292 Outlets:; #X text 57 305 Outlet 1: gemlist; -#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 200 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 200 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 509 208 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 514 247 pd gemwin; -#X msg 514 228 create; -#X text 510 207 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 193 cube; #X text 62 156 a list of 3 (RGB) or 4 (RGBA) float-values.; @@ -48,25 +20,34 @@ #X text 63 244 Inlet 3: float: green value; #X text 63 259 Inlet 4: float: blue value; #X text 63 274 Inlet 5: float: alpha value; -#X floatatom 479 122 3 0 1 0 - - -; -#X floatatom 508 122 3 0 1 0 - - -; -#X floatatom 536 122 3 0 1 0 - - -; -#X floatatom 565 122 3 0 1 0 - - -; +#X floatatom 479 122 3 0 1 0 - - - 0; +#X floatatom 508 122 3 0 1 0 - - - 0; +#X floatatom 536 122 3 0 1 0 - - - 0; +#X floatatom 565 122 3 0 1 0 - - - 0; #X obj 451 156 emissionRGB 0 1 0; #X text 60 171 defaults: 0 0 0 1; #X text 29 77 Description: emission colouring; #X text 50 12 Synopsis: [emissionRGB]; -#X text 22 91 [emissionRGB] accepts a gemList and sets the emission-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 22 91 [emissionRGB] accepts a gemList and sets the emission-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X text 449 284 see also:; #X obj 451 307 emission; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 28 0; -#X connect 24 0 28 1; -#X connect 25 0 28 2; -#X connect 26 0 28 3; -#X connect 27 0 28 4; -#X connect 28 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION emission colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 509 198 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 24 0; +#X connect 20 0 24 1; +#X connect 21 0 24 2; +#X connect 22 0 24 3; +#X connect 23 0 24 4; +#X connect 24 0 14 0; diff --git a/help/fragment_program-help.pd b/help/fragment_program-help.pd index a3a486121..14ba3c80b 100644 --- a/help/fragment_program-help.pd +++ b/help/fragment_program-help.pd @@ -1,52 +1,22 @@ #N canvas 35 199 651 458 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 335 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 335 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 334 Inlets:; #X text 10 386 Outlets:; -#X obj 8 296 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 296 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 295 Arguments:; -#X obj 7 76 cnv 15 430 210 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 444 77 cnv 15 200 230 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 444 77 cnv 15 200 230 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 474 334 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 479 373 pd gemwin; -#X msg 479 354 create; -#X text 475 333 Create window:; -#X obj 450 178 cnv 15 190 70 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 178 cnv 15 190 70 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 63 306 ; #X text 28 399 Outlet 1: gemlist; #X text 35 346 Inlet 1: gemlist; -#X obj 10 211 cnv 15 420 70 empty empty empty 20 12 0 14 -225280 -66577 -0; +#X obj 10 211 cnv 15 420 70 empty empty empty 20 12 0 14 #d8fcfc #404040 0; #X text 71 31 Class: shader object; -#X obj 516 184 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 516 184 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 75 103 openpanel; #X obj 75 173 outlet; @@ -59,30 +29,30 @@ #X connect 3 0 1 0; #X connect 4 0 0 0; #X restore 459 183 pd open; -#X text 14 219 IMPORTANT NOTE: your openGL-implementation (gfx-card -driver \, ...) has to support either (or both) the ARB shader extensions -or the NV shader extensions in order to make use of this object.; -#X text 10 176 Of course \, you also have to supply anything else needed -for the shader to work (like textures \, ...); +#X text 14 219 IMPORTANT NOTE: your openGL-implementation (gfx-card driver \, ...) has to support either (or both) the ARB shader extensions or the NV shader extensions in order to make use of this object.; +#X text 10 176 Of course \, you also have to supply anything else needed for the shader to work (like textures \, ...); #X obj 451 266 teapot; #X msg 459 203 open examples/data/random.fp; #X text 50 12 Synopsis: [fragment_program]; #X text 12 76 Description: load and apply an ARB fragment shader; -#X text 24 95 [fragment_program] loads and applies an ARB (or NV) fragment -shader.; -#X text 11 123 If you want to modify the parameters of the shader-program -\, you have to set the modification up yourself \, via [GEMglProgramEnvParameter*] -working on GL_FRAGMENT_PROGRAM_ARB.; -#X text 35 358 Inlet 1: message: open : fragment shader -program to load; +#X text 24 95 [fragment_program] loads and applies an ARB (or NV) fragment shader.; +#X text 11 123 If you want to modify the parameters of the shader-program \, you have to set the modification up yourself \, via [GEMglProgramEnvParameter*] working on GL_FRAGMENT_PROGRAM_ARB.; +#X text 35 358 Inlet 1: message: open : fragment shader program to load; #X text 443 406 see also; #X obj 508 406 vertex_program; #X obj 451 226 fragment_program random.fp; -#X obj 538 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 33 0; -#X connect 20 0 21 0; -#X connect 21 0 25 0; -#X connect 25 0 33 0; -#X connect 33 0 24 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load and apply an ARB fragment shader; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 85 INLET_0 gemlist open; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 547 330 _gemwin; +#X connect 10 0 29 0; +#X connect 16 0 17 0; +#X connect 17 0 21 0; +#X connect 21 0 29 0; +#X connect 29 0 20 0; diff --git a/help/gemcubeframebuffer-help.pd b/help/gemcubeframebuffer-help.pd index d324b4fa6..f81a11355 100644 --- a/help/gemcubeframebuffer-help.pd +++ b/help/gemcubeframebuffer-help.pd @@ -1,59 +1,13 @@ #N canvas 584 161 745 692 10; #X declare -lib Gem; -#X obj 482 415 cnv 15 90 40 empty empty empty 20 12 0 14 -257985 -66577 -0; -#X obj 175 337 cnv 15 90 60 empty empty empty 20 12 0 14 -257985 -66577 -0; -#X obj 174 147 cnv 15 180 25 empty empty pre 2 12 0 14 -4032 -1 0; -#X obj 174 257 cnv 15 180 25 empty empty post 2 12 0 14 -4032 -1 0 -; -#X obj 20 571 cnv 15 600 30 empty empty empty 20 12 0 14 -260097 -66577 -0; -#X obj 27 92 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 234 575 448 300 gemwin 0; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 271 113 destroy; -#X msg 146 71 set create; -#X obj 67 41 route create; -#X msg 311 80 lighting \$1; -#X obj 311 56 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X msg 198 32 dimen 1024 768; -#X msg 190 10 dimen 1280 1024; -#X msg 132 112 create \, 1 \, view 0 0 3; -#X obj 86 132 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 342 29 inlet; -#X obj 132 149 gemwin; -#X obj 3 11 loadbang; -#X obj 217 197 gemhead 80; -#X obj 217 224 world_light; -#X connect 1 0 5 0; -#X connect 2 0 0 0; -#X connect 3 0 13 0; -#X connect 4 0 0 0; -#X connect 5 0 2 0; -#X connect 5 0 10 0; -#X connect 5 1 4 0; -#X connect 5 1 3 0; -#X connect 6 0 13 0; -#X connect 7 0 6 0; -#X connect 8 0 13 0; -#X connect 9 0 13 0; -#X connect 10 0 13 0; -#X connect 11 0 13 0; -#X connect 12 0 13 0; -#X connect 14 0 4 0; -#X connect 15 0 16 0; -#X restore 32 131 pd gemwin; -#X msg 32 109 create; -#X obj 174 225 cnv 15 180 30 empty empty empty 20 12 0 14 -4034 -66577 -0; -#X obj 184 24 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 482 415 cnv 15 90 40 empty empty empty 20 12 0 14 #f8fc00 #404040 0; +#X obj 175 337 cnv 15 90 60 empty empty empty 20 12 0 14 #f8fc00 #404040 0; +#X obj 174 147 cnv 15 180 25 empty empty pre 2 12 0 14 #00f8fc #000000 0; +#X obj 174 257 cnv 15 180 25 empty empty post 2 12 0 14 #00f8fc #000000 0; +#X obj 20 571 cnv 15 600 30 empty empty empty 20 12 0 14 #fc8000 #404040 0; +#X obj 27 72 cnv 15 100 90 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 174 180 cnv 15 180 70 empty empty empty 20 12 0 14 #00fc04 #404040 0; +#X obj 184 24 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 184 68 alpha; #N canvas 974 317 450 481 draw_6_faces 0; #X msg 177 365 face \$1; @@ -115,10 +69,10 @@ #X obj 81 47 inlet num_face; #X obj 50 9 inlet head; #X obj 50 304 outlet head; -#X floatatom 163 186 5 0 0 0 - - -; -#X floatatom 89 245 5 0 0 0 - - -; -#X floatatom 148 250 5 0 0 0 - - -; -#X floatatom 57 253 5 0 0 0 - - -; +#X floatatom 163 186 5 0 0 0 - - - 0; +#X floatatom 89 245 5 0 0 0 - - - 0; +#X floatatom 148 250 5 0 0 0 - - - 0; +#X floatatom 57 253 5 0 0 0 - - - 0; #X obj 50 216 rotateXYZ 0 90 0; #X obj 50 280 rotateXYZ -90 0 90; #X connect 0 0 15 1; @@ -144,26 +98,20 @@ #X connect 15 0 16 0; #X connect 16 0 10 0; #X restore 211 263 pd rotate_scene; -#X obj 211 231 gemcubeframebuffer; -#X obj 225 177 loadbang; #X obj 184 107 t a a; #N canvas 620 313 360 553 shader 0; #X obj 72 166 glsl_vertex; #X obj 72 269 glsl_fragment; -#X obj 72 449 glsl_program; -#X obj 138 387 pack 0 0; -#X obj 156 357 t b f; -#X obj 156 300 change; -#X obj 138 191 change; -#X msg 138 409 link \$1 \$2; -#X floatatom 156 324 2 0 0 0 ID - -; -#X floatatom 138 214 2 0 0 0 ID - -; -#X obj 120 60 tgl 15 0 \$0-shadOn-snd \$0-shadOn-rcv on/off 17 7 0 -10 -262144 -1 -1 1 1; +#X obj 72 449 glsl_program \; alpha 1; +#X obj 147 387 pack 0 0; +#X msg 147 409 link \$1 \$2; +#X floatatom 147 324 2 0 0 0 ID - - 0; +#X floatatom 135 194 2 0 0 0 ID - - 0; +#X obj 120 60 tgl 15 0 \$0-shadOn-snd \$0-shadOn-rcv on/off 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 21 59 inlet gemlist; #X obj 21 489 outlet gemlist; #X msg 87 139 open \$1.vert; -#X msg 152 238 open \$1.frag; +#X msg 179 269 open \$1.frag; #X obj 120 14 loadbang; #X msg 120 36 1; #X obj 152 69 inlet loadShader; @@ -191,33 +139,38 @@ #X connect 9 1 7 0; #X restore 21 108 pd demux; #X obj 152 91 symbol; -#X obj 152 113 t s s; +#X obj 147 429 t a a; +#X obj 174 501 print -n; +#X obj 174 455 list prepend; +#X obj 174 478 list trim; +#X obj 152 113 t s s s; #X connect 0 0 1 0; #X connect 0 1 6 0; #X connect 1 0 2 0; #X connect 1 1 5 0; -#X connect 2 0 12 0; -#X connect 3 0 7 0; -#X connect 4 0 3 0; -#X connect 4 1 3 1; -#X connect 5 0 8 0; -#X connect 6 0 9 0; -#X connect 7 0 2 0; -#X connect 8 0 4 0; -#X connect 9 0 3 0; -#X connect 10 0 19 1; -#X connect 11 0 19 0; -#X connect 13 0 0 0; -#X connect 14 0 1 0; -#X connect 15 0 16 0; -#X connect 16 0 10 0; -#X connect 17 0 20 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 18 0; +#X connect 5 0 3 0; +#X connect 6 0 3 1; +#X connect 7 0 16 1; +#X connect 8 0 16 0; +#X connect 10 0 0 0; +#X connect 11 0 1 0; +#X connect 12 0 13 0; +#X connect 13 0 7 0; +#X connect 14 0 17 0; +#X connect 15 0 2 0; +#X connect 16 0 9 0; +#X connect 16 1 0 0; +#X connect 17 0 22 0; #X connect 18 0 2 0; -#X connect 19 0 12 0; -#X connect 19 1 0 0; +#X connect 18 1 20 0; #X connect 20 0 21 0; -#X connect 21 0 13 0; -#X connect 21 1 14 0; +#X connect 21 0 19 0; +#X connect 22 0 10 0; +#X connect 22 1 11 0; +#X connect 22 2 20 1; #X restore 184 369 pd shader; #X obj 184 343 pix_texture; #X obj 184 310 separator; @@ -230,8 +183,7 @@ #X obj 326 575 sphere 4 50; #X obj 223 530 == 1; #X obj 39 553 translateXYZ 0 0 -7; -#X obj 33 184 vradio 20 1 0 4 empty empty empty 0 -8 0 10 -257985 -1 --1 3; +#X obj 33 184 vradio 20 1 0 4 empty empty empty 0 -8 0 10 #f8fc00 #000000 #000000 0; #X text 55 185 scene; #X text 55 204 equirectangular; #X text 55 224 mapped to sphere; @@ -246,11 +198,9 @@ #X obj 211 288 s \$0-sceneHead; #X obj 39 575 s \$0-sceneHead; #X msg 92 51 lighting \$1; -#X obj 92 27 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X text 28 88 1:Create window; -#X obj 404 259 cnv 15 120 60 empty empty empty 20 12 0 14 -257985 -66577 -0; +#X obj 92 27 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 30 72 1:Create window; +#X obj 404 259 cnv 15 120 60 empty empty empty 20 12 0 14 #f8fc00 #404040 0; #N canvas 801 163 632 578 draw_scene 0; #X obj 243 285 rotateXYZ; #X obj 402 84 f; @@ -277,15 +227,14 @@ #X obj 390 386 + 1; #X obj 418 387 * -1; #X obj 418 414 + 1; -#X floatatom 320 341 5 0 0 0 - - -; +#X floatatom 320 341 5 0 0 0 - - - 0; #X obj 63 218 color 0.8 0.2 0.2; #X obj 243 218 color 0.2 0.8 0.2; #X obj 242 385 color 0.8 0.8 0.2; #X obj 62 385 color 0.2 0.2 0.8; #X obj 402 16 loadbang; -#X obj 402 40 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; -#X floatatom 156 320 5 0 0 0 - - -; +#X obj 402 40 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 156 320 5 0 0 0 - - - 0; #X obj 185 34 inlet; #X obj 185 88 rotateXYZ 0 0 0; #X obj 488 187 separator; @@ -355,10 +304,8 @@ #X restore 409 294 pd draw_scene; #X obj 409 265 r \$0-sceneHead; #X text 30 165 Show:; -#X obj 553 178 hsl 128 15 0 1 0 0 empty empty background_opacity -2 --8 0 10 -262144 -1 -1 0 1; -#X msg 550 199 color 0 0.1 0.2 \$1; -#X msg 225 199 dimen 512 512 \, format RGBA \, color 0 0.1 0.2 1; +#X obj 553 148 hsl 128 15 0 1 0 0 empty empty background_opacity -2 -8 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 550 169 color 0 0.1 0.2 \$1; #X text 14 630 Antoine Rousseau nov 2015; #X text 316 64 See:; #X text 467 64 for more messages.; @@ -368,23 +315,19 @@ #X obj 72 166 glsl_vertex; #X obj 72 269 glsl_fragment; #X obj 72 449 glsl_program; -#X obj 138 387 pack 0 0; -#X obj 156 357 t b f; -#X obj 156 300 change; -#X obj 138 191 change; -#X msg 138 409 link \$1 \$2; -#X floatatom 156 324 2 0 0 0 ID - -; -#X floatatom 138 214 2 0 0 0 ID - -; -#X obj 120 60 tgl 15 0 \$0-shadOn-snd \$0-shadOn-rcv on/off 17 7 0 -10 -262144 -1 -1 1 1; +#X obj 147 387 pack 0 0; +#X msg 147 409 link \$1 \$2; +#X floatatom 147 324 2 0 0 0 ID - - 0; +#X floatatom 135 194 2 0 0 0 ID - - 0; +#X obj 120 60 tgl 15 0 \$0-shadOn-snd \$0-shadOn-rcv on/off 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 21 59 inlet gemlist; #X obj 21 489 outlet gemlist; #X msg 87 139 open \$1.vert; -#X msg 152 238 open \$1.frag; +#X msg 179 238 open \$1.frag; #X obj 120 14 loadbang; #X msg 120 36 1; #X obj 152 69 inlet loadShader; -#X obj 229 408 inlet variables; +#X obj 238 408 inlet variables; #N canvas 85 80 450 300 demux 0; #X obj 52 33 inlet; #X obj 308 37 inlet select; @@ -408,33 +351,38 @@ #X connect 9 1 7 0; #X restore 21 108 pd demux; #X obj 152 91 symbol; -#X obj 152 113 t s s; +#X obj 174 501 print -n; +#X obj 174 455 list prepend; +#X obj 174 478 list trim; +#X obj 147 430 t a a; +#X obj 152 113 t s s s; #X connect 0 0 1 0; #X connect 0 1 6 0; #X connect 1 0 2 0; #X connect 1 1 5 0; -#X connect 2 0 12 0; -#X connect 3 0 7 0; -#X connect 4 0 3 0; -#X connect 4 1 3 1; -#X connect 5 0 8 0; -#X connect 6 0 9 0; -#X connect 7 0 2 0; -#X connect 8 0 4 0; -#X connect 9 0 3 0; -#X connect 10 0 19 1; -#X connect 11 0 19 0; -#X connect 13 0 0 0; -#X connect 14 0 1 0; -#X connect 15 0 16 0; -#X connect 16 0 10 0; -#X connect 17 0 20 0; -#X connect 18 0 2 0; -#X connect 19 0 12 0; -#X connect 19 1 0 0; -#X connect 20 0 21 0; -#X connect 21 0 13 0; -#X connect 21 1 14 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 21 0; +#X connect 5 0 3 0; +#X connect 6 0 3 1; +#X connect 7 0 16 1; +#X connect 8 0 16 0; +#X connect 10 0 0 0; +#X connect 11 0 1 0; +#X connect 12 0 13 0; +#X connect 13 0 7 0; +#X connect 14 0 17 0; +#X connect 15 0 2 0; +#X connect 16 0 9 0; +#X connect 16 1 0 0; +#X connect 17 0 22 0; +#X connect 19 0 20 0; +#X connect 20 0 18 0; +#X connect 21 0 2 0; +#X connect 21 1 19 0; +#X connect 22 0 10 0; +#X connect 22 1 11 0; +#X connect 22 2 19 1; #X restore 493 429 pd shader; #X obj 575 364 loadbang; #X obj 493 385 spigot; @@ -455,60 +403,61 @@ #X obj 184 46 gemhead; #X text 55 245 mapped to cube; #X obj 608 8 declare -lib Gem; -#X connect 6 0 7 0; -#X connect 7 0 6 0; -#X connect 9 0 74 0; -#X connect 10 0 15 0; -#X connect 11 0 13 0; -#X connect 11 1 12 1; -#X connect 12 0 40 0; +#X obj 34 90 _gemwin \; 0 \; 0 \; view 0 0 3; +#X obj 635 74 world_light; +#X obj 635 51 gemhead 80; +#X obj 211 186 gemcubeframebuffer \; dimen 512 512 \; format RGBA \; color 0 0.1 0.2 1; +#X connect 7 0 69 0; +#X connect 8 0 11 0; +#X connect 9 0 75 0; +#X connect 9 1 10 1; +#X connect 10 0 36 0; +#X connect 11 0 14 0; +#X connect 11 1 15 0; +#X connect 12 0 20 0; +#X connect 12 0 35 0; #X connect 13 0 12 0; -#X connect 13 1 17 1; -#X connect 14 0 51 0; -#X connect 15 0 18 0; -#X connect 15 1 19 0; -#X connect 16 0 24 0; -#X connect 16 0 39 0; -#X connect 17 0 16 0; -#X connect 17 0 59 0; -#X connect 18 0 17 0; -#X connect 18 0 37 0; -#X connect 19 0 11 0; -#X connect 20 0 56 0; -#X connect 23 0 25 0; -#X connect 24 0 21 0; -#X connect 26 0 24 1; -#X connect 27 0 41 0; -#X connect 28 0 33 0; -#X connect 32 0 26 0; -#X connect 34 0 38 0; -#X connect 35 0 36 0; -#X connect 36 0 37 1; -#X connect 37 0 27 0; -#X connect 38 0 39 1; -#X connect 39 0 23 0; -#X connect 42 0 6 1; +#X connect 13 0 54 0; +#X connect 14 0 13 0; +#X connect 14 0 33 0; +#X connect 15 0 9 0; +#X connect 16 0 51 0; +#X connect 19 0 21 0; +#X connect 20 0 17 0; +#X connect 22 0 20 1; +#X connect 23 0 37 0; +#X connect 24 0 29 0; +#X connect 28 0 22 0; +#X connect 30 0 34 0; +#X connect 31 0 32 0; +#X connect 32 0 33 1; +#X connect 33 0 23 0; +#X connect 34 0 35 1; +#X connect 35 0 19 0; +#X connect 38 0 72 0; +#X connect 39 0 38 0; #X connect 43 0 42 0; -#X connect 47 0 46 0; -#X connect 49 0 50 0; -#X connect 50 0 13 0; -#X connect 51 0 13 0; -#X connect 56 0 16 1; -#X connect 57 0 67 0; -#X connect 58 0 61 0; -#X connect 59 0 57 0; -#X connect 60 0 62 0; -#X connect 61 0 57 1; -#X connect 62 0 59 1; -#X connect 63 0 69 0; -#X connect 64 0 63 0; -#X connect 64 1 65 0; -#X connect 64 1 66 0; -#X connect 65 0 63 1; -#X connect 66 0 63 2; -#X connect 67 0 64 0; -#X connect 70 0 67 3; -#X connect 71 0 67 3; -#X connect 72 0 23 3; -#X connect 73 0 23 3; -#X connect 74 0 10 0; +#X connect 45 0 46 0; +#X connect 46 0 75 0; +#X connect 51 0 12 1; +#X connect 52 0 62 0; +#X connect 53 0 56 0; +#X connect 54 0 52 0; +#X connect 55 0 57 0; +#X connect 56 0 52 1; +#X connect 57 0 54 1; +#X connect 58 0 64 0; +#X connect 59 0 58 0; +#X connect 59 1 60 0; +#X connect 59 1 61 0; +#X connect 60 0 58 1; +#X connect 61 0 58 2; +#X connect 62 0 59 0; +#X connect 65 0 62 3; +#X connect 66 0 62 3; +#X connect 67 0 19 3; +#X connect 68 0 19 3; +#X connect 69 0 8 0; +#X connect 74 0 73 0; +#X connect 75 0 10 0; +#X connect 75 1 13 1; diff --git a/help/gemframebuffer-help.pd b/help/gemframebuffer-help.pd index e9c54a5aa..a6a3452f6 100644 --- a/help/gemframebuffer-help.pd +++ b/help/gemframebuffer-help.pd @@ -1,26 +1,26 @@ -#N canvas 125 98 896 632 10; +#N canvas 0 0 896 796 10; #X declare -lib Gem; -#X obj 465 39 cnv 15 420 570 empty empty empty 20 12 0 14 #dce4fc #404040 0; -#X obj 472 321 cnv 15 100 30 empty empty empty 20 12 0 14 #b8b8b8 #404040 0; -#X obj 474 48 cnv 15 400 250 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 465 39 cnv 15 420 750 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 464 cnv 15 100 30 empty empty empty 20 12 0 14 #b8b8b8 #404040 0; +#X obj 474 48 cnv 15 400 370 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 477 71 gemhead 20; -#X obj 664 336 gemhead; +#X obj 664 479 gemhead; #X msg 615 136 dimen 320 240; -#X obj 477 498 rotateXYZ; -#X floatatom 794 457 5 0 0 0 - - - 0; -#X msg 762 144 color 0 0 1 0; +#X obj 477 641 rotateXYZ; +#X floatatom 794 600 5 0 0 0 - - - 0; +#X msg 762 119 color 0 0 1 0; #X msg 602 117 dimen 1024 1024; -#X msg 751 104 color 0 0 0 0; -#X obj 477 452 t a b; -#X floatatom 717 499 5 0 0 0 - - - 0; +#X msg 751 79 color 0 0 0 0; +#X obj 477 595 t a b; +#X floatatom 717 642 5 0 0 0 - - - 0; #X msg 549 262 rectangle \$1; -#X obj 549 244 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 549 242 tgl 18 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 509 131 type FLOAT; -#X obj 664 304 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; -#X obj 477 412 translateXYZ 0 0 -4; -#X obj 477 328 gemframebuffer; -#X obj 664 361 pix_texture; -#X obj 664 388 t a b; +#X obj 664 459 tgl 18 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 477 555 translateXYZ 0 0 -4; +#X obj 477 471 gemframebuffer; +#X obj 664 504 pix_texture; +#X obj 664 531 t a b; #X msg 531 217 texunit \$1; #X msg 495 92 type BYTE; #X msg 503 112 type INT; @@ -28,10 +28,10 @@ #X msg 649 188 format RGB; #X msg 668 230 format RGBA; #X msg 680 250 format RGB32; -#X obj 664 517 square 2; -#X obj 664 479 rotateXYZ -40 0 200; -#X floatatom 707 459 5 0 0 0 - - - 0; -#X obj 477 517 pqtorusknots; +#X obj 664 660 square 2; +#X obj 664 622 rotateXYZ -40 0 200; +#X floatatom 707 602 5 0 0 0 - - - 0; +#X obj 477 661 pqtorusknots; #N canvas 0 50 450 300 rotation 0; #X obj 33 19 inlet; #X obj 33 110 % 360; @@ -61,7 +61,7 @@ #X connect 9 0 12 0; #X connect 11 0 5 0; #X connect 12 0 8 0; -#X restore 509 473 pd rotation; +#X restore 504 616 pd rotation; #X floatatom 531 197 5 0 0 0 - - - 0; #N canvas 125 50 450 300 rotation 0; #X obj 112 29 inlet; @@ -74,91 +74,98 @@ #X connect 1 0 3 0; #X connect 2 0 4 0; #X connect 4 0 1 0; -#X restore 794 432 pd rotation; -#X obj 762 123 loadbang; -#X obj 477 432 color 1 0 0; +#X restore 794 575 pd rotation; +#X obj 762 99 loadbang; +#X obj 477 575 color 1 0 0; #X obj 649 275 t a; #X obj 585 154 t a; #X obj 751 165 t a; #X obj 495 160 t a; -#X floatatom 563 391 5 0 0 0 - - - 0; -#X floatatom 607 392 5 0 0 0 - - - 0; -#X floatatom 520 391 5 0 0 0 - - - 0; +#X floatatom 563 534 5 0 0 0 - - - 0; +#X floatatom 607 535 5 0 0 0 - - - 0; +#X floatatom 520 534 5 0 0 0 - - - 0; #X obj 495 184 t a; -#X obj 470 544 cnv 15 410 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#X msg 757 574 color 0 0 0 0; -#X msg 746 552 color 0 1 1 0; -#X msg 637 555 lighting \$1; -#X obj 615 556 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X obj 67 40 route create destroy; -#X obj 20 217 gemhead 1; -#X obj 20 237 world_light; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 1 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 3 0; -#X connect 7 0 6 0; -#X connect 7 1 4 0; -#X connect 7 1 5 0; -#X connect 7 2 0 0; -#X connect 8 0 9 0; -#X restore 473 584 pd gemwin; -#X msg 473 559 create; -#X text 471 543 Create window:; -#X obj 637 582 t a; +#X obj 470 724 cnv 15 410 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X msg 706 752 color 0 0 0 0; +#X msg 706 732 color 0 1 1 0; +#X msg 597 735 lighting \$1; +#X obj 575 735 tgl 18 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 597 762 t a; #X text 476 52 Example:; #X text 699 10 GEM object; #X obj 7 71 cnv 15 450 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; -#X obj 7 238 cnv 15 450 370 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; -#X text 10 244 Inlets:; +#X obj 7 238 cnv 15 450 550 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 10 294 Inlets:; #X obj 7 205 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 14 204 Arguments:; -#X text 28 263 Inlet 1: gemlist; -#X text 15 553 Outlets:; -#X text 31 569 Outlet 1: gemlist; +#X text 30 313 Inlet 1: gemlist; +#X text 10 237 Outlets:; +#X text 30 253 Outlet 1: gemlist; #X text 60 217 ; #X text 102 29 Synopsis: [gemframebuffer]; #X text 122 45 Class: framebuffer object; #X text 12 80 Description: Renders a scene in a texture \, for later use.; #X text 12 98 this example renders a scene (pqtorusknots) into a framebuffer \, which is then used as a texture onto a square., f 72; #X text 13 128 you need framebuffer support (and its driver) on your gfx-card, f 72; -#X text 28 277 Inlet 1: message: type [BYTE | INT | FLOAT]; -#X text 27 345 Inlet 1: message: dimen ; -#X text 27 379 Inlet 1: message: color ; -#X text 26 460 Inlet 1: message: texunit ; -#X text 26 415 Inlet 1: message: rectangle [0|1]; -#X text 103 292 (type of the framebuffer data); -#X text 102 360 (dimension of the framebuffer texture); -#X text 106 495 (useful only with shader); -#X text 106 478 (change texunit of the texture); -#X text 104 432 (texturing mode \; rectangle (1) or normalized (0)); -#X text 100 326 (color format of the framebuffer); -#X text 102 395 (background color of the framebuffer); -#X obj 556 71 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; -#X floatatom 493 353 5 0 0 0 - - - 0; -#X obj 477 372 scaleXYZ; -#X floatatom 563 356 5 0 0 0 - - - 0; -#X floatatom 528 355 5 0 0 0 - - - 0; +#X text 30 327 Inlet 1: message: type [BYTE | INT | FLOAT]; +#X text 30 395 Inlet 1: message: dimen ; +#X text 30 429 Inlet 1: message: color ; +#X text 30 510 Inlet 1: message: texunit ; +#X text 30 465 Inlet 1: message: rectangle [0|1]; +#X text 103 342 (type of the framebuffer data); +#X text 102 410 (dimension of the framebuffer texture); +#X text 106 545 (useful only with shader); +#X text 106 528 (change texunit of the texture); +#X text 104 482 (texturing mode \; rectangle (1) or normalized (0)); +#X text 100 376 (color format of the framebuffer); +#X text 102 445 (background color of the framebuffer); +#X obj 546 71 tgl 18 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 493 496 5 0 0 0 - - - 0; +#X obj 477 515 scaleXYZ; +#X floatatom 563 499 5 0 0 0 - - - 0; +#X floatatom 528 498 5 0 0 0 - - - 0; #X msg 585 60 perspec -1 1 -1 1 1 20; #X msg 593 86 perspec -1 1 -1 1 3 75; -#X text 98 527 (frustum of the framebuffer); +#X text 98 577 (frustum of the framebuffer); #X text 752 59 default; #X text 11 153 NOTE: the default view-point of [gemframebuffer] is at the origin 0/0/0 \, unlike [gemwin] where it is at 0/0/4. You might want to manually insert a [translateXYZ 0 0 -4]., f 72; -#X text 31 587 Outlet 2: texture info : <0.>; -#X obj 778 8 declare -lib Gem; -#X text 22 512 Inlet 1: message: perspec , f 66; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a scene in a texture \, for later use.; +#X text 10 65 KEYWORDS Gem framebuffer; +#X text 20 85 INLET_0 gemlist type format dimen color rectangle texunit perspec; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 texture; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 778 8 pd META; +#X text 30 562 Inlet 1: message: perspec , f 66; #X msg 685 270 format RGBA32F; -#X text 27 310 Inlet 1: message: format [RGB|RGBA|RGB32|RGBA32F|YUV]; +#X text 30 360 Inlet 1: message: format [RGB|RGBA|RGB32|RGBA32F|YUV]; +#X obj 475 733 _gemwin; +#X obj 809 757 world_light; +#X obj 809 734 gemhead 1; +#X msg 672 322 quality \$1; +#X msg 685 362 repeat \$1; +#X obj 672 302 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 685 342 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 649 387 t a; +#X msg 790 366 clear \$1; +#X obj 790 346 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X text 30 595 Inlet 1: message: clear [0|1] (default : 1); +#X text 65 612 0 to disable the clearing of the color and depth buffer at every rendering; +#X text 30 640 Inlet 1: message: quality [0|1]; +#X text 76 656 GL_NEAREST (default) | GL_LINEAR; +#X text 73 671 (useful only with a direct access from a shader); +#X text 73 715 (useful only with a direct access from a shader); +#X text 30 684 Inlet 1: message: repeat [0|1]; +#X text 75 699 CLAMP_TO_EDGE (default) or REPEAT; +#X obj 506 361 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 506 381 verbose \$1; +#X text 30 734 Inlet 1: message: verbose [0|1]; +#X text 31 271 Outlet 2: texture info : , f 67; +#X text 75 749 verbose printout when rebuilding the framebuffer or not (default is non-verbose); +#X obj 495 328 t a; #X connect 3 0 18 0; #X connect 4 0 19 0; #X connect 5 0 38 0; @@ -170,17 +177,17 @@ #X connect 11 0 6 0; #X connect 11 1 32 0; #X connect 12 0 28 1; -#X connect 13 0 18 0; +#X connect 13 0 116 0; #X connect 14 0 13 0; #X connect 15 0 40 0; #X connect 16 0 4 0; #X connect 17 0 36 0; -#X connect 18 0 84 0; +#X connect 18 0 81 0; #X connect 18 1 19 1; #X connect 19 0 20 0; #X connect 20 0 29 0; #X connect 20 1 34 0; -#X connect 21 0 18 0; +#X connect 21 0 116 0; #X connect 22 0 40 0; #X connect 23 0 40 0; #X connect 24 0 37 0; @@ -196,26 +203,35 @@ #X connect 34 0 7 0; #X connect 35 0 8 0; #X connect 36 0 11 0; -#X connect 37 0 18 0; +#X connect 37 0 100 0; #X connect 38 0 44 0; #X connect 39 0 44 0; #X connect 40 0 44 0; #X connect 41 0 17 2; #X connect 42 0 17 3; #X connect 43 0 17 1; -#X connect 44 0 18 0; -#X connect 46 0 53 0; -#X connect 47 0 53 0; -#X connect 48 0 53 0; +#X connect 44 0 116 0; +#X connect 46 0 50 0; +#X connect 47 0 50 0; +#X connect 48 0 50 0; #X connect 49 0 48 0; -#X connect 50 0 51 0; -#X connect 51 0 50 0; -#X connect 53 0 50 0; -#X connect 82 0 3 0; -#X connect 83 0 84 1; -#X connect 84 0 17 0; -#X connect 85 0 84 3; -#X connect 86 0 84 2; -#X connect 87 0 38 0; -#X connect 88 0 38 0; -#X connect 95 0 37 0; +#X connect 50 0 93 0; +#X connect 79 0 3 0; +#X connect 80 0 81 1; +#X connect 81 0 17 0; +#X connect 82 0 81 3; +#X connect 83 0 81 2; +#X connect 84 0 38 0; +#X connect 85 0 38 0; +#X connect 91 0 37 0; +#X connect 95 0 94 0; +#X connect 96 0 100 0; +#X connect 97 0 100 0; +#X connect 98 0 96 0; +#X connect 99 0 97 0; +#X connect 100 0 18 0; +#X connect 101 0 100 0; +#X connect 102 0 101 0; +#X connect 111 0 112 0; +#X connect 112 0 18 0; +#X connect 116 0 18 0; diff --git a/help/gemhead-help.pd b/help/gemhead-help.pd index 46bf8abf7..3287828c8 100644 --- a/help/gemhead-help.pd +++ b/help/gemhead-help.pd @@ -1,80 +1,39 @@ #N canvas 30 89 960 649 10; #X declare -lib Gem; #X text 742 8 GEM object; -#X obj 8 438 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 438 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 18 440 Inlets:; #X text 18 558 Outlets:; #X text 36 571 Outlet 1: gemlist; -#X obj 8 393 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 393 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 398 Arguments:; -#X obj 8 76 cnv 15 430 310 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 430 310 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 50 12 Synopsis: [gemhead]; #X text 71 31 Class: control object; #X text 29 77 Description: start a rendering chain; -#X obj 607 371 cnv 15 140 65 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X msg 622 391 create; -#X text 618 370 Create window:; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 93 create \, 1 \, frame 2; -#X msg 198 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 622 411 pd gemwin (2fps); -#X text 21 91 [gemhead] connects the gem objects to the window manager. -The start of any gemList begins with the gemhead. Without the gemhead -\, gem objects will not receive the render command.; +#X text 21 91 [gemhead] connects the gem objects to the window manager. The start of any gemList begins with the gemhead. Without the gemhead \, gem objects will not receive the render command.; #X text 20 366 example: "1" before "50" before "-10" before "-23"; -#X text 22 149 Any gem object connected after the gemhead will receive -one render command per frame.; -#X text 20 294 The rendering-order value can also be negative. Negative -numbered [gemhead]s will be rendered AFTER all positive [gemhead]s. -Note \, that Higher values (-3) will be rendered BEFORE lower values -(-10). [gemhead]s with negative numbers will NOT be affected by view-point -changes !!!; +#X text 22 149 Any gem object connected after the gemhead will receive one render command per frame.; +#X text 20 294 The rendering-order value can also be negative. Negative numbered [gemhead]s will be rendered AFTER all positive [gemhead]s. Note \, that Higher values (-3) will be rendered BEFORE lower values (-10). [gemhead]s with negative numbers will NOT be affected by view-point changes !!!; #X text 62 409 float : priority (default : 50); #X text 42 471 Inlet 1: bang : force rendering now.; -#X text 42 453 Inlet 1: float (1/0): turn rendering on/off (default -1); -#X text 42 490 Inlet 1: set : change priority value of this -chain.; -#X obj 442 74 cnv 15 160 240 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X text 42 453 Inlet 1: float (1/0): turn rendering on/off (default 1); +#X text 42 490 Inlet 1: set : change priority value of this chain.; +#X obj 442 74 cnv 15 160 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 451 79 enable/disable rendering; -#X obj 451 123 cnv 15 100 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 451 123 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 470 240 gemList; #X obj 470 134 gemhead; #X msg 470 101 1; #X msg 506 101 0; #X obj 470 281 print ENABLE; #X obj 470 199 square 0.5; -#X obj 606 74 cnv 15 160 240 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 770 74 cnv 15 160 240 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 606 74 cnv 15 160 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 770 74 cnv 15 160 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 617 81 force rendering; #X text 789 79 set rendering order; -#X obj 621 128 cnv 15 100 40 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 781 135 cnv 15 100 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 621 128 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 781 135 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 630 101 bang; #X msg 791 101 set 45; #X obj 791 286 print SETTABLE; @@ -84,37 +43,37 @@ chain.; #X obj 630 202 circle 0.5; #X obj 791 204 triangle 0.5; #X obj 791 144 gemhead 105; -#X text 21 188 All chain will be rendered one after the other. You -can control precisely the rendering order by giving [gemhead] a priority -value (argument or message). The default value is 50 The lower the -value is \, the sooner the gemhead will receive the rendering command -(a value of 1 is the lowest possible value). This value is important -when you are doing alpha blending and for certain objects (such as -light).; +#X text 21 188 All chain will be rendered one after the other. You can control precisely the rendering order by giving [gemhead] a priority value (argument or message). The default value is 50 The lower the value is \, the sooner the gemhead will receive the rendering command (a value of 1 is the lowest possible value). This value is important when you are doing alpha blending and for certain objects (such as light).; #X obj 470 178 translateXYZ -2 0 0; #X msg 854 101 set 105; #X obj 630 181 translateXYZ 0 2 0; #X obj 630 138 gemhead 50; #X obj 791 183 translateXYZ 2 0 0; -#X text 42 520 Inlet 1: context : change rendering context (for -multiple windows).; -#X obj 818 8 declare -lib Gem; -#X connect 12 0 14 0; -#X connect 14 0 12 0; -#X connect 26 0 30 0; -#X connect 27 0 48 0; -#X connect 28 0 27 0; -#X connect 29 0 27 0; -#X connect 31 0 26 0; -#X connect 38 0 51 0; -#X connect 39 0 46 0; -#X connect 42 0 41 0; -#X connect 43 0 40 0; -#X connect 44 0 42 0; -#X connect 45 0 43 0; -#X connect 46 0 52 0; -#X connect 48 0 31 0; -#X connect 49 0 46 0; -#X connect 50 0 44 0; -#X connect 51 0 50 0; -#X connect 52 0 45 0; +#X text 42 520 Inlet 1: context : change rendering context (for multiple windows).; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION start a rendering chain; +#X text 10 65 KEYWORDS Gem control; +#X text 20 85 INLET_0 float bang set context; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 818 8 pd META; +#X obj 690 421 _gemwin 2; +#X connect 22 0 26 0; +#X connect 23 0 44 0; +#X connect 24 0 23 0; +#X connect 25 0 23 0; +#X connect 27 0 22 0; +#X connect 34 0 47 0; +#X connect 35 0 42 0; +#X connect 38 0 37 0; +#X connect 39 0 36 0; +#X connect 40 0 38 0; +#X connect 41 0 39 0; +#X connect 42 0 48 0; +#X connect 44 0 27 0; +#X connect 45 0 42 0; +#X connect 46 0 40 0; +#X connect 47 0 46 0; +#X connect 48 0 41 0; diff --git a/help/gemkeyboard-help.pd b/help/gemkeyboard-help.pd index 8c08cacc4..61248a150 100644 --- a/help/gemkeyboard-help.pd +++ b/help/gemkeyboard-help.pd @@ -1,64 +1,37 @@ #N canvas 64 61 679 445 10; #X declare -lib Gem; -#X obj 27 85 cnv 15 450 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 28 303 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 27 85 cnv 15 450 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 28 303 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 29 308 Inlets:; -#X obj 28 265 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 28 265 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 37 264 Arguments:; #X text 472 28 GEM object; #X text 29 337 Outlets:; #X text 485 69 Example:; #X text 74 50 Class: control object; -#X obj 486 84 cnv 15 170 180 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 495 101 cnv 15 150 80 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 546 194 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 551 233 pd gemwin; -#X msg 551 214 create; -#X text 547 193 Create window:; +#X obj 486 84 cnv 15 170 180 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 495 101 cnv 15 150 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 53 34 Synopsis: [gemkeyboard]; -#X text 27 89 Description: output keyboard events in the GEM window -; -#X text 36 106 [gemkeyboard] sends out keyboard events which occur -in the GEM window. Such event will appear on KEY_DOWN and will give -the KeyCode of the button.; -#X text 34 181 Furthermore \, i would like to make this object really -cross-platform one day. Thus the KeyCode might change on one system -or another in future times.; +#X text 27 89 Description: output keyboard events in the GEM window; +#X text 36 106 [gemkeyboard] sends out keyboard events which occur in the GEM window. Such event will appear on KEY_DOWN and will give the KeyCode of the button.; +#X text 34 181 Furthermore \, i would like to make this object really cross-platform one day. Thus the KeyCode might change on one system or another in future times.; #X text 34 228 USE AT YOUR OWN RISK !!!; -#X text 35 148 It is not guaranteed \, that Windows / Linux / OSX versions -will give the same KeyCode for the same key pressed !!!; +#X text 35 148 It is not guaranteed \, that Windows / Linux / OSX versions will give the same KeyCode for the same key pressed !!!; #X text 83 275 none; #X text 47 320 Inlet 1: non - used; #X text 41 350 Outlet 1: keyCode; #X obj 508 115 gemkeyboard; -#X floatatom 508 153 5 0 0 1 keyCode - -; +#X floatatom 508 153 5 0 0 1 keyCode - - 0; #X text 488 274 see also:; #X obj 489 299 gemkeyname; -#X obj 556 30 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 24 0 25 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION output keyboard events in the GEM window; +#X text 10 65 KEYWORDS Gem control; +#X text 20 85 INLET_0 non; +#X text 20 105 OUTLET_0 keyCode; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 556 30 pd META; +#X obj 548 201 _gemwin; +#X connect 20 0 21 0; diff --git a/help/gemkeyname-help.pd b/help/gemkeyname-help.pd index 44f2323c8..36785016f 100644 --- a/help/gemkeyname-help.pd +++ b/help/gemkeyname-help.pd @@ -1,70 +1,41 @@ #N canvas 64 61 679 445 10; #X declare -lib Gem; -#X obj 27 85 cnv 15 450 200 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 27 325 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 27 85 cnv 15 450 200 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 27 325 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 35 332 Inlets:; -#X obj 27 290 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 27 290 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 36 291 Arguments:; #X text 472 28 GEM object; #X text 35 361 Outlets:; #X text 495 69 Example:; #X text 74 50 Class: control object; -#X obj 486 84 cnv 15 170 180 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 495 101 cnv 15 150 80 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 546 194 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 551 233 pd gemwin; -#X msg 551 214 create; -#X text 547 193 Create window:; -#X text 38 89 Description: output keyboard events in the GEM window -; +#X obj 486 84 cnv 15 170 180 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 495 101 cnv 15 150 80 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X text 38 89 Description: output keyboard events in the GEM window; #X text 37 265 USE AT YOUR OWN RISK !!!; #X text 82 302 none; #X text 53 344 Inlet 1: non - used; #X text 488 274 see also:; #X text 53 34 Synopsis: [gemkeyname]; -#X text 36 108 [gemkeyname] sends out keyboard events which occur in -the GEM window. Such event will give a symbolic description of the -button. The "state"-outlet will be 1 for KEY_DOWN and 0 for KEY_UP. -; -#X text 37 219 Furthermore \, i would like to make this object really -cross-platform one day. Thus the KeyName might change on one system -or another in future times.; -#X text 37 161 It is not guaranteed \, that Windows / Linux / OSX versions -will give the same description for the same key pressed !!! Also \, -there is no guarantee \, that the Pd-object [keyname] will return the -same symbols as [gemkeyname]; +#X text 36 108 [gemkeyname] sends out keyboard events which occur in the GEM window. Such event will give a symbolic description of the button. The "state"-outlet will be 1 for KEY_DOWN and 0 for KEY_UP.; +#X text 37 219 Furthermore \, i would like to make this object really cross-platform one day. Thus the KeyName might change on one system or another in future times.; +#X text 37 161 It is not guaranteed \, that Windows / Linux / OSX versions will give the same description for the same key pressed !!! Also \, there is no guarantee \, that the Pd-object [keyname] will return the same symbols as [gemkeyname]; #X text 53 376 Outlet 1: state; #X text 53 390 Outlet 2: keyName; #X obj 489 299 gemkeyboard; -#X floatatom 508 160 2 0 0 1 state - -; -#X symbolatom 565 134 10 0 0 0 keyName - -; +#X floatatom 508 160 2 0 0 1 state - - 0; +#X symbolatom 565 134 10 0 0 0 keyName - - 0; #X obj 508 115 gemkeyname; -#X obj 558 28 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 29 0 27 0; -#X connect 29 1 28 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION output keyboard events in the GEM window; +#X text 10 65 KEYWORDS Gem control; +#X text 20 85 INLET_0 non; +#X text 20 105 OUTLET_0 state; +#X text 20 125 OUTLET_1 keyName; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 558 28 pd META; +#X obj 552 203 _gemwin; +#X connect 25 0 23 0; +#X connect 25 1 24 0; diff --git a/help/gemlist-help.pd b/help/gemlist-help.pd index b2b5a834d..43d7a9a30 100644 --- a/help/gemlist-help.pd +++ b/help/gemlist-help.pd @@ -1,12 +1,9 @@ #N canvas 443 181 661 405 10; #X declare -lib Gem; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 452 8 GEM object; #X text 27 233 Inlet 1: gemlist; @@ -19,35 +16,9 @@ #X text 27 247 Inlet 1: bang; #X text 27 261 Inlet 2: gemlist; #X text 7 69 Description: Store a gemlist; -#X text 16 86 The gemlist object stores a gemlist \, which may de output -by sending it a "bang" message.; -#X obj 467 47 cnv 15 170 340 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 475 81 cnv 15 150 130 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 528 320 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 533 359 pd gemwin; -#X msg 533 340 create; -#X text 529 319 Create window:; +#X text 16 86 The gemlist object stores a gemlist \, which may de output by sending it a "bang" message.; +#X obj 467 47 cnv 15 170 340 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 475 81 cnv 15 150 130 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 498 59 gemhead; #X obj 484 190 gemlist; #X obj 484 169 until; @@ -55,21 +26,29 @@ by sending it a "bang" message.; #X obj 484 243 translateXYZ 0.5 0 0; #X msg 484 149 30; #X obj 484 265 rotateXYZ 0 0 30; -#X obj 484 221 circle 0.3 33; #X obj 498 107 route gem_state; #X obj 498 127 route float; #X obj 498 86 t a a; -#X obj 538 8 declare -lib Gem; -#X connect 20 0 21 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Store a gemlist; +#X text 10 65 KEYWORDS Gem control; +#X text 20 85 INLET_0 gemlist bang; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 524 317 _gemwin; +#X obj 484 221 circle 0.3; +#X connect 19 0 28 0; +#X connect 20 0 31 0; #X connect 21 0 20 0; -#X connect 23 0 33 0; -#X connect 24 0 30 0; -#X connect 25 0 24 0; -#X connect 27 0 29 0; -#X connect 28 0 25 0; -#X connect 29 0 26 0; -#X connect 30 0 27 0; -#X connect 31 0 32 0; -#X connect 32 1 28 0; -#X connect 33 0 31 0; -#X connect 33 1 24 1; +#X connect 23 0 25 0; +#X connect 24 0 21 0; +#X connect 25 0 22 0; +#X connect 26 0 27 0; +#X connect 27 1 24 0; +#X connect 28 0 26 0; +#X connect 28 1 20 1; +#X connect 31 0 23 0; diff --git a/help/gemlist_info-help.pd b/help/gemlist_info-help.pd index 2cfcf2b0a..503608669 100644 --- a/help/gemlist_info-help.pd +++ b/help/gemlist_info-help.pd @@ -1,106 +1,73 @@ #N canvas 594 117 688 676 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 38 240 Outlets:; #X text 62 253 Outlet 1: gemlist; -#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 453 60 Example:; -#X obj 9 415 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 454 304 gemwin 0; -#X obj 132 160 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 133 destroy; -#X obj 288 57 world_light; -#X obj 288 28 gemhead; -#X msg 132 112 create \, 1 \, lighting 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 9 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 0 0; -#X restore 14 454 pd gemwin; -#X msg 14 435 create; -#X text 10 414 Create window:; #X text 50 12 Synopsis: [gemlist_info]; #X text 71 31 Class: information object; -#X text 29 77 Description: get current transformation of a gemlist -; -#X text 42 94 [gemlist_info] accepts a gemList decompost the transformation -matrix in basic transformation (translation \, scale \, shear \, rotation) -; +#X text 29 77 Description: get current transformation of a gemlist; +#X text 42 94 [gemlist_info] accepts a gemList decompost the transformation matrix in basic transformation (translation \, scale \, shear \, rotation); #X text 60 174 no argument; #X text 62 299 Outlet 5: 3 float list : translationX \, Y and Z; #X text 62 265 Outlet 2: 3 float list : RotationX \, Y and Z; #X text 62 277 Outlet 3: 3 float list : shear YX \, YZ and ZX; #X text 62 288 Outlet 4: 3 float list : scale X \, Y and Z; -#X obj 9 336 cnv 15 430 60 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 336 cnv 15 430 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #N canvas 0 0 452 890 more 0; #X obj 30 122 gemhead; -#X floatatom 44 144 5 0 0 0 - - -; -#X floatatom 78 144 5 0 0 0 - - -; -#X floatatom 112 144 5 0 0 0 - - -; -#X floatatom 46 184 5 0 0 0 - - -; -#X floatatom 80 184 5 0 0 0 - - -; -#X floatatom 114 184 5 0 0 0 - - -; -#X floatatom 52 227 5 0 0 0 - - -; -#X floatatom 86 227 5 0 0 0 - - -; -#X floatatom 120 227 5 0 0 0 - - -; +#X floatatom 44 144 5 0 0 0 - - - 0; +#X floatatom 78 144 5 0 0 0 - - - 0; +#X floatatom 112 144 5 0 0 0 - - - 0; +#X floatatom 46 184 5 0 0 0 - - - 0; +#X floatatom 80 184 5 0 0 0 - - - 0; +#X floatatom 114 184 5 0 0 0 - - - 0; +#X floatatom 52 227 5 0 0 0 - - - 0; +#X floatatom 86 227 5 0 0 0 - - - 0; +#X floatatom 120 227 5 0 0 0 - - - 0; #X obj 30 433 gemlist_info; #X obj 192 568 unpack f f f; #X obj 178 396 gemhead; #X obj 178 536 translateXYZ; -#X floatatom 192 591 5 0 0 0 - - -; -#X floatatom 225 591 5 0 0 0 - - -; -#X floatatom 259 591 5 0 0 0 - - -; -#X floatatom 193 761 5 0 0 0 - - -; -#X floatatom 226 761 5 0 0 0 - - -; -#X floatatom 260 761 5 0 0 0 - - -; -#X floatatom 200 516 5 0 0 0 - - -; -#X floatatom 233 516 5 0 0 0 - - -; -#X floatatom 267 516 5 0 0 0 - - -; +#X floatatom 192 591 5 0 0 0 - - - 0; +#X floatatom 225 591 5 0 0 0 - - - 0; +#X floatatom 259 591 5 0 0 0 - - - 0; +#X floatatom 193 761 5 0 0 0 - - - 0; +#X floatatom 226 761 5 0 0 0 - - - 0; +#X floatatom 260 761 5 0 0 0 - - - 0; +#X floatatom 200 516 5 0 0 0 - - - 0; +#X floatatom 233 516 5 0 0 0 - - - 0; +#X floatatom 267 516 5 0 0 0 - - - 0; #X obj 193 734 unpack f f f; #X obj 200 490 unpack f f f; #X obj 178 421 GEMglLoadIdentity; #X obj 178 450 color 1 0 0; -#X floatatom 46 336 5 0 0 0 - - -; -#X floatatom 80 336 5 0 0 0 - - -; -#X floatatom 114 336 5 0 0 0 - - -; -#X floatatom 52 379 5 0 0 0 - - -; -#X floatatom 86 379 5 0 0 0 - - -; -#X floatatom 120 379 5 0 0 0 - - -; +#X floatatom 46 336 5 0 0 0 - - - 0; +#X floatatom 80 336 5 0 0 0 - - - 0; +#X floatatom 114 336 5 0 0 0 - - - 0; +#X floatatom 52 379 5 0 0 0 - - - 0; +#X floatatom 86 379 5 0 0 0 - - - 0; +#X floatatom 120 379 5 0 0 0 - - - 0; #X obj 30 163 scaleXYZ 1 1 1; #X obj 30 205 rotateXYZ 0 0 0; #X obj 30 247 translateXYZ 0 0 0; #X obj 30 357 rotateXYZ 0 0 0; #X obj 30 399 translateXYZ 0 0 0; -#X floatatom 44 283 5 0 0 0 - - -; -#X floatatom 78 283 5 0 0 0 - - -; -#X floatatom 112 283 5 0 0 0 - - -; +#X floatatom 44 283 5 0 0 0 - - - 0; +#X floatatom 78 283 5 0 0 0 - - - 0; +#X floatatom 112 283 5 0 0 0 - - - 0; #X obj 30 302 scaleXYZ 1 1 1; #X obj 30 512 cube; #X obj 30 484 scaleXYZ 1 1 0.2; -#X floatatom 192 665 8 0 0 0 - - -; -#X floatatom 225 681 8 0 0 0 - - -; -#X floatatom 259 697 8 0 0 0 - - -; +#X floatatom 192 665 8 0 0 0 - - - 0; +#X floatatom 225 681 8 0 0 0 - - - 0; +#X floatatom 259 697 8 0 0 0 - - - 0; #X obj 192 643 unpack f f f; #N canvas 296 410 419 328 shear 0; #X obj 28 17 inlet; @@ -123,14 +90,12 @@ matrix in basic transformation (translation \, scale \, shear \, rotation) #X connect 10 0 1 0; #X restore 178 711 pd shear; #X obj 178 811 cube 0.5; -#X obj 178 80 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; +#X obj 178 80 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X obj 178 785 rotateXYZ; #X obj 178 610 scaleXYZ; #X obj 178 30 loadbang; #X msg 178 55 0; -#X text 50 844 this show the transformation needed to create a specific -transformation matrix decomposed with gemlist_info; +#X text 50 844 this show the transformation needed to create a specific transformation matrix decomposed with gemlist_info; #X connect 0 0 33 0; #X connect 1 0 33 1; #X connect 2 0 33 2; @@ -198,36 +163,34 @@ transformation matrix decomposed with gemlist_info; #X connect 53 0 54 0; #X connect 54 0 50 0; #X restore 15 349 pd more; -#X obj 449 77 cnv 15 200 570 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 459 310 cnv 15 180 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 449 77 cnv 15 200 570 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 459 310 cnv 15 180 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 472 89 gemhead; -#X floatatom 494 121 5 0 0 0 - - -; -#X floatatom 528 121 5 0 0 0 - - -; -#X floatatom 562 121 5 0 0 0 - - -; -#X floatatom 488 264 5 0 0 0 - - -; -#X floatatom 522 264 5 0 0 0 - - -; -#X floatatom 556 264 5 0 0 0 - - -; -#X floatatom 486 170 5 0 0 0 - - -; -#X floatatom 520 170 5 0 0 0 - - -; -#X floatatom 554 170 5 0 0 0 - - -; +#X floatatom 494 121 5 0 0 0 - - - 0; +#X floatatom 528 121 5 0 0 0 - - - 0; +#X floatatom 562 121 5 0 0 0 - - - 0; +#X floatatom 488 264 5 0 0 0 - - - 0; +#X floatatom 522 264 5 0 0 0 - - - 0; +#X floatatom 556 264 5 0 0 0 - - - 0; +#X floatatom 486 170 5 0 0 0 - - - 0; +#X floatatom 520 170 5 0 0 0 - - - 0; +#X floatatom 554 170 5 0 0 0 - - - 0; #X obj 472 320 gemlist_info; -#X obj 488 596 unpack f f f; -#X floatatom 488 619 5 0 0 0 - - -; -#X floatatom 521 619 5 0 0 0 - - -; -#X floatatom 555 619 5 0 0 0 - - -; -#X floatatom 522 470 5 0 0 0 - - -; -#X floatatom 555 470 5 0 0 0 - - -; -#X floatatom 589 470 5 0 0 0 - - -; -#X floatatom 539 394 5 0 0 0 - - -; -#X floatatom 572 394 5 0 0 0 - - -; -#X floatatom 606 394 5 0 0 0 - - -; -#X obj 522 444 unpack f f f; -#X obj 539 371 unpack f f f; -#X text 547 356 position; -#X text 533 428 size; -#X obj 505 520 unpack f f f; +#X obj 489 596 unpack f f f; +#X floatatom 489 619 5 0 0 0 - - - 0; +#X floatatom 522 619 5 0 0 0 - - - 0; +#X floatatom 556 619 5 0 0 0 - - - 0; +#X floatatom 523 470 5 0 0 0 - - - 0; +#X floatatom 556 470 5 0 0 0 - - - 0; +#X floatatom 590 470 5 0 0 0 - - - 0; +#X floatatom 541 394 5 0 0 0 - - - 0; +#X floatatom 574 394 5 0 0 0 - - - 0; +#X floatatom 608 394 5 0 0 0 - - - 0; +#X obj 523 444 unpack f f f; +#X obj 541 371 unpack f f f; +#X text 549 356 position; +#X text 534 428 size; +#X obj 506 520 unpack f f f; #N canvas 437 191 389 322 shear 0; #X obj 37 27 inlet; #X obj 37 280 outlet; @@ -251,50 +214,64 @@ transformation matrix decomposed with gemlist_info; #X obj 472 285 rotateXYZ; #X obj 472 189 scaleXYZ; #X obj 472 144 translateXYZ; -#X floatatom 486 216 5 0 0 0 - - -; -#X floatatom 520 216 5 0 0 0 - - -; -#X floatatom 554 216 5 0 0 0 - - -; -#X floatatom 505 545 5 0 0 0 - - -; -#X floatatom 538 545 5 0 0 0 - - -; -#X floatatom 572 545 5 0 0 0 - - -; -#X text 498 580 orientation; -#X text 514 504 shear (YX \, ZX \, ZY); +#X floatatom 486 216 5 0 0 0 - - - 0; +#X floatatom 520 216 5 0 0 0 - - - 0; +#X floatatom 554 216 5 0 0 0 - - - 0; +#X floatatom 506 545 5 0 0 0 - - - 0; +#X floatatom 539 545 5 0 0 0 - - - 0; +#X floatatom 573 545 5 0 0 0 - - - 0; +#X text 500 580 orientation; +#X text 515 504 shear (YX \, ZX \, ZY); #X text 76 349 <- more about gemlist_info; #X text 18 375 see also :; #X obj 100 375 gemlist_matrix; -#X obj 548 8 declare -lib Gem; -#X connect 11 0 12 0; -#X connect 12 0 11 0; -#X connect 27 0 56 0; -#X connect 28 0 56 1; -#X connect 29 0 56 2; -#X connect 30 0 56 3; -#X connect 31 0 54 1; -#X connect 32 0 54 2; -#X connect 33 0 54 3; -#X connect 34 0 55 1; -#X connect 35 0 55 2; -#X connect 36 0 55 3; -#X connect 37 1 38 0; -#X connect 37 2 52 0; -#X connect 37 3 48 0; -#X connect 37 4 49 0; -#X connect 38 0 39 0; -#X connect 38 1 40 0; -#X connect 38 2 41 0; -#X connect 48 0 42 0; -#X connect 48 1 43 0; -#X connect 48 2 44 0; -#X connect 49 0 45 0; -#X connect 49 1 46 0; -#X connect 49 2 47 0; -#X connect 52 0 60 0; -#X connect 52 1 61 0; -#X connect 52 2 62 0; -#X connect 53 0 54 0; -#X connect 54 0 37 0; -#X connect 55 0 53 0; -#X connect 56 0 55 0; -#X connect 57 0 53 1; -#X connect 58 0 53 2; -#X connect 59 0 53 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION get current transformation of a gemlist; +#X text 10 65 KEYWORDS Gem information; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 3; +#X text 20 145 OUTLET_2 3; +#X text 20 165 OUTLET_3 3; +#X text 20 185 OUTLET_4 3; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 222 422 gemhead; +#X obj 222 445 world_light; +#X obj 17 421 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 23 0 52 0; +#X connect 24 0 52 1; +#X connect 25 0 52 2; +#X connect 26 0 52 3; +#X connect 27 0 50 1; +#X connect 28 0 50 2; +#X connect 29 0 50 3; +#X connect 30 0 51 1; +#X connect 31 0 51 2; +#X connect 32 0 51 3; +#X connect 33 1 34 0; +#X connect 33 2 48 0; +#X connect 33 3 44 0; +#X connect 33 4 45 0; +#X connect 34 0 35 0; +#X connect 34 1 36 0; +#X connect 34 2 37 0; +#X connect 44 0 38 0; +#X connect 44 1 39 0; +#X connect 44 2 40 0; +#X connect 45 0 41 0; +#X connect 45 1 42 0; +#X connect 45 2 43 0; +#X connect 48 0 56 0; +#X connect 48 1 57 0; +#X connect 48 2 58 0; +#X connect 49 0 50 0; +#X connect 50 0 33 0; +#X connect 51 0 49 0; +#X connect 52 0 51 0; +#X connect 53 0 49 1; +#X connect 54 0 49 2; +#X connect 55 0 49 3; +#X connect 65 0 66 0; diff --git a/help/gemlist_matrix-help.pd b/help/gemlist_matrix-help.pd index 17bbe6381..6f2ac6a1a 100644 --- a/help/gemlist_matrix-help.pd +++ b/help/gemlist_matrix-help.pd @@ -1,62 +1,30 @@ #N canvas 594 117 675 520 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 38 240 Outlets:; #X text 62 253 Outlet 1: gemlist; -#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 453 60 Example:; -#X obj 9 385 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 454 304 gemwin 0; -#X obj 132 160 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 133 destroy; -#X obj 288 57 world_light; -#X obj 288 28 gemhead; -#X msg 132 112 create \, 1 \, lighting 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 9 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 0 0; -#X restore 14 424 pd gemwin; -#X msg 14 405 create; -#X text 10 384 Create window:; #X text 71 31 Class: information object; #X text 60 174 no argument; -#X obj 9 336 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X obj 449 77 cnv 15 200 400 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 459 310 cnv 15 180 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 9 336 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 449 77 cnv 15 200 400 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 459 310 cnv 15 180 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 472 89 gemhead; -#X floatatom 494 121 5 0 0 0 - - -; -#X floatatom 528 121 5 0 0 0 - - -; -#X floatatom 562 121 5 0 0 0 - - -; -#X floatatom 488 264 5 0 0 0 - - -; -#X floatatom 522 264 5 0 0 0 - - -; -#X floatatom 556 264 5 0 0 0 - - -; -#X floatatom 486 170 5 0 0 0 - - -; -#X floatatom 520 170 5 0 0 0 - - -; -#X floatatom 554 170 5 0 0 0 - - -; +#X floatatom 494 121 5 0 0 0 - - - 0; +#X floatatom 528 121 5 0 0 0 - - - 0; +#X floatatom 562 121 5 0 0 0 - - - 0; +#X floatatom 488 264 5 0 0 0 - - - 0; +#X floatatom 522 264 5 0 0 0 - - - 0; +#X floatatom 556 264 5 0 0 0 - - - 0; +#X floatatom 486 170 5 0 0 0 - - - 0; +#X floatatom 520 170 5 0 0 0 - - - 0; +#X floatatom 554 170 5 0 0 0 - - - 0; #N canvas 437 191 753 491 shear 0; #X obj 25 17 inlet; #X obj 28 270 outlet; @@ -80,43 +48,48 @@ #X obj 472 285 rotateXYZ; #X obj 472 189 scaleXYZ; #X obj 472 144 translateXYZ; -#X floatatom 486 216 5 0 0 0 - - -; -#X floatatom 520 216 5 0 0 0 - - -; -#X floatatom 554 216 5 0 0 0 - - -; +#X floatatom 486 216 5 0 0 0 - - - 0; +#X floatatom 520 216 5 0 0 0 - - - 0; +#X floatatom 554 216 5 0 0 0 - - - 0; #X obj 101 348 gemlist_info; #X obj 472 320 gemlist_matrix; #X text 14 351 see also :; -#X text 29 77 Description: get current transformation matrix of a gemlist -; -#X msg 496 378 \$1 \$2 \$3; -#X msg 503 398 \$5 \$6 \$7; -#X msg 510 419 \$9 \$10 \$11; -#X msg 517 440 \$13 \$14 \$15; +#X text 29 77 Description: get current transformation matrix of a gemlist; #X text 50 12 Synopsis: [gemlist_matrix]; -#X text 42 94 [gemlist_matrix] accepts a gemList and output the transformation -matrix.; +#X text 42 94 [gemlist_matrix] accepts a gemList and output the transformation matrix.; #X text 62 265 Outlet 2: transformation matrix (16 floats); -#X obj 538 8 declare -lib Gem; -#X connect 11 0 12 0; -#X connect 12 0 11 0; -#X connect 19 0 32 0; -#X connect 20 0 32 1; -#X connect 21 0 32 2; -#X connect 22 0 32 3; -#X connect 23 0 30 1; -#X connect 24 0 30 2; -#X connect 25 0 30 3; -#X connect 26 0 31 1; -#X connect 27 0 31 2; -#X connect 28 0 31 3; -#X connect 29 0 30 0; -#X connect 30 0 37 0; -#X connect 31 0 29 0; -#X connect 32 0 31 0; -#X connect 33 0 29 1; -#X connect 34 0 29 2; -#X connect 35 0 29 3; -#X connect 37 1 40 0; -#X connect 37 1 41 0; -#X connect 37 1 42 0; -#X connect 37 1 43 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION get current transformation matrix of a gemlist; +#X text 10 65 KEYWORDS Gem information; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 transformation; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 342 391 gemhead; +#X obj 342 414 world_light; +#X obj 22 383 _gemwin \; 0 \; 0 \; lighting 1; +#X msg 466 392 1 0 0 0 \; 0 0 0 0 \; 0 0 1 0 \; 0 0 -4 1 \;; +#X msg 466 343 set \, add \$1 \$2 \$3 \$4 \, add \$5 \$6 \$7 \$8 \, add \$9 \$10 \$11 \$12 \, add \$13 \$14 \$15 \$16, f 28; +#X connect 15 0 28 0; +#X connect 16 0 28 1; +#X connect 17 0 28 2; +#X connect 18 0 28 3; +#X connect 19 0 26 1; +#X connect 20 0 26 2; +#X connect 21 0 26 3; +#X connect 22 0 27 1; +#X connect 23 0 27 2; +#X connect 24 0 27 3; +#X connect 25 0 26 0; +#X connect 26 0 33 0; +#X connect 27 0 25 0; +#X connect 28 0 27 0; +#X connect 29 0 25 1; +#X connect 30 0 25 2; +#X connect 31 0 25 3; +#X connect 33 1 44 0; +#X connect 40 0 41 0; +#X connect 44 0 43 0; diff --git a/help/gemmanager-help.pd b/help/gemmanager-help.pd index 4934c5cdd..eb7b010d0 100644 --- a/help/gemmanager-help.pd +++ b/help/gemmanager-help.pd @@ -18,4 +18,10 @@ window-dimensions (important for a few objects like [ortho] or [pix_snap2tex]) #X text 15 195 This is object is probably of little use for the end-user (e.g.: you); #X obj 63 401 gemmanager; -#X obj 338 28 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION interact with the global GemState; +#X text 10 65 KEYWORDS Gem control; +#X text 10 85 AUTHOR IOhannes m zmölnig; +#X text 10 105 LICENSE GPL v2; +#X restore 338 28 pd META; diff --git a/help/gemmouse-help.pd b/help/gemmouse-help.pd index e604ef4dc..76def549f 100644 --- a/help/gemmouse-help.pd +++ b/help/gemmouse-help.pd @@ -1,53 +1,22 @@ #N canvas 179 61 929 414 10; #X declare -lib Gem; -#X obj 7 65 cnv 15 450 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 283 cnv 15 450 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 283 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 288 Inlets:; -#X obj 8 245 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 245 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 244 Arguments:; #X text 712 8 GEM object; #X text 9 317 Outlets:; #X text 475 29 Example:; #X text 54 30 Class: control object; -#X obj 466 64 cnv 15 170 180 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 466 284 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 471 323 pd gemwin; -#X msg 471 304 create; -#X text 467 283 Create window:; +#X obj 466 64 cnv 15 170 180 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 27 300 Inlet 1: non - used; #X text 468 364 see also:; #X text 33 14 Synopsis: [gemmouse]; #X text 7 69 Description: mouse events in the GEM window; -#X text 16 86 [gemmouse] sends out mouse events which occur in the -GEM window. The X and Y Position go from 0 to the size of the window -in pixels. The point (0 \, 0) is in the top left of the window.; -#X text 15 141 You can also set some normalization of the output coordinates -with arguments.; -#X text 15 170 The button outlets send a 1 when the specified button -is pressed and a 0 when it is released.; +#X text 16 86 [gemmouse] sends out mouse events which occur in the GEM window. The X and Y Position go from 0 to the size of the window in pixels. The point (0 \, 0) is in the top left of the window.; +#X text 15 141 You can also set some normalization of the output coordinates with arguments.; +#X text 15 170 The button outlets send a 1 when the specified button is pressed and a 0 when it is released.; #X text 63 255 [list : x-normalization y-normalization]; #X text 21 330 Outlet 1: x position; #X text 21 343 Outlet 2: y position; @@ -55,25 +24,23 @@ is pressed and a 0 when it is released.; #X text 21 368 Outlet 4: middle button state; #X text 21 381 Outlet 5: right button state; #X obj 466 385 gemkeyboard; -#X obj 478 82 cnv 15 100 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 478 82 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 491 93 gemmouse; -#X floatatom 491 218 9 0 0 1 X-position - -; -#X floatatom 502 196 8 0 0 1 Y-position - -; -#X floatatom 513 174 2 0 0 1 left-Button - -; -#X floatatom 524 153 2 0 0 1 middle-Button - -; -#X floatatom 536 129 2 0 0 1 right-Button - -; -#X obj 642 64 cnv 15 280 180 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 654 82 cnv 15 100 40 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X floatatom 657 135 9 0 0 1 X-position - -; -#X floatatom 674 113 8 0 0 1 Y-position - -; +#A saved init; +#X floatatom 491 218 9 0 0 1 X-position - - 0; +#X floatatom 502 196 8 0 0 1 Y-position - - 0; +#X floatatom 513 174 2 0 0 1 left-Button - - 0; +#X floatatom 524 153 2 0 0 1 middle-Button - - 0; +#X floatatom 536 129 2 0 0 1 right-Button - - 0; +#X obj 642 64 cnv 15 280 180 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 654 82 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X floatatom 657 135 9 0 0 1 X-position - - 0; +#X floatatom 674 113 8 0 0 1 Y-position - - 0; #X text 792 134 (normalized to 0..1); #X obj 657 89 gemmouse 1 1; +#A saved init; #X text 791 111 (normalized to 0..1); -#X obj 656 186 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 656 186 tgl 15 1 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 1 1; #N canvas 589 352 498 353 follow_mouse 0; #X obj 112 29 inlet; #X obj 168 74 * 8; @@ -102,16 +69,27 @@ is pressed and a 0 when it is released.; #X connect 12 0 13 0; #X connect 13 0 11 0; #X restore 656 209 pd follow_mouse; -#X obj 788 8 declare -lib Gem; -#X connect 11 0 12 0; -#X connect 12 0 11 0; -#X connect 29 0 30 0; -#X connect 29 1 31 0; -#X connect 29 2 32 0; -#X connect 29 3 33 0; -#X connect 29 4 34 0; -#X connect 37 0 43 1; -#X connect 38 0 43 2; -#X connect 40 0 37 0; -#X connect 40 1 38 0; -#X connect 42 0 43 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION mouse events in the GEM window; +#X text 10 65 KEYWORDS Gem control; +#X text 20 85 INLET_0 non; +#X text 20 105 OUTLET_0 x; +#X text 20 125 OUTLET_1 y; +#X text 20 145 OUTLET_2 left; +#X text 20 165 OUTLET_3 middle; +#X text 20 185 OUTLET_4 right; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 788 8 pd META; +#X obj 464 299 _gemwin; +#X connect 25 0 26 0; +#X connect 25 1 27 0; +#X connect 25 2 28 0; +#X connect 25 3 29 0; +#X connect 25 4 30 0; +#X connect 33 0 39 1; +#X connect 34 0 39 2; +#X connect 36 0 33 0; +#X connect 36 1 34 0; +#X connect 38 0 39 0; diff --git a/help/gemvertexbuffer-help.pd b/help/gemvertexbuffer-help.pd index 7037570ee..3b7f55034 100644 --- a/help/gemvertexbuffer-help.pd +++ b/help/gemvertexbuffer-help.pd @@ -1,4 +1,4 @@ -#N canvas 152 61 983 713 10; +#N canvas 505 74 983 713 10; #X declare -lib Gem; #N canvas 1 89 450 300 fps 0; #X obj 46 -61 gemhead; @@ -17,126 +17,59 @@ #X connect 4 0 3 0; #X connect 6 0 7 0; #X connect 7 0 5 0; -#X restore 466 149 pd fps; -#X floatatom 466 172 5 0 0 1 fps - -; -#X obj 6 76 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 7 236 cnv 15 450 375 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 7 181 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X restore 470 199 pd fps; +#X floatatom 470 222 5 0 0 1 fps - - 0; +#X obj 6 76 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 7 236 cnv 15 450 375 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 7 181 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 59 27 Class: geometric object; #X text 467 7 GEM object; #X text 61 7 Synopsis: [gemvertexbuffer]; -#X obj 462 76 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 5 76 450 300 gemwin 0; -#X obj 132 246 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 142 destroy; -#X msg 132 142 create \, 1; -#X obj 245 38 loadbang; -#X msg 272 82 reset \, frame 100; -#X obj 245 58 t b b; -#X obj 132 117 t b b; -#X msg 376 135 \; pd dsp 1; -#X obj 349 114 t b b; -#X obj 349 181 del 100; -#X obj 349 201 s \$0-init100; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 11 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 10 0; -#X connect 9 0 0 0; -#X connect 10 0 5 0; -#X connect 10 1 9 0; -#X connect 11 0 7 0; -#X connect 11 1 13 0; -#X connect 13 0 14 0; -#X connect 13 1 12 0; -#X connect 14 0 15 0; -#X restore 467 115 pd gemwin; -#X msg 467 96 create; -#X text 463 75 Create window:; +#X obj 462 76 cnv 15 100 80 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 465 75 Create window:; #X text 6 80 Description: Renders a vertexbuffer.; #X text 11 179 Arguments:; #X text 9 241 Inlets:; #X text 27 253 Inlet 1: gemlist; #X text 9 580 Outlets:; #X text 21 593 Outlet 1: gemlist; -#X obj 569 7 cnv 15 400 700 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 576 668 cnv 15 150 30 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 569 7 cnv 15 400 700 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 576 668 cnv 15 150 30 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 792 593 draw line; #X msg 802 614 draw points; #X msg 692 384 color_enable \$1; -#X obj 673 384 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 579 134 GEMglPointSize 1; +#X obj 673 384 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 816 638 loadbang; #X obj 579 76 translateXYZ 0 0 -2; #X obj 579 114 rotateXYZ -45 0 -50; #X obj 579 54 gemhead; #X text 594 254 update VBO using table value; -#X obj 643 366 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 643 366 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 665 364 position_enable \$1; -#X obj 729 424 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 699 406 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 729 424 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 699 406 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 721 404 texture_enable \$1; #X msg 748 424 normal_enable \$1; -#X obj 579 215 pix_image; #X obj 579 234 pix_texture; -#X obj 593 153 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#N canvas 1 51 450 300 openpanel 0; -#X obj 114 62 inlet; -#X obj 121 254 outlet; -#X obj 114 125 openpanel; -#X msg 114 162 set open \$1; -#X obj 114 199 t b a; -#X connect 0 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 4 0 1 0; -#X connect 4 1 1 0; -#X restore 593 170 pd openpanel; -#X msg 593 189; #X text 671 349 enable / disable specific VBO; -#X obj 579 32 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 579 32 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 577 14 Example:; #X msg 816 658 resize 128; -#X floatatom 636 96 5 0 0 0 - - -; +#X floatatom 636 96 5 0 0 0 - - - 0; #X obj 579 95 scale 3; #X msg 593 271 position blablax blablay blablaz; #X msg 604 290 color colorr colorg colorb colora; #X msg 614 310 texture colorr colorg; #X msg 627 331 normal colorr blablay blablaz; -#X obj 696 169 bng 15 250 50 0 empty \$0-init100 empty 17 7 0 10 -262144 --1 -1; -#X obj 841 56 cnv 15 120 160 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 696 169 bng 15 250 50 0 empty \$0-init100 empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 841 56 cnv 15 120 160 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #N canvas 615 145 657 666 lorenz 0; -#X floatatom 82 248 5 0 0 0 - - -; -#X floatatom 124 248 5 0 0 0 - - -; -#X floatatom 83 201 5 0 0 0 - - -; -#X floatatom 125 201 5 0 0 0 - - -; -#X floatatom 81 156 5 0 0 0 - - -; -#X floatatom 124 156 5 0 0 0 - - -; +#X floatatom 82 248 5 0 0 0 - - - 0; +#X floatatom 124 248 5 0 0 0 - - - 0; +#X floatatom 83 201 5 0 0 0 - - - 0; +#X floatatom 125 201 5 0 0 0 - - - 0; +#X floatatom 81 156 5 0 0 0 - - - 0; +#X floatatom 124 156 5 0 0 0 - - - 0; #N canvas 145 116 1131 666 table 0; #X obj 266 31 loadbang; #X msg 266 53 dsp 1; @@ -147,44 +80,37 @@ #X obj 88 160 abs~; #X obj 87 223 osc~ 11; #X obj 86 243 abs~; -#X obj 38 58 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 38 58 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 87 310 sig~ 0.7; #X obj 392 275 v pr; #X obj 523 276 v r; #X obj 449 277 v b; -#X floatatom 392 246 5 0 0 0 - - -; -#X floatatom 523 248 5 0 0 0 - - -; +#X floatatom 392 246 5 0 0 0 - - - 0; +#X floatatom 523 248 5 0 0 0 - - - 0; #X msg 393 221 10; #X obj 447 218 expr 8./3; #X msg 344 344 set 1.2 2.3 4.4; -#X floatatom 449 247 7 0 0 0 - - -; +#X floatatom 449 247 7 0 0 0 - - - 0; #X msg 321 308 stop; #X msg 291 275 start; -#X floatatom 615 248 5 0 0 0 - - -; +#X floatatom 615 248 5 0 0 0 - - - 0; #X obj 615 277 v dt; #X msg 526 220 18; #X msg 611 221 0.01; -#X obj 344 167 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; +#X obj 344 167 bng 15 250 50 0 empty empty empty 20 8 0 8 #fcfcfc #000000 #000000; #X text 679 250 <- experiment with these numbers; #X obj 705 223 line; #X obj 344 449 /~ 20; #X obj 450 446 /~ 20; #X obj 556 445 /~ 20; #X msg 706 198 0.01 \, 0.04 5000; -#X obj 344 393 fexpr~ $y1+(pr*$y2-pr*$y1)*dt \; $y2 +(-$y1*$y3 + r*$y1-$y2)*dt -\; $y3+($y1*$y2 - b*$y3)*dt; +#X obj 344 393 fexpr~ $y1+(pr*$y2-pr*$y1)*dt \; $y2 +(-$y1*$y3 + r*$y1-$y2)*dt \; $y3+($y1*$y2 - b*$y3)*dt; #X obj 276 164 loadbang; -#X text 329 108 This is an example of how fexpr~ could be used for -solving differential equations \, in this case the lorenz equations -which generate chaotic signals; +#X text 329 108 This is an example of how fexpr~ could be used for solving differential equations \, in this case the lorenz equations which generate chaotic signals; #X text 577 390 Note the following shorthands:; #X text 576 406 $y1 -> $y1[-1] \, $y2 -> $y2[-1] \, .....; -#X text 464 344 the 'set' commands sets the initial previous values -; -#X obj 639 442 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X text 464 344 the 'set' commands sets the initial previous values; +#X obj 639 442 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 673 437 loadbang; #X obj 572 473 sig~ -1; #X obj 673 467 metro 1000; @@ -251,38 +177,32 @@ which generate chaotic signals; #X obj 38 136 alpha; #X msg 118 577 draw line; #X msg 184 575 draw points; -#X floatatom 147 288 5 0 0 0 - - -; +#X floatatom 147 288 5 0 0 0 - - - 0; #X msg 82 449 color_enable \$1; -#X obj 82 430 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 82 430 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 38 222 scaleXYZ 3 3 3; #X obj 38 305 GEMglPointSize 1; #X obj 38 174 translateXYZ 0 0 -2; #X obj 38 267 rotateXYZ -45 0 -50; #X obj 38 114 gemhead; #X obj 56 346 gemhead 10; -#X obj 56 327 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 56 327 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 56 367 t b; #X obj 98 115 switch~; -#X obj 38 43 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; +#X obj 38 43 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 116 10 loadbang; #X obj 90 497 delay 1000; #X obj 90 475 sel 1; #X obj 38 13 inlet; -#X obj 218 469 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 218 469 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 218 444 loadbang; #X obj 38 614 gemvertexbuffer 100000; #X msg 116 32 0; #X obj 91 516 i \$0; -#X msg 90 538 colorR \$1colorr2 \, colorG \$1colorg2 \, colorB \$1colorb2 -\, colorA \$1colora2; +#X msg 90 538 colorR \$1colorr2 \, colorG \$1colorg2 \, colorB \$1colorb2 \, colorA \$1colora2; #X obj 38 69 t f f f f; #X obj 56 387 i \$0; -#X msg 56 407 posX \$1blablax2 \, posY \$1blablay2 \, posZ \$1blablaz2 -; +#X msg 56 407 posX \$1blablax2 \, posY \$1blablay2 \, posZ \$1blablaz2; #X connect 0 0 16 1; #X connect 1 0 16 2; #X connect 2 0 13 1; @@ -320,22 +240,20 @@ which generate chaotic signals; #X connect 34 0 35 0; #X connect 35 0 29 0; #X restore 849 100 pd lorenz; -#X obj 849 80 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 849 80 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #N canvas 285 255 805 628 wave 0; -#X floatatom 87 237 5 0 0 0 - - -; -#X floatatom 129 237 5 0 0 0 - - -; -#X floatatom 172 237 5 0 0 0 - - -; -#X floatatom 88 190 5 0 0 0 - - -; -#X floatatom 130 190 5 0 0 0 - - -; -#X floatatom 173 190 5 0 0 0 - - -; -#X floatatom 86 145 5 0 0 0 - - -; -#X floatatom 129 145 5 0 0 0 - - -; -#X floatatom 173 145 5 0 0 0 - - -; +#X floatatom 87 237 5 0 0 0 - - - 0; +#X floatatom 129 237 5 0 0 0 - - - 0; +#X floatatom 172 237 5 0 0 0 - - - 0; +#X floatatom 88 190 5 0 0 0 - - - 0; +#X floatatom 130 190 5 0 0 0 - - - 0; +#X floatatom 173 190 5 0 0 0 - - - 0; +#X floatatom 86 145 5 0 0 0 - - - 0; +#X floatatom 129 145 5 0 0 0 - - - 0; +#X floatatom 173 145 5 0 0 0 - - - 0; #X obj 43 592 gemvertexbuffer; #N canvas 145 161 1131 747 table 0; -#X obj 36 59 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 36 59 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 583 129 until; #X msg 583 110 100; #N canvas 0 50 450 300 count 0; @@ -354,8 +272,7 @@ which generate chaotic signals; #X connect 4 1 3 0; #X connect 5 0 1 1; #X restore 583 148 pd count; -#X obj 440 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 440 70 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 583 91 t b b; #X obj 583 264 until; #X msg 583 245 100; @@ -461,24 +378,20 @@ which generate chaotic signals; #X obj 341 72 t b b; #X obj 349 318 f; #X obj 440 380 +; -#X floatatom 903 395 5 0 0 0 - - -; -#X obj 583 71 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X floatatom 903 395 5 0 0 0 - - - 0; +#X obj 583 71 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 87 310 sig~ 0.3; #X obj 903 371 / 99; #X msg 903 347 1; #X obj 383 322 - 0.1; #X obj 440 354 * 7; #X obj 440 31 t b b b; -#X text 162 619 color and position are updated at every frame. you -just have to change array value....; -#X text 156 504 replace this with iem_tab_* stuff in order to increase -performance if you wish to update point positions at every frame; +#X text 162 619 color and position are updated at every frame. you just have to change array value....; +#X text 156 504 replace this with iem_tab_* stuff in order to increase performance if you wish to update point positions at every frame; #X obj 36 -2 inlet; #X obj 123 122 f; #X obj 279 120 f; -#X obj 438 6 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 438 6 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 123 56 sin; #X obj 123 78 + 1; #X obj 123 100 * 0.5; @@ -609,8 +522,7 @@ performance if you wish to update point positions at every frame; #X obj 106 549 loadbang; #X obj 43 163 translateXYZ 0 0 -2; #X obj 43 63 gemhead; -#X obj 61 306 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 61 306 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 61 346 t b; #X msg 106 572 resize 60000; #X msg 94 495 draw triangle; @@ -664,13 +576,11 @@ performance if you wish to update point positions at every frame; #X connect 33 0 34 0; #X connect 34 0 16 0; #X restore 849 184 pd wave; -#X obj 849 162 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 849 162 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #N canvas 786 231 654 435 oscillo~ 0; #X obj 47 78 gemhead; #X obj 122 116 adc~; -#X obj 218 63 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; +#X obj 218 63 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 218 41 loadbang; #X obj 47 5 inlet; #X obj 123 152 *~ 3; @@ -696,12 +606,12 @@ performance if you wish to update point positions at every frame; #X obj 118 231 table \$0phasor 8192; #X obj 79 306 i \$0; #X msg 79 342 posX \$1phasor \, posY \$1sound; -#X floatatom 155 34 5 0 0 0 - - -; +#X floatatom 155 34 5 0 0 0 - - - 0; #X obj 15 157 scale 1; -#X floatatom 52 115 5 0 0 0 - - -; +#X floatatom 52 115 5 0 0 0 - - - 0; #X msg 227 395 draw points; #X msg 298 73 8192; -#X floatatom 298 95 5 0 0 0 - - -; +#X floatatom 298 95 5 0 0 0 - - - 0; #X obj 298 234 /; #X obj 298 118 t f b f f; #X msg 414 154 resize \$1; @@ -752,31 +662,22 @@ performance if you wish to update point positions at every frame; #X connect 37 1 38 0; #X connect 37 2 39 0; #X restore 849 141 pd oscillo~; -#X obj 849 121 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 849 121 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 846 60 other examples; -#X text 27 327 Inlet 1: message: texture / textureU / textureV: update -vertex texcoords from tables; -#X text 27 357 Inlet 1: message: normal / normalX / normalY / normalZ: -update vertex normals from tables; -#X text 27 297 Inlet 1: message: color / colorR / colorG / colorB / -colorA: update vertex colors from tables; -#X text 27 267 Inlet 1: message: position / posX / posY / posZ: update -vertex positions from tables; +#X text 27 327 Inlet 1: message: texture / textureU / textureV: update vertex texcoords from tables; +#X text 27 357 Inlet 1: message: normal / normalX / normalY / normalZ: update vertex normals from tables; +#X text 27 297 Inlet 1: message: color / colorR / colorG / colorB / colorA: update vertex colors from tables; +#X text 27 267 Inlet 1: message: position / posX / posY / posZ: update vertex positions from tables; #N canvas 428 155 679 574 tabledata 0; #X text 65 43 applying table data as vertex data; #X msg 30 100 position tabX tabY tabZ 0; #X msg 30 130 position tabXYZ 0; -#X text 200 102 will read X \, Y & Z values from the 3 tables as position -data \, starting at offset=0 (offset can be omitted); -#X text 200 132 will read interleaved X \, Y & Z values from the table -tabXYZ \, starting at offset=0 (offset can be omitted); -#X text 200 172 will update only X values from given table (starting -at offset=10); +#X text 200 102 will read X \, Y & Z values from the 3 tables as position data \, starting at offset=0 (offset can be omitted); +#X text 200 132 will read interleaved X \, Y & Z values from the table tabXYZ \, starting at offset=0 (offset can be omitted); +#X text 200 172 will update only X values from given table (starting at offset=10); #X msg 31 169 posX tabX 10; #X msg 31 209 posY tabY; -#X text 200 212 will update only Y values from given table (starting -at default offset=0); +#X text 200 212 will update only Y values from given table (starting at default offset=0); #X text 39 290 the same applies to the other vertex data types:; #X msg 234 346 colorR r; #X msg 294 346 colorG g; @@ -798,15 +699,11 @@ at default offset=0); #X msg 234 316 positionX X; #X msg 314 316 positionY Y; #X msg 394 316 positionZ Z; -#X text 51 453 offset is always optional (default:0) \, and comes after -the table names; +#X text 51 453 offset is always optional (default:0) \, and comes after the table names; #X text 50 507 unset table data is initialized to 0.f; -#X restore 464 333 pd tabledata; -#X text 27 384 Inlet 1: message: resize float : change the number of -vertex to use; -#X text 23 98 Vertex position \, color etc can be copy from pd table -to the vertex buffer (VBO = Vertex Buffer Object). This object can -draw lot's of points very efficiently.; +#X restore 471 266 pd tabledata; +#X text 27 384 Inlet 1: message: resize float : change the number of vertex to use; +#X text 23 98 Vertex position \, color etc can be copy from pd table to the vertex buffer (VBO = Vertex Buffer Object). This object can draw lot's of points very efficiently.; #X obj 696 191 t b b b; #N canvas 990 92 450 459 load_tables 0; #X obj 31 71 noise~; @@ -856,78 +753,87 @@ draw lot's of points very efficiently.; #X obj 579 675 gemvertexbuffer; #X msg 728 569 draw_range \$1 \$2; #X obj 728 549 pack 0 0; -#X floatatom 728 507 5 0 0 0 - - -; -#X floatatom 774 507 5 0 0 0 - - -; +#X floatatom 728 507 5 0 0 0 - - - 0; +#X floatatom 774 507 5 0 0 0 - - - 0; #X obj 774 526 t b f; -#X text 27 452 Inlet 1: message: draw_range float float : set the range -for partial draw.; -#X text 726 480 set start and end indexes to draw only a range of VBO -, f 33; +#X text 27 452 Inlet 1: message: draw_range float float : set the range for partial draw.; +#X text 726 480 set start and end indexes to draw only a range of VBO, f 33; #X text 668 458 as soon as they are updated; -#X text 598 443 default : all VBO are disabled \, but they are enabled -; -#X floatatom 699 135 5 1 64 0 - - -; -#X floatatom 719 113 5 0 0 0 - - -; -#X text 27 479 Inlet 1: message: program float : set the id for glsl -program.; -#X text 27 409 Inlet 1: message: position_enable float \, color_enable -float \, texture_enable float \, normal_enable float \, attribute_enable -float : enable/disable the use of this data; -#X text 27 507 Inlet 1: message: attribute name table (offset) : add -attribute / update attribute from table; -#X text 27 537 Inlet 1: message: reset_attributes : clear attribute -data; -#X text 27 552 Inlet 1: message: print_attributes : print active attributes -; -#X text 14 646 see examples/10.glsl/16.vertexbuffer_attributes.pd on -how to; +#X text 598 443 default : all VBO are disabled \, but they are enabled; +#X floatatom 699 135 5 1 64 0 - - - 0; +#X floatatom 719 113 5 0 0 0 - - - 0; +#X text 27 479 Inlet 1: message: program float : set the id for glsl program.; +#X text 27 409 Inlet 1: message: position_enable float \, color_enable float \, texture_enable float \, normal_enable float \, attribute_enable float : enable/disable the use of this data; +#X text 27 507 Inlet 1: message: attribute name table (offset) : add attribute / update attribute from table; +#X text 27 537 Inlet 1: message: reset_attributes : clear attribute data; +#X text 27 552 Inlet 1: message: print_attributes : print active attributes; +#X text 14 646 see examples/10.glsl/16.vertexbuffer_attributes.pd on how to; #X text 15 661 use attribute tables with the vertex buffer.; -#X text 57 190 number of vertices to be used. if this is a power of -two (2^n) \, you might have some performance gain.; -#X obj 868 8 declare -lib Gem; +#X text 57 190 number of vertices to be used. if this is a power of two (2^n) \, you might have some performance gain.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a vertexbuffer.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist position color texture normal resize position_enable draw_range program attribute reset_attributes print_attributes; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 868 8 pd META; +#N canvas 735 418 450 300 startDSP 0; +#X obj 46 30 inlet; +#X obj 46 97 select 1; +#X obj 46 120 t b b; +#X obj 46 143 delay 100; +#X obj 46 166 s \$0-init100; +#X msg 137 166 \; pd dsp 1; #X connect 0 0 1 0; -#X connect 9 0 10 0; -#X connect 10 0 9 0; -#X connect 20 0 69 0; -#X connect 21 0 69 0; -#X connect 22 0 69 0; -#X connect 23 0 22 0; -#X connect 24 0 36 0; -#X connect 25 0 44 0; -#X connect 26 0 46 0; -#X connect 27 0 24 0; -#X connect 28 0 26 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 5 0; +#X connect 3 0 4 0; +#X restore 469 154 pd startDSP; +#X obj 469 96 _gemwin 100; +#X obj 579 195 pix_test \; noise 0; +#X obj 579 134 GEMglPointSize 10; +#X connect 0 0 1 0; +#X connect 18 0 62 0; +#X connect 19 0 62 0; +#X connect 20 0 62 0; +#X connect 21 0 20 0; +#X connect 22 0 37 0; +#X connect 23 0 39 0; +#X connect 24 0 86 0; +#X connect 25 0 23 0; +#X connect 27 0 28 0; +#X connect 28 0 62 0; +#X connect 29 0 32 0; #X connect 30 0 31 0; -#X connect 31 0 69 0; -#X connect 32 0 35 0; -#X connect 33 0 34 0; -#X connect 34 0 69 0; -#X connect 35 0 69 0; -#X connect 36 0 37 0; -#X connect 37 0 69 0; -#X connect 38 0 39 0; -#X connect 39 0 40 0; -#X connect 40 0 36 0; -#X connect 42 0 28 0; -#X connect 44 0 69 0; -#X connect 45 0 46 1; -#X connect 46 0 27 0; -#X connect 47 0 69 0; -#X connect 48 0 69 0; -#X connect 49 0 69 0; -#X connect 50 0 69 0; -#X connect 51 0 67 0; -#X connect 54 0 53 0; -#X connect 56 0 55 0; -#X connect 58 0 57 0; -#X connect 67 0 47 0; -#X connect 67 1 48 0; -#X connect 67 2 68 0; -#X connect 70 0 69 0; -#X connect 71 0 70 0; -#X connect 72 0 71 0; -#X connect 73 0 74 0; -#X connect 74 0 71 0; -#X connect 74 1 71 1; -#X connect 79 0 24 1; -#X connect 80 0 27 3; +#X connect 31 0 62 0; +#X connect 32 0 62 0; +#X connect 33 0 62 0; +#X connect 35 0 25 0; +#X connect 37 0 62 0; +#X connect 38 0 39 1; +#X connect 39 0 24 0; +#X connect 40 0 62 0; +#X connect 41 0 62 0; +#X connect 42 0 62 0; +#X connect 43 0 62 0; +#X connect 44 0 60 0; +#X connect 47 0 46 0; +#X connect 49 0 48 0; +#X connect 51 0 50 0; +#X connect 60 0 40 0; +#X connect 60 1 41 0; +#X connect 60 2 61 0; +#X connect 63 0 62 0; +#X connect 64 0 63 0; +#X connect 65 0 64 0; +#X connect 66 0 67 0; +#X connect 67 0 64 0; +#X connect 67 1 64 1; +#X connect 72 0 86 1; +#X connect 73 0 24 3; +#X connect 84 0 83 0; +#X connect 85 0 33 0; +#X connect 86 0 85 0; diff --git a/help/gemwin-help.pd b/help/gemwin-help.pd index ef20a6e4a..785375165 100644 --- a/help/gemwin-help.pd +++ b/help/gemwin-help.pd @@ -1,4 +1,4 @@ -#N canvas 126 111 676 689 10; +#N canvas 596 196 676 689 10; #X declare -lib Gem; #X text 452 8 GEM object; #X obj 7 193 cnv 15 430 480 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; @@ -129,69 +129,14 @@ #X connect 17 0 14 0; #X restore 30 367 pd more window properties; #X text 29 558 lighting 0|1 : turn lighting off/on (default:0); -#N canvas 190 228 580 527 more 0; +#N canvas 742 344 580 384 more 0; #X text 105 134 lighting 1/0 : turn lighting on/off; -#X text 263 186 ambient R G B : the ambient lighting color; -#X text 269 240 specular R G B : the specular lighting color; -#X text 197 277 shininess num : the shininess value; -#X text 132 326 fogmode 0/1/2/3 : set the fog mode (OFF/LINEAR/EXP/EXP^2); -#X text 298 447 fogcolor R G B : the color of the fog; -#X text 219 367 fog num : the fog density; +#X text 132 196 fogmode 0/1/2/3 : set the fog mode (OFF/LINEAR/EXP/EXP^2); +#X text 298 317 fogcolor R G B : the color of the fog; +#X text 219 237 fog num : the fog density; #X text 24 11 messages to the [gemwin] regarding lighting effects; #X obj 24 116 tgl 15 0 empty empty empty 0 -6 0 10 #fcfcfc #000000 #000000 0 1; #X msg 24 134 lighting \$1; -#N canvas 714 134 566 458 color 0; -#X obj 103 100 hsl 128 15 0 1 0 0 empty empty R 12 8 1 12 #fce0e0 #000000 #000000 0 1; -#X obj 236 100 hsl 128 15 0 1 0 0 empty empty G 12 8 1 12 #d8fcd8 #000000 #000000 0 1; -#X obj 370 100 hsl 128 15 0 1 0 0 empty empty B 12 8 1 12 #dce4fc #000000 #000000 0 1; -#X obj 100 329 outlet; -#X obj 132 253 list; -#X msg 132 273 set ambient \$1 \$2 \$3; -#X obj 233 144 t b f; -#X obj 367 144 t b f; -#X obj 100 201 pack 0 0 0; -#X obj 100 230 t b a; -#X connect 0 0 8 0; -#X connect 1 0 6 0; -#X connect 2 0 7 0; -#X connect 4 0 5 0; -#X connect 5 0 3 0; -#X connect 6 0 8 0; -#X connect 6 1 8 1; -#X connect 7 0 8 0; -#X connect 7 1 8 2; -#X connect 8 0 9 0; -#X connect 9 0 3 0; -#X connect 9 1 4 0; -#X coords 0 -1 1 1 400 13 1 100 100; -#X restore 35 165 pd color sliders; -#X msg 35 187 ambient 0 0 0; -#N canvas 714 134 566 366 color 0; -#X obj 103 100 hsl 128 15 0 1 0 0 empty empty R 12 8 1 12 #fce0e0 #000000 #000000 0 1; -#X obj 236 100 hsl 128 15 0 1 0 0 empty empty G 12 8 1 12 #d8fcd8 #000000 #000000 0 1; -#X obj 370 100 hsl 128 15 0 1 0 0 empty empty B 12 8 1 12 #dce4fc #000000 #000000 0 1; -#X obj 100 299 outlet; -#X obj 132 223 list; -#X msg 132 242 set specular \$1 \$2 \$3; -#X obj 233 124 t b f; -#X obj 367 124 t b f; -#X obj 100 171 pack 0 0 0; -#X obj 100 199 t b a; -#X connect 0 0 8 0; -#X connect 1 0 6 0; -#X connect 2 0 7 0; -#X connect 4 0 5 0; -#X connect 5 0 3 0; -#X connect 6 0 8 0; -#X connect 6 1 8 1; -#X connect 7 0 8 0; -#X connect 7 1 8 2; -#X connect 8 0 9 0; -#X connect 9 0 3 0; -#X connect 9 1 4 0; -#X coords 0 -1 1 1 400 13 1 100 100; -#X restore 42 219 pd color sliders; -#X msg 42 241 specular 0 0 0; #N canvas 710 134 570 462 color 0; #X obj 103 100 hsl 128 15 0 1 0 0 empty empty R 12 8 1 12 #fce0e0 #000000 #000000 0 1; #X obj 236 100 hsl 128 15 0 1 0 0 empty empty G 12 8 1 12 #d8fcd8 #000000 #000000 0 1; @@ -216,9 +161,9 @@ #X connect 9 0 3 0; #X connect 9 1 4 0; #X coords 0 -1 1 1 400 13 1 100 100; -#X restore 54 426 pd color sliders; -#X msg 54 448 fogcolor 0 0 0; -#X msg 59 338 fogmode 0; +#X restore 54 296 pd color sliders; +#X msg 54 318 fogcolor 0 0 0; +#X msg 59 208 fogmode 0; #N canvas 889 134 348 479 fog 0; #X obj 84 239 outlet; #X obj 100 101 hradio 15 1 0 4 empty empty empty 0 -6 0 10 #fcfcfc #000000 #000000 0; @@ -229,20 +174,8 @@ #X connect 3 0 0 0; #X connect 3 1 2 0; #X coords 0 -1 1 1 60 13 1 100 100; -#X restore 59 314 pd fog; -#X msg 50 288 shininess 0; -#N canvas 889 134 356 487 fog 0; -#X obj 84 239 outlet; -#X obj 84 140 trigger bang float; -#X msg 207 182 set shininess \$1; -#X obj 103 101 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 10 #fcfcfc #000000 #000000 0 1; -#X connect 1 0 0 0; -#X connect 1 1 2 0; -#X connect 2 0 0 0; -#X connect 3 0 1 0; -#X coords 0 -1 1 1 133 13 1 100 100; -#X restore 50 266 pd fog; -#X msg 60 388 fog 0; +#X restore 59 184 pd fog; +#X msg 60 258 fog 0; #N canvas 889 134 364 495 fog 0; #X obj 84 239 outlet; #X obj 84 140 trigger bang float; @@ -253,26 +186,20 @@ #X connect 2 0 1 0; #X connect 3 0 0 0; #X coords 0 -1 1 1 133 13 1 100 100; -#X restore 60 366 pd fog; +#X restore 60 236 pd fog; #X obj 24 68 gemhead; #X obj 24 90 world_light; -#X obj 24 475 s \$0-gemwin-in; +#X obj 24 345 s \$0-gemwin-in; #X text 23 34 Be careful: when you activate lighting \, you must have some lights to see something \, such as:; -#X connect 8 0 9 0; -#X connect 9 0 24 0; -#X connect 10 0 11 0; -#X connect 11 0 24 0; -#X connect 12 0 13 0; -#X connect 13 0 24 0; -#X connect 14 0 15 0; -#X connect 15 0 24 0; -#X connect 16 0 24 0; -#X connect 17 0 16 0; -#X connect 18 0 24 0; -#X connect 19 0 18 0; -#X connect 20 0 24 0; -#X connect 21 0 20 0; -#X connect 22 0 23 0; +#X connect 5 0 6 0; +#X connect 6 0 15 0; +#X connect 7 0 8 0; +#X connect 8 0 15 0; +#X connect 9 0 15 0; +#X connect 10 0 9 0; +#X connect 11 0 15 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; #X restore 30 575 pd more lighting; #X obj 490 242 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 29 635 stereo 0|1|2|3 : set 3D stereo-mode to off(0) \, 2-screen-mode(1) \, Red/Green-mode(2); @@ -710,7 +637,13 @@ #X text 30 177 2d argument : context name; #X text 443 457 see also examples/14.multiple_windows; #X msg 490 260 color \$1 \$1 \$1 \$1; -#X obj 558 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION access to the window manager; +#X text 10 65 KEYWORDS Gem window; +#X text 10 85 AUTHOR IOhannes m zmölnig; +#X text 10 105 LICENSE GPL v2; +#X restore 558 8 pd META; #X connect 11 0 10 0; #X connect 12 0 10 0; #X connect 21 0 10 0; diff --git a/help/glsl-help.pd b/help/glsl-help.pd new file mode 100644 index 000000000..ed0b3e7f0 --- /dev/null +++ b/help/glsl-help.pd @@ -0,0 +1,76 @@ +#N canvas 504 148 683 643 10; +#X declare -lib Gem; +#X text 452 8 GEM object; +#X obj 8 337 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 11 338 Inlets:; +#X text 10 504 Outlets:; +#X obj 8 302 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 17 302 Arguments:; +#X obj 7 56 cnv 15 430 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 230 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X text 453 60 Example:; +#X obj 450 108 cnv 15 220 160 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X text 63 313 ; +#X text 15 517 Outlet 1: gemlist, f 68; +#X text 21 352 Inlet 1: gemlist, f 67; +#X obj 11 576 cnv 15 420 50 empty empty empty 20 12 0 14 #d8fcfc #404040 0; +#X text 71 31 Class: shader object; +#X text 451 345 see also:; +#X obj 453 362 glsl_fragment; +#X obj 453 382 glsl_vertex; +#X text 13 56 Description: link GLSL-modules into a shader program, f 67; +#X text 15 580 IMPORTANT NOTE: your openGL-implementation (gfx-card driver \, ...) has to support the GLSL-standard (which is part of openGL-2.0) in order to make use of this object., f 68; +#X text 14 275 An ID of the generated program is sent to the 2nd outlet., f 69; +#X text 15 532 Outlet 2: : ID of the linked glsl_program, f 68; +#X floatatom 628 248 5 0 0 0 ID - - 0; +#X obj 451 86 gemhead; +#X msg 460 120 print; +#X text 21 367 Inlet 1: "print": print info about the GLSL-support in your openGL implementation and about the linked program, f 67; +#X obj 453 402 glsl_geometry; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION link GLSL-modules into a shader program, f 67; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 135 OUTLET_0 gemlist; +#X text 20 155 OUTLET_1 float; +#X text 10 175 AUTHOR IOhannes m zmölnig; +#X text 10 195 LICENSE GPL v2; +#X text 20 85 INLET_0 gemlist open symbol bang; +#X text 20 115 INLET_1 ; +#X restore 518 8 pd META; +#X obj 515 273 _gemwin; +#X text 50 12 Synopsis: [glsl]; +#X text 14 75 [glsl[ wraps the various GLSL compilers ([glsl_vertex] \, [glsl_fragment] \, [glsl_geometry]...) and the GLSL linker ([glsl_program]) into a single easy-to-use object., f 69; +#X text 14 118 It takes the basename of the shader file(s) \, and tries to guess some common extension for the various shader stages., f 69; +#X text 29 147 vertex shader: *.vert; +#X text 29 162 fragment shader: *.frag; +#X text 29 177 geometry shader: *.geom; +#X text 14 217 The files are searched for in the directory of the current patch (where [glsl] is invoked) \, and if they are not found there \, the Pd search path is used., f 69; +#X text 21 395 Inlet 1: "open ": basename of the shader files, f 67; +#X text 21 410 Inlet 1: "symbol": alias for "open", f 67; +#X text 21 439 Inlet 2: " ...": set the uniform variable of name uniformName to the (list of) uniformParms. this is only valid after successfully linking a program. the inlet is actually forwarded to [glsl_program], f 67; +#X obj 453 432 glsl_program; +#X obj 470 141 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 470 164 openpanel; +#X obj 470 184 file splitext; +#X msg 470 204 open \$1; +#X obj 451 291 teapot; +#X msg 558 208 shininess \$1; +#X floatatom 575 181 5 0 0 0 - - - 0; +#X text 21 425 Inlet 1: "bang": reload, f 67; +#X msg 505 120 bang; +#X text 189 177 (compute shader: *.comp); +#X text 189 162 (tesselation evaluation shader: *.tese); +#X text 189 147 (tesselation control shader: *.tesc); +#X obj 451 228 glsl glsl_test \; shininess 50; +#X connect 23 0 52 0; +#X connect 24 0 52 0; +#X connect 40 0 41 0; +#X connect 41 0 42 0; +#X connect 42 0 43 0; +#X connect 43 0 52 0; +#X connect 45 0 52 1; +#X connect 46 0 45 0; +#X connect 48 0 52 0; +#X connect 52 0 44 0; +#X connect 52 1 22 0; diff --git a/help/glsl_fragment-help.pd b/help/glsl_fragment-help.pd index c374e193d..738e1d5ab 100644 --- a/help/glsl_fragment-help.pd +++ b/help/glsl_fragment-help.pd @@ -1,73 +1,36 @@ #N canvas 90 61 633 413 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 257 cnv 15 430 140 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 257 cnv 15 430 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 258 Inlets:; #X text 10 348 Outlets:; -#X obj 8 222 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 222 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 222 Arguments:; -#X obj 7 66 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 451 77 cnv 15 170 170 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 66 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 451 77 cnv 15 170 170 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 456 108 cnv 15 160 130 empty empty empty 35 12 0 14 -24198 -66577 -0; +#X obj 456 108 cnv 15 160 130 empty empty empty 35 12 0 14 #14e814 #404040 0; #X text 14 361 Outlet 1: gemlist; #X text 21 272 Inlet 1: gemlist; -#X obj 10 153 cnv 15 420 50 empty empty empty 20 12 0 14 -225280 -66577 -0; +#X obj 10 153 cnv 15 420 50 empty empty empty 20 12 0 14 #d8fcfc #404040 0; #X text 71 31 Class: shader object; #X text 451 325 see also:; #X obj 453 362 glsl_vertex; -#X text 14 157 IMPORTANT NOTE: your openGL-implementation (gfx-card -driver \, ...) has to support the GLSL-standard (which is part of openGL-2.0) -in order to make use of this object.; -#X floatatom 545 216 0 0 0 0 ID - -; +#X text 14 157 IMPORTANT NOTE: your openGL-implementation (gfx-card driver \, ...) has to support the GLSL-standard (which is part of openGL-2.0) in order to make use of this object.; +#X floatatom 545 216 0 0 0 0 ID - - 0; #X obj 459 193 glsl_fragment; #X obj 453 342 glsl_program; #X text 50 12 Synopsis: [glsl_fragment]; #X text 13 66 Description: load a GLSL fragment shader; -#X text 14 85 [glsl_fragment] loads and compiles a GLSL fragment shader -into a module \, suitable for linking with [glsl_program]; -#X text 17 118 An ID of the generated module is sent to the 2nd outlet. -Use this ID in the "shader" message to [glsl_program]; -#X text 63 233 : filename to load as GLSL fragment shader -; -#X text 21 284 Inlet 1: "open ": filename to load as GLSL -fragment shader module.; -#X text 21 315 Inlet 1: "print": print info about the GLSL-support -in your openGL implementation; +#X text 14 85 [glsl_fragment] loads and compiles a GLSL fragment shader into a module \, suitable for linking with [glsl_program]; +#X text 17 118 An ID of the generated module is sent to the 2nd outlet. Use this ID in the "shader" message to [glsl_program]; +#X text 63 233 : filename to load as GLSL fragment shader; +#X text 21 284 Inlet 1: "open ": filename to load as GLSL fragment shader module.; +#X text 21 315 Inlet 1: "print": print info about the GLSL-support in your openGL implementation; #X text 14 376 Outlet 2: : ID of the GLSL-module; #X obj 459 86 gemhead; #X msg 552 170 print; -#X obj 521 261 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 526 300 pd gemwin; -#X msg 526 281 create; -#X text 522 260 Create window:; -#X obj 527 117 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 527 117 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 open 0; #X obj 312 45 openpanel; #X obj 311 157 outlet; @@ -82,12 +45,20 @@ in your openGL implementation; #X restore 470 116 pd open; #X msg 470 136 open Toon.frag; #X obj 453 382 glsl_geometry; -#X obj 518 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load a GLSL fragment shader; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 85 INLET_0 gemlist open print; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 float; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 533 252 _gemwin; #X connect 18 1 17 0; #X connect 28 0 18 0; #X connect 29 0 18 0; +#X connect 30 0 31 0; #X connect 31 0 32 0; -#X connect 32 0 31 0; -#X connect 34 0 35 0; -#X connect 35 0 36 0; -#X connect 36 0 18 0; +#X connect 32 0 18 0; diff --git a/help/glsl_geometry-help.pd b/help/glsl_geometry-help.pd index 4b4b36796..4a2f76460 100644 --- a/help/glsl_geometry-help.pd +++ b/help/glsl_geometry-help.pd @@ -1,70 +1,35 @@ #N canvas 40 61 638 426 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 257 cnv 15 430 140 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 257 cnv 15 430 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 258 Inlets:; #X text 10 348 Outlets:; -#X obj 8 222 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 222 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 222 Arguments:; -#X obj 7 66 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 451 77 cnv 15 170 170 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 66 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 451 77 cnv 15 170 170 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 456 108 cnv 15 160 130 empty empty empty 35 12 0 14 -24198 -66577 -0; +#X obj 456 108 cnv 15 160 130 empty empty empty 35 12 0 14 #14e814 #404040 0; #X text 14 361 Outlet 1: gemlist; #X text 21 272 Inlet 1: gemlist; -#X obj 10 153 cnv 15 420 50 empty empty empty 20 12 0 14 -225280 -66577 -0; +#X obj 10 153 cnv 15 420 50 empty empty empty 20 12 0 14 #d8fcfc #404040 0; #X text 71 31 Class: shader object; #X text 451 325 see also:; -#X floatatom 546 219 0 0 0 0 ID - -; +#X floatatom 546 219 0 0 0 0 ID - - 0; #X obj 460 196 glsl_geometry; #X obj 453 342 glsl_program; #X text 50 12 Synopsis: [glsl_geometry]; #X text 13 66 Description: load a GLSL geometry shader; -#X text 14 85 [glsl_geometry] loads and compiles a GLSL geometry shader -into a module \, suitable for linking with [glsl_program]; -#X text 17 118 An ID of the generated module is sent to the 2nd outlet. -Use this ID in the "shader" message to [glsl_program]; -#X text 63 233 : filename to load as GLSL geometry shader -; -#X text 21 284 Inlet 1: "open ": filename to load as GLSL -geometry shader module.; -#X text 21 315 Inlet 1: "print": print info about the GLSL-support -in your openGL implementation; +#X text 14 85 [glsl_geometry] loads and compiles a GLSL geometry shader into a module \, suitable for linking with [glsl_program]; +#X text 17 118 An ID of the generated module is sent to the 2nd outlet. Use this ID in the "shader" message to [glsl_program]; +#X text 63 233 : filename to load as GLSL geometry shader; +#X text 21 284 Inlet 1: "open ": filename to load as GLSL geometry shader module.; +#X text 21 315 Inlet 1: "print": print info about the GLSL-support in your openGL implementation; #X text 14 376 Outlet 2: : ID of the GLSL-module; #X obj 460 86 gemhead; #X msg 521 174 print; -#X obj 521 261 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 526 300 pd gemwin; -#X msg 526 281 create; -#X text 522 260 Create window:; #X obj 453 363 glsl_fragment; -#X obj 530 120 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 530 120 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 open 0; #X obj 312 45 openpanel; #X obj 312 157 outlet; @@ -79,15 +44,21 @@ in your openGL implementation; #X restore 473 119 pd open; #X obj 453 383 glsl_geometry; #X msg 473 141 open Toon.geom; -#X text 14 157 IMPORTANT NOTE: your openGL-implementation (gfx-card -driver \, ...) has to support the GLSL-standard (which is part of openGL-2.1) -in order to make use of this object.; -#X obj 518 8 declare -lib Gem; +#X text 14 157 IMPORTANT NOTE: your openGL-implementation (gfx-card driver \, ...) has to support the GLSL-standard (which is part of openGL-2.1) in order to make use of this object.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load a GLSL geometry shader; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 85 INLET_0 gemlist open print; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 float; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 533 262 _gemwin; #X connect 16 1 15 0; #X connect 26 0 16 0; #X connect 27 0 16 0; #X connect 29 0 30 0; -#X connect 30 0 29 0; -#X connect 33 0 34 0; -#X connect 34 0 36 0; -#X connect 36 0 16 0; +#X connect 30 0 32 0; +#X connect 32 0 16 0; diff --git a/help/glsl_program-help.pd b/help/glsl_program-help.pd index afaeff970..3176e1465 100644 --- a/help/glsl_program-help.pd +++ b/help/glsl_program-help.pd @@ -37,28 +37,6 @@ #X obj 451 86 gemhead; #X msg 460 120 print; #X msg 518 141 link 1 3; -#X obj 513 257 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 518 296 pd gemwin; -#X msg 518 277 create; -#X text 514 256 Create window:; #X text 21 367 Inlet 1: "print": print info about the GLSL-support in your openGL implementation and about the linked program, f 67; #N canvas 74 576 496 338 geometry 1; #X obj 28 27 cnv 15 430 280 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; @@ -70,7 +48,16 @@ #X text 31 262 Inlet 1: "geometry_outvertices <#vertices>": number of vertices to be created (default: MAX_OUTPUT_VERTICES), f 70; #X restore 29 553 pd geometry shaders; #X obj 453 402 glsl_geometry; -#X obj 518 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION link GLSL-modules into a shader program, f 67; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 85 INLET_0 geometry_intype geometry_outtype geometry_type geometry_outvertices gemlist print shader link keepuniforms; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 float; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; #X msg 476 175 keepuniforms 0; #X text 21 520 Inlet 1: "keepuniforms 1|0" enable(DEFAULT) or disable the caching of uniform variables across reload, f 67; #X text 14 229 Uniform variables survive linking a new program (if the new program has a compatible uniform of the same name). To clear the cached variables on linking \, set "keepuniforms" to "0"., f 69; @@ -100,6 +87,7 @@ #X connect 10 0 9 0; #X connect 12 0 2 0; #X restore 84 201 pd uniform variables; +#X obj 523 272 _gemwin; #X connect 16 0 17 0; #X connect 16 1 31 0; #X connect 32 0 16 0; @@ -107,6 +95,4 @@ #X connect 34 0 16 0; #X connect 35 0 16 0; #X connect 36 0 16 0; -#X connect 38 0 39 0; -#X connect 39 0 38 0; -#X connect 45 0 16 0; +#X connect 41 0 16 0; diff --git a/help/glsl_test.frag b/help/glsl_test.frag new file mode 100644 index 000000000..27a31ef66 --- /dev/null +++ b/help/glsl_test.frag @@ -0,0 +1,38 @@ +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +// from vertex shader +varying vec3 Normal; +varying vec3 Position; + +// light description +const vec4 LightPosition = vec4(5.,3.,1.,1.); // Light position in eye coords. +const vec3 LightLa = vec3(1.,1.,1.); // Ambient light intensity +const vec3 LightL = vec3(1.,1.,1.); // Diffuse and specular light intensity + +// material definition +const vec3 MaterialKa = vec3(.1, .1, .5); // Ambient reflectivity +const vec3 MaterialKd = vec3(.8, .1, .1); // Diffuse reflectivity +const vec3 MaterialKs = vec3(.1, .3, .1); // Specular reflectivity +uniform float shininess; // Specular shininess factor + +// The lighting model +vec3 blinnPhong( vec3 position, vec3 n) { + vec3 ambient = LightLa * MaterialKa; + vec3 s = normalize( LightPosition.xyz - position ); + float sDotN = max( dot(s,n), 0.0 ); + vec3 diffuse = MaterialKd * sDotN; + vec3 spec = vec3(0.0); + if( sDotN > 0.0 ) { + vec3 v = normalize(-position.xyz); + vec3 h = normalize( v + s ); + spec = MaterialKs * pow( max( dot(h,n), 0.0 ), shininess ); + } + return ambient + LightL * (diffuse + spec); +} + +void main (void) +{ + gl_FragColor = vec4(blinnPhong(Position, normalize(Normal)), 1.0); + //gl_FragColor = vec4(blinnPhong(Position, Normal), 1.0); +} diff --git a/help/glsl_test.vert b/help/glsl_test.vert new file mode 100644 index 000000000..80ad2e8ce --- /dev/null +++ b/help/glsl_test.vert @@ -0,0 +1,12 @@ +// Cyrille Henry 2024 +// based on "OpenGL 4 Shading Language Cookbook" by David Wolff + +varying vec3 Normal; +varying vec3 Position; + +void main() +{ + Normal = normalize(gl_NormalMatrix * gl_Normal.xyz); + Position = ( gl_ModelViewMatrix * vec4(gl_Vertex.xyz,1.0) ).xyz; + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; +} diff --git a/help/glsl_vertex-help.pd b/help/glsl_vertex-help.pd index cf444dd58..4a21a5d8d 100644 --- a/help/glsl_vertex-help.pd +++ b/help/glsl_vertex-help.pd @@ -1,72 +1,36 @@ #N canvas 40 61 633 413 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 257 cnv 15 430 140 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 257 cnv 15 430 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 258 Inlets:; #X text 10 348 Outlets:; -#X obj 8 222 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 222 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 222 Arguments:; -#X obj 7 66 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 451 77 cnv 15 170 170 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 66 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 451 77 cnv 15 170 170 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 456 108 cnv 15 160 130 empty empty empty 35 12 0 14 -24198 -66577 -0; +#X obj 456 108 cnv 15 160 130 empty empty empty 35 12 0 14 #14e814 #404040 0; #X text 14 361 Outlet 1: gemlist; #X text 21 272 Inlet 1: gemlist; -#X obj 10 153 cnv 15 420 50 empty empty empty 20 12 0 14 -225280 -66577 -0; +#X obj 10 153 cnv 15 420 50 empty empty empty 20 12 0 14 #d8fcfc #404040 0; #X text 71 31 Class: shader object; #X text 451 325 see also:; -#X text 14 157 IMPORTANT NOTE: your openGL-implementation (gfx-card -driver \, ...) has to support the GLSL-standard (which is part of openGL-2.0) -in order to make use of this object.; -#X floatatom 546 219 0 0 0 0 ID - -; +#X text 14 157 IMPORTANT NOTE: your openGL-implementation (gfx-card driver \, ...) has to support the GLSL-standard (which is part of openGL-2.0) in order to make use of this object.; +#X floatatom 546 219 0 0 0 0 ID - - 0; #X obj 460 196 glsl_vertex; #X obj 453 342 glsl_program; #X text 50 12 Synopsis: [glsl_vertex]; #X text 13 66 Description: load a GLSL vertex shader; -#X text 14 85 [glsl_vertex] loads and compiles a GLSL vertex shader -into a module \, suitable for linking with [glsl_program]; -#X text 17 118 An ID of the generated module is sent to the 2nd outlet. -Use this ID in the "shader" message to [glsl_program]; +#X text 14 85 [glsl_vertex] loads and compiles a GLSL vertex shader into a module \, suitable for linking with [glsl_program]; +#X text 17 118 An ID of the generated module is sent to the 2nd outlet. Use this ID in the "shader" message to [glsl_program]; #X text 63 233 : filename to load as GLSL vertex shader; -#X text 21 284 Inlet 1: "open ": filename to load as GLSL -vertex shader module.; -#X text 21 315 Inlet 1: "print": print info about the GLSL-support -in your openGL implementation; +#X text 21 284 Inlet 1: "open ": filename to load as GLSL vertex shader module.; +#X text 21 315 Inlet 1: "print": print info about the GLSL-support in your openGL implementation; #X text 14 376 Outlet 2: : ID of the GLSL-module; #X obj 460 86 gemhead; #X msg 521 174 print; -#X obj 521 261 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 526 300 pd gemwin; -#X msg 526 281 create; -#X text 522 260 Create window:; #X obj 453 362 glsl_fragment; -#X obj 530 120 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 530 120 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 open 0; #X obj 312 45 openpanel; #X obj 311 157 outlet; @@ -81,12 +45,20 @@ in your openGL implementation; #X restore 473 119 pd open; #X msg 473 139 open Toon.vert; #X obj 453 382 glsl_geometry; -#X obj 518 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load a GLSL vertex shader; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 85 INLET_0 gemlist open print; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 float; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 533 252 _gemwin; #X connect 17 1 16 0; #X connect 27 0 17 0; #X connect 28 0 17 0; #X connect 30 0 31 0; -#X connect 31 0 30 0; -#X connect 34 0 35 0; -#X connect 35 0 36 0; -#X connect 36 0 17 0; +#X connect 31 0 32 0; +#X connect 32 0 17 0; diff --git a/help/imageVert-help.pd b/help/imageVert-help.pd index c99b9bf68..5a622f752 100644 --- a/help/imageVert-help.pd +++ b/help/imageVert-help.pd @@ -1,46 +1,17 @@ #N canvas 344 61 655 397 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 250 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 186 cnv 15 80 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 186 cnv 15 80 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 591 370 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -50,9 +21,7 @@ #X obj 77 281 pix_buf; #X msg 103 257 auto 1; #X obj 103 236 loadbang; -#X text 156 263 [pix_buf] with auto 1 is important if we want to recalculate -our pix-effect each frame but don't want to reload the image all the -time.; +#X text 156 263 [pix_buf] with auto 1 is important if we want to recalculate our pix-effect each frame but don't want to reload the image all the time.; #X obj 77 205 pix_image examples/data/fractal.JPG; #X connect 0 0 9 0; #X connect 2 0 4 0; @@ -69,22 +38,26 @@ time.; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 196 imageVert; -#X text 10 135 This is still experimental...please report any problems -or suggestions with it.; -#X text 14 91 [imageVert] maps a pix to a series of polygons. The height -of the polygons is the sum of the colors (so brighter pixels will be -taller \, while darker pixels are shorter).; +#X text 10 135 This is still experimental...please report any problems or suggestions with it.; +#X text 14 91 [imageVert] maps a pix to a series of polygons. The height of the polygons is the sum of the colors (so brighter pixels will be taller \, while darker pixels are shorter).; #X text 29 77 Description: map luminance to height; #X text 50 12 Synopsis: [imageVertp]; #X text 71 31 Class: geometric object; #X obj 451 165 rotateXYZ; -#X floatatom 476 144 5 0 0 0 - - -; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 28 0; -#X connect 28 0 22 0; -#X connect 29 0 28 1; -#X connect 29 0 28 2; +#X floatatom 476 144 5 0 0 0 - - - 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION map luminance to height; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 272 _gemwin; +#X connect 10 0 12 0; +#X connect 11 0 12 1; +#X connect 12 0 24 0; +#X connect 24 0 18 0; +#X connect 25 0 24 1; +#X connect 25 0 24 2; diff --git a/help/light-help.pd b/help/light-help.pd index 967d8e44a..a2065ad45 100644 --- a/help/light-help.pd +++ b/help/light-help.pd @@ -1,100 +1,65 @@ #N canvas 124 217 710 507 10; #X declare -lib Gem; #X text 475 49 Example:; -#X obj 7 64 cnv 15 450 220 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 336 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 64 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 336 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 339 Inlets:; -#X obj 8 296 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 296 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 295 Arguments:; #X text 452 8 GEM object; #X text 27 351 Inlet 1: gemlist; #X text 9 406 Outlets:; #X text 21 419 Outlet 1: gemlist; -#X obj 469 67 cnv 15 170 320 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 474 321 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 256 112 destroy; -#X obj 322 45 inlet; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 8 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X restore 479 360 pd gemwin; -#X msg 479 341 create; -#X text 475 320 Create window:; -#X obj 475 160 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 469 67 cnv 15 170 320 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 475 160 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 483 74 gemhead; #X text 33 14 Synopsis: [light]; #X text 53 30 Class: non-geometric object; #X text 7 69 Description: adds a point-light to the scene; -#X text 18 86 [light] produces a light which is local to the scene -(unlike [world_light] which is at an infinite distance). Because light -is local light \, there is more computation required. Use a world_light -if you don't mind parallel light rays.; +#X text 18 86 [light] produces a light which is local to the scene (unlike [world_light] which is at an infinite distance). Because light is local light \, there is more computation required. Use a world_light if you don't mind parallel light rays.; #X text 27 373 Inlet 1: message: debug 1|0 (default:0); #X text 28 388 Inlet 2: list: 3(RGB) or 4(RGBA) float values; #X obj 483 235 light; #X msg 570 213 1 1 1; -#X obj 527 163 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 527 163 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 527 184 debug \$1; -#X text 19 219 Keep in mind that the attributes have to be set before -rendering the vertices \, so if you are trying for frame accurate rendering -\, you will want to set the gemhead order to a low number so that all -of the values of the light get set first.; +#X text 19 219 Keep in mind that the attributes have to be set before rendering the vertices \, so if you are trying for frame accurate rendering \, you will want to set the gemhead order to a low number so that all of the values of the light get set first.; #X obj 472 296 sphere; -#X floatatom 563 78 5 0 0 0 - - -; +#X floatatom 563 78 5 0 0 0 - - - 0; #X obj 483 139 translateXYZ 2 0 0; #X obj 483 96 rotateXYZ 0 -120 0; #X obj 472 274 gemhead 40; -#X floatatom 523 121 5 1 4 0 - - -; -#X obj 549 266 cnv 15 85 50 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X floatatom 523 121 5 1 4 0 - - - 0; +#X obj 549 266 cnv 15 85 50 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 551 293 lighting \$1; -#X obj 551 271 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X text 17 155 You can place the light with [rotate] and [translate]. -If you are lost use "debug" to display the light source as a small -sphere.; +#X obj 551 271 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X text 17 155 You can place the light with [rotate] and [translate]. If you are lost use "debug" to display the light source as a small sphere.; #X msg 513 213 1 1 0; -#X text 18 200 The second inlet sets the color of the light-source. -; +#X text 18 200 The second inlet sets the color of the light-source.; #X text 63 307 light-number; -#X obj 492 175 tgl 20 0 empty \$0-onoff empty 17 7 0 10 -262144 -1 --1 0 1; +#X obj 492 175 tgl 20 0 empty \$0-onoff empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 27 362 Inlet 1: float: turn light on/off (default:1); -#X obj 538 9 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 16 0 31 0; -#X connect 24 0 23 1; -#X connect 25 0 26 0; -#X connect 26 0 23 0; -#X connect 29 0 31 2; -#X connect 30 0 23 0; -#X connect 31 0 30 0; -#X connect 32 0 28 0; -#X connect 33 0 30 1; -#X connect 35 0 12 1; -#X connect 36 0 35 0; -#X connect 38 0 23 1; -#X connect 41 0 23 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION adds a point-light to the scene; +#X text 10 65 KEYWORDS Gem non-geometric; +#X text 20 85 INLET_0 gemlist float debug; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 538 9 pd META; +#X obj 551 337 _gemwin; +#X connect 12 0 27 0; +#X connect 20 0 19 1; +#X connect 21 0 22 0; +#X connect 22 0 19 0; +#X connect 25 0 27 2; +#X connect 26 0 19 0; +#X connect 27 0 26 0; +#X connect 28 0 24 0; +#X connect 29 0 26 1; +#X connect 31 0 40 0; +#X connect 32 0 31 0; +#X connect 34 0 19 1; +#X connect 37 0 19 0; diff --git a/help/linear_path-help.pd b/help/linear_path-help.pd index 0629e7de8..efa8ede29 100644 --- a/help/linear_path-help.pd +++ b/help/linear_path-help.pd @@ -60,7 +60,14 @@ its values in n-tuples like: " ..." Therefore #X text 50 240 name of the table; #X obj 516 168 linear_path 3 array; #X msg 543 140 open array; -#X obj 568 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION reads out a table; +#X text 10 65 KEYWORDS Gem; +#X text 20 85 INLET_0 float; +#X text 10 105 AUTHOR IOhannes m zmölnig; +#X text 10 125 LICENSE GPL v2; +#X restore 568 8 pd META; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; diff --git a/help/mesh_line-help.pd b/help/mesh_line-help.pd index bc600d922..e5df230fe 100644 --- a/help/mesh_line-help.pd +++ b/help/mesh_line-help.pd @@ -1,38 +1,11 @@ #N canvas 379 171 706 465 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 470 65 cnv 15 230 390 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 593 385 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 598 424 pd gemwin; -#X msg 598 405 create; -#X text 594 384 Create window:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 150 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 470 65 cnv 15 230 390 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 27 277 Inlet 2: float: size; #X text 508 8 GEM object; @@ -40,39 +13,42 @@ #X text 9 321 Outlets:; #X text 21 334 Outlet 1: gemlist; #X text 476 47 Example:; -#X obj 473 96 cnv 15 220 280 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 473 96 cnv 15 220 280 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 476 127 draw line; #X msg 476 146 draw point; #X obj 544 72 gemhead; -#X floatatom 647 318 5 0 0 0 - - -; +#X floatatom 647 318 5 0 0 0 - - - 0; #X text 647 302 size; #X msg 476 108 draw default; #X msg 478 223 grid \$1; -#X floatatom 478 205 5 0 0 0 - - -; +#X floatatom 478 205 5 0 0 0 - - - 0; #X obj 478 292 t a; #X obj 476 167 t a; #X text 7 69 Description: Renders a mesh; #X text 27 247 Inlet 1: message: draw [line|default|point]; -#X text 27 261 Inlet 1: list: grid float : change the grid resolution -; +#X text 27 261 Inlet 1: list: grid float : change the grid resolution; #X obj 544 340 mesh_line 3; #X text 32 14 Synopsis: [mesh_line]; -#X text 16 86 The [mesh_line] object renders a mesh in a line at the -current position with current color. The size of the line can be changed -via the second inlet. This object is useful when working with vertex_shader -; +#X text 16 86 The [mesh_line] object renders a mesh in a line at the current position with current color. The size of the line can be changed via the second inlet. This object is useful when working with vertex_shader; #X text 63 186 resolution of the line mesh; #X text 575 107 (draw line); -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 27 0; -#X connect 19 0 27 0; -#X connect 20 0 31 0; -#X connect 21 0 31 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a mesh; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw list; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 603 402 _gemwin; +#X connect 14 0 23 0; +#X connect 15 0 23 0; +#X connect 16 0 27 0; +#X connect 17 0 27 1; +#X connect 19 0 23 0; +#X connect 20 0 22 0; +#X connect 21 0 20 0; +#X connect 22 0 27 0; #X connect 23 0 27 0; -#X connect 24 0 26 0; -#X connect 25 0 24 0; -#X connect 26 0 31 0; -#X connect 27 0 31 0; diff --git a/help/mesh_square-help.pd b/help/mesh_square-help.pd index 1f983ee57..a35a8d000 100644 --- a/help/mesh_square-help.pd +++ b/help/mesh_square-help.pd @@ -1,38 +1,11 @@ #N canvas 91 105 706 465 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 470 65 cnv 15 230 390 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 593 385 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 598 424 pd gemwin; -#X msg 598 405 create; -#X text 594 384 Create window:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 150 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 470 65 cnv 15 230 390 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 27 302 Inlet 2: float: size; #X text 508 11 GEM object; @@ -40,50 +13,51 @@ #X text 9 321 Outlets:; #X text 21 334 Outlet 1: gemlist; #X text 476 47 Example:; -#X obj 473 96 cnv 15 220 280 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 473 96 cnv 15 220 280 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 476 127 draw line; #X msg 476 146 draw point; #X obj 544 72 gemhead; -#X floatatom 647 318 5 0 0 0 - - -; +#X floatatom 647 318 5 0 0 0 - - - 0; #X text 647 302 size; #X text 32 14 Synopsis: [mesh_square]; #X obj 545 342 mesh_square 3 3; #X msg 476 108 draw default; #X msg 478 223 grid \$1; -#X floatatom 478 205 5 0 0 0 - - -; -#X floatatom 483 247 5 0 0 0 - - -; +#X floatatom 478 205 5 0 0 0 - - - 0; +#X floatatom 483 247 5 0 0 0 - - - 0; #X msg 483 265 gridX \$1; -#X floatatom 552 247 5 0 0 0 - - -; +#X floatatom 552 247 5 0 0 0 - - - 0; #X msg 552 265 gridY \$1; #X obj 478 292 t a; #X obj 476 167 t a; #X text 7 69 Description: Renders a mesh; #X text 63 186 resolution of the mesh; #X text 27 247 Inlet 1: message: draw [line|default|point]; -#X text 27 261 Inlet 1: list: grid float : change the grid resolution -; -#X text 27 274 Inlet 1: list: gridX float : change the X grid resolution -; -#X text 27 288 Inlet 1: list: gridY float : change the Y grid resolution -; -#X text 16 86 The [mesh_square] object renders a mesh in a square at -the current position with current color. The size of the square can -be changed via the second inlet. This object is useful when working -with vertex_shader; -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 33 0; -#X connect 19 0 33 0; -#X connect 20 0 24 0; -#X connect 21 0 24 1; -#X connect 25 0 33 0; -#X connect 26 0 32 0; -#X connect 27 0 26 0; -#X connect 28 0 29 0; -#X connect 29 0 32 0; -#X connect 30 0 31 0; -#X connect 31 0 32 0; -#X connect 32 0 24 0; -#X connect 33 0 24 0; +#X text 27 261 Inlet 1: list: grid float : change the grid resolution; +#X text 27 274 Inlet 1: list: gridX float : change the X grid resolution; +#X text 27 288 Inlet 1: list: gridY float : change the Y grid resolution; +#X text 16 86 The [mesh_square] object renders a mesh in a square at the current position with current color. The size of the square can be changed via the second inlet. This object is useful when working with vertex_shader; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a mesh; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw list; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 603 402 _gemwin; +#X connect 14 0 29 0; +#X connect 15 0 29 0; +#X connect 16 0 20 0; +#X connect 17 0 20 1; +#X connect 21 0 29 0; +#X connect 22 0 28 0; +#X connect 23 0 22 0; +#X connect 24 0 25 0; +#X connect 25 0 28 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 20 0; +#X connect 29 0 20 0; diff --git a/help/model-help.pd b/help/model-help.pd index 977cbd5a8..9253005d8 100644 --- a/help/model-help.pd +++ b/help/model-help.pd @@ -1,118 +1,89 @@ -#N canvas 426 119 673 647 10; +#N canvas 426 119 673 690 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 464 77 cnv 15 200 480 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 466 564 cnv 15 200 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1 \, lighting 1; -#X msg 298 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 471 603 pd gemwin; -#X msg 471 584 create; -#X text 468 565 Create window:; +#X obj 464 77 cnv 15 200 480 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 466 564 cnv 15 200 80 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 475 59 Example:; -#X obj 7 67 cnv 15 450 210 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 316 cnv 15 450 320 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 67 cnv 15 450 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 316 cnv 15 450 320 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 321 Inlets:; -#X obj 8 282 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 282 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 281 Arguments:; #X text 452 8 GEM object; #X text 27 333 Inlet 1: gemlist; #X text 9 600 Outlets:; #X text 21 613 Outlet 1: gemlist; -#X obj 472 136 cnv 15 180 325 empty empty empty 20 12 0 14 -106458 --66577 0; +#X obj 472 136 cnv 15 180 325 empty empty empty 20 12 0 14 #64fc64 #404040 0; #X text 33 14 Synopsis: [model]; #X text 7 69 Description: Renders an Alias/Wavefront-Model.; -#X text 16 86 The model object renders 3D-models that are saved in -Alias/Wavefront's OBJ-format.; +#X text 16 86 The model object renders 3D-models that are saved in Alias/Wavefront's OBJ-format.; #X text 63 292 optional: name of a OBJ-file to be loaded; -#X obj 470 473 cnv 15 50 30 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 583 584 gemhead; +#X obj 470 473 cnv 15 50 30 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 583 581 gemhead; #X obj 583 603 world_light; #X obj 473 84 gemhead; #X obj 473 479 model; -#X obj 486 140 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 486 140 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X obj 486 158 openpanel; -#X obj 574 144 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 574 144 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 574 164 rescale \$1; #X msg 490 224 smooth \$1; -#X obj 574 204 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 574 204 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 574 224 revert \$1; #X msg 486 274 material \$1; #X msg 574 274 texture \$1; #X msg 576 326 group \$1; -#X floatatom 490 206 5 0 1 0 - - -; +#X floatatom 490 206 5 0 1 0 - - - 0; #X msg 486 179 open \$1; -#X obj 576 308 hradio 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -1 --1 2; +#X obj 576 308 hradio 15 1 0 3 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0; #X text 27 350 Inlet 1: message: open ; -#X text 27 367 Inlet 1: message: rescale 1|0 :: normalize the model -(must be set PRIOR to opening a model (default:1); -#X text 26 444 Inlet 1: message: material 1|0 :: use material-information -(from the .MTL-file); -#X text 27 512 Inlet 1: message: group :: draw only specified -part of the model (0==all groups); -#X text 16 114 To normalize the size and pivot-point of a loaded model -use the "rescale"-message prior(!) to loading the model.; +#X text 27 367 Inlet 1: message: rescale 1|0 :: normalize the model (must be set PRIOR to opening a model (default:1); +#X text 26 444 Inlet 1: message: material 1|0 :: use material-information (from the .MTL-file); +#X text 27 512 Inlet 1: message: group :: draw only specified part of the model (0==all groups); +#X text 16 114 To normalize the size and pivot-point of a loaded model use the "rescale"-message prior(!) to loading the model.; #X text 27 426 Inlet 1: message: revert 1|0 :: revert faces; -#X text 16 142 The amount of smoothing of the model-facets can be set -via the "smooth"-message.; -#X text 17 168 Some models have material-information stored in a separate -MTL-file. If these materials should be used instead of GEM's [color] -(and friends) use the "material"-message.; -#X text 16 234 Model can consist of several parts \, so-called "groups". -Normally all groups are rendered \, but you can specify specific groups -to be displayed.; +#X text 16 142 The amount of smoothing of the model-facets can be set via the "smooth"-message.; +#X text 17 168 Some models have material-information stored in a separate MTL-file. If these materials should be used instead of GEM's [color] (and friends) use the "material"-message.; +#X text 16 234 Model can consist of several parts \, so-called "groups". Normally all groups are rendered \, but you can specify specific groups to be displayed.; #X obj 473 115 color 1 0 0; -#X obj 486 254 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X text 27 397 Inlet 1: message: smooth :: set smoothing factor -( 0.0==flat. 1.0==smooth. default:0.5); -#X text 27 474 Inlet 1: message: texture 0|1|2 :: 0==linear texturing -\, 1==sphere mapping \, 2==UV-mapping (default); -#X obj 574 254 hradio 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -1 --1 0; -#X text 17 210 Images can be applied either as linear \, spherical -or UV textures.; -#X msg 511 381 loader OBJ; -#X msg 520 401 loader ASSIMP3; -#X text 27 542 Inlet 1: message: loader :: choose which backend -to use first to open the model; -#X obj 500 524 print info; -#X msg 518 424 loader; +#X obj 486 254 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X text 27 397 Inlet 1: message: smooth :: set smoothing factor ( 0.0==flat. 1.0==smooth. default:0.5); +#X text 27 474 Inlet 1: message: texture 0|1|2 :: 0==linear texturing \, 1==sphere mapping \, 2==UV-mapping (default); +#X obj 574 254 hradio 15 1 0 3 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0; +#X text 17 210 Images can be applied either as linear \, spherical or UV textures.; +#X msg 511 381 backend OBJ; +#X msg 520 401 backend ASSIMP3; +#X text 27 542 Inlet 1: message: backend :: choose which backend to use first to open the model; +#X msg 518 424 backend; #X obj 473 325 t a; #X obj 558 346 t a; -#X text 559 423 query loaders; +#X text 567 424 query backends; #X obj 490 424 t a; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders an Alias/Wavefront-Model.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist open rescale smooth revert material texture group backend; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 558 8 pd META; +#X obj 494 451 r \$0-ctl; +#N canvas 6 49 515 369 print 0; +#X obj 102 176 inlet; +#X obj 102 198 s \$0-info; +#X obj 102 220 r \$0-infoprint; +#X obj 102 242 print INFO; +#X text 62 90 actually you can just hook a [print] to the 3rd outlet.; +#X text 64 115 here it's a bit more complicated \, as we want to filter out the messages generated from the [pd PROPERTIES] window.; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X restore 500 524 pd print; +#X obj 8 644 cnv 15 450 30 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 41 647 _backendinfo \$0 model; #N canvas 1230 127 534 459 properties 0; -#X obj 39 405 outlet; #X msg 39 175 enumProps; -#X text 107 177 print available properties (for reading and/or writing) -; +#X text 107 177 print available properties (for reading and/or writing); #X msg 61 214 get texheight texwidth; #X msg 84 245 set usematerial 1; #X text 209 246 set an (available) named properties; @@ -125,43 +96,40 @@ to use first to open the model; #X text 161 366 clear stored properties; #X text 26 35 ==========================; #X text 26 22 getting/setting properties; -#X text 26 68 depending on the used backend for loading a model \, -different properties might be available., f 61; -#X text 30 104 properties can only be enumerated after a model has -been loaded (and thus the loader-backend has been determined); -#X connect 1 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 0 0; -#X connect 7 0 0 0; -#X connect 9 0 0 0; -#X connect 11 0 0 0; -#X restore 533 478 pd properties; -#X obj 558 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 22 0 23 0; -#X connect 24 0 48 0; -#X connect 25 1 57 0; -#X connect 26 0 27 0; -#X connect 27 0 37 0; +#X text 26 68 depending on the used backend for loading a model \, different properties might be available., f 61; +#X text 30 104 properties can only be enumerated after a model has been loaded (and thus the loader-backend has been determined); +#X obj 39 405 s \$0-ctl; +#X connect 0 0 16 0; +#X connect 2 0 16 0; +#X connect 3 0 16 0; +#X connect 6 0 16 0; +#X connect 8 0 16 0; +#X connect 10 0 16 0; +#X restore 353 648 pd properties; +#X obj 473 572 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 19 0 20 0; +#X connect 21 0 45 0; +#X connect 22 1 61 0; +#X connect 23 0 24 0; +#X connect 24 0 34 0; +#X connect 25 0 26 0; +#X connect 26 0 56 0; +#X connect 27 0 55 0; #X connect 28 0 29 0; -#X connect 29 0 60 0; -#X connect 30 0 59 0; -#X connect 31 0 32 0; -#X connect 32 0 60 0; -#X connect 33 0 59 0; -#X connect 34 0 60 0; -#X connect 35 0 60 0; -#X connect 36 0 30 0; -#X connect 37 0 59 0; -#X connect 38 0 35 0; -#X connect 48 0 59 0; -#X connect 49 0 33 0; -#X connect 52 0 34 0; -#X connect 54 0 62 0; -#X connect 55 0 62 0; -#X connect 58 0 62 0; -#X connect 59 0 25 0; -#X connect 60 0 25 0; -#X connect 62 0 25 0; -#X connect 63 0 25 0; +#X connect 29 0 56 0; +#X connect 30 0 55 0; +#X connect 31 0 56 0; +#X connect 32 0 56 0; +#X connect 33 0 27 0; +#X connect 34 0 55 0; +#X connect 35 0 32 0; +#X connect 45 0 55 0; +#X connect 46 0 30 0; +#X connect 49 0 31 0; +#X connect 51 0 58 0; +#X connect 52 0 58 0; +#X connect 54 0 58 0; +#X connect 55 0 22 0; +#X connect 56 0 22 0; +#X connect 58 0 22 0; +#X connect 60 0 22 0; diff --git a/help/modelfiler-help.pd b/help/modelfiler-help.pd new file mode 100644 index 000000000..428606376 --- /dev/null +++ b/help/modelfiler-help.pd @@ -0,0 +1,119 @@ +#N canvas 354 229 732 634 10; +#X declare -lib Gem; +#X text 54 30 Class: geometric object; +#X obj 463 87 cnv 15 240 530 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X text 467 67 Example:; +#X obj 7 67 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 226 cnv 15 450 230 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 9 231 Inlets:; +#X obj 8 182 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 17 181 Arguments:; +#X text 452 8 GEM object; +#X obj 474 96 cnv 15 220 430 empty empty empty 20 12 0 14 #64fc64 #404040 0; +#X text 63 192 optional: name of a OBJ-file to be loaded; +#X obj 474 533 cnv 15 80 30 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 477 107 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X obj 477 125 openpanel; +#X msg 477 146 open \$1; +#X text 27 260 Inlet 1: message: open ; +#X msg 506 394 backend OBJ; +#X msg 515 414 backend ASSIMP3; +#X text 27 342 Inlet 1: message: backend :: choose which backend to use first to open the model; +#X msg 513 437 backend; +#X obj 477 225 t a; +#X text 550 461 query backends; +#X obj 494 464 t a; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 135 AUTHOR IOhannes m zmölnig; +#X text 10 155 LICENSE GPL v2; +#X text 10 45 DESCRIPTION load an Alias/Wavefront-Model to various tables.; +#X text 10 65 KEYWORDS Gem openGL; +#X text 20 85 INLET_0 gemlist open position color normal texture backend ...; +#X text 20 115 OUTLET_0 vertices; +#X restore 558 8 pd META; +#X obj 8 464 cnv 15 450 30 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 41 467 _backendinfo \$0 model; +#N canvas 393 109 534 459 properties 0; +#X msg 39 175 enumProps; +#X text 107 177 print available properties (for reading and/or writing); +#X msg 61 214 get texheight texwidth; +#X msg 84 245 set usematerial 1; +#X text 209 246 set an (available) named properties; +#X text 208 215 get (available) named properties; +#X msg 84 310 setProps usematerial 1; +#X text 232 309 store a named property for applying LATER; +#X msg 84 340 applyProps; +#X text 162 340 apply stored properties; +#X msg 84 370 clearProps; +#X text 161 366 clear stored properties; +#X text 26 35 ==========================; +#X text 26 22 getting/setting properties; +#X text 26 68 depending on the used backend for loading a model \, different properties might be available., f 61; +#X text 30 104 properties can only be enumerated after a model has been loaded (and thus the loader-backend has been determined); +#X obj 39 405 s \$0-ctl; +#X connect 0 0 16 0; +#X connect 2 0 16 0; +#X connect 3 0 16 0; +#X connect 6 0 16 0; +#X connect 8 0 16 0; +#X connect 10 0 16 0; +#X restore 353 468 pd properties; +#X obj 477 539 modelfiler; +#X msg 569 437 loader; +#X obj 13 508 table table_posX; +#X obj 13 528 table table_posY; +#X obj 13 549 table table_posZ; +#X obj 116 508 table table_normalX; +#X obj 116 528 table table_normalY; +#X obj 116 549 table table_normalZ; +#X obj 238 508 table table_colorR; +#X obj 238 528 table table_colorG; +#X obj 238 548 table table_colorB; +#X msg 495 172 open ../examples/data/venus.obj; +#X obj 477 574 print; +#X obj 489 360 t a; +#X obj 507 505 r \$0-ctl; +#X text 13 384 Outlets:; +#X obj 238 568 table table_colorA; +#X obj 354 508 table table_texU; +#X obj 354 528 table table_texV; +#X text 7 79 Description: loads a 3D model into a table; +#X text 33 14 Synopsis: [modelfiler]; +#X msg 515 204 symbol table_pos; +#X msg 515 224 position \$1X \$1Y \$1Z; +#X msg 527 250 symbol table_color; +#X msg 527 270 color \$1R \$1G \$1B \$1A; +#X msg 534 296 symbol table_normal; +#X msg 534 316 normal \$1X \$1Y \$1Z; +#X msg 564 342 symbol table_tex; +#X msg 564 362 texture \$1U \$1V; +#X text 45 607 see also:; +#X obj 113 605 gemvertexbuffer; +#X text 33 409 Outlet 1 : vertices float : number of vertices copied to tables; +#X text 27 277 Inlet 1 : message: position ; +#X text 27 293 Inlet 1 : message: color ; +#X text 27 309 Inlet 1 : message: normal ; +#X text 28 324 Inlet 1 : message: texture ; +#X text 16 96 The [modelfilter] object loads the data from a 3D model into various tables \, so they can be used e.g. with VBOs (e.g. [gemvertexbuffer]); +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 14 0 20 0; +#X connect 16 0 22 0; +#X connect 17 0 22 0; +#X connect 19 0 22 0; +#X connect 20 0 27 0; +#X connect 22 0 27 0; +#X connect 27 0 39 0; +#X connect 28 0 22 0; +#X connect 38 0 20 0; +#X connect 40 0 27 0; +#X connect 41 0 27 0; +#X connect 48 0 49 0; +#X connect 49 0 40 0; +#X connect 50 0 51 0; +#X connect 51 0 40 0; +#X connect 52 0 53 0; +#X connect 53 0 40 0; +#X connect 54 0 55 0; +#X connect 55 0 40 0; diff --git a/help/multimodel-help.pd b/help/multimodel-help.pd index 2f41a929e..c3280cac1 100644 --- a/help/multimodel-help.pd +++ b/help/multimodel-help.pd @@ -1,71 +1,44 @@ #N canvas 368 61 710 490 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 464 77 cnv 15 200 180 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 466 294 cnv 15 200 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1 \, lighting 1; -#X msg 298 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 471 333 pd gemwin; -#X msg 471 314 create; -#X text 468 295 Create window:; +#X obj 464 77 cnv 15 200 180 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 466 294 cnv 15 200 80 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 475 59 Example:; -#X obj 7 67 cnv 15 450 200 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 316 cnv 15 450 160 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 67 cnv 15 450 200 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 316 cnv 15 450 160 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 321 Inlets:; -#X obj 8 276 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 276 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 275 Arguments:; #X text 452 8 GEM object; #X text 27 333 Inlet 1: gemlist; #X text 9 420 Outlets:; #X text 21 433 Outlet 1: gemlist; -#X obj 469 146 cnv 15 190 35 empty empty empty 20 12 0 14 -106458 -66577 -0; -#X obj 470 203 cnv 15 50 30 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 583 314 gemhead; +#X obj 469 146 cnv 15 190 35 empty empty empty 20 12 0 14 #64fc64 #404040 0; +#X obj 470 203 cnv 15 50 30 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 583 311 gemhead; #X obj 583 333 world_light; #X obj 473 84 gemhead; #X obj 492 413 model; #X text 472 394 see also:; #X text 33 14 Synopsis: [multimodel]; -#X text 19 117 The open message is the name of the of model file \, -the base model number (ie \, what number to start at) \, the top model -number (what number to end at) \, and the skip rate (how to count). -; -#X text 18 180 When you send the open message \, multimodel looks for -the * in the file name and replaces it with a number.; +#X text 19 117 The open message is the name of the of model file \, the base model number (ie \, what number to start at) \, the top model number (what number to end at) \, and the skip rate (how to count).; +#X text 18 180 When you send the open message \, multimodel looks for the * in the file name and replaces it with a number.; #X obj 473 209 multimodel; #X msg 482 156 open mymodel*.obj 0 10 1; -#X text 27 350 Inlet 1: message: open - ; +#X text 27 350 Inlet 1: message: open ; #X obj 563 412 pix_multiimage; -#X text 7 69 Description: load multiple an Alias/Wavefront-Model and -renders one of them; +#X text 7 69 Description: load multiple an Alias/Wavefront-Model and renders one of them; #X text 18 386 for other messages to [multimodel] see [model]; -#X obj 558 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 19 0; -#X connect 20 0 26 0; -#X connect 27 0 26 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load multiple an Alias/Wavefront-Model and renders one of them; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist open; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 558 8 pd META; +#X obj 483 301 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 15 0 16 0; +#X connect 17 0 23 0; +#X connect 24 0 23 0; diff --git a/help/newWave-help.pd b/help/newWave-help.pd index 7c021a30a..91a59c3b0 100644 --- a/help/newWave-help.pd +++ b/help/newWave-help.pd @@ -1,54 +1,23 @@ #N canvas 402 236 760 620 10; #X declare -lib Gem; #X text 54 27 Class: geometric object; -#X obj 479 47 cnv 15 250 550 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 484 533 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 454 304 gemwin 0; -#X obj 131 164 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 131 140 create \, 1 \, lighting 1; -#X obj 298 149 world_light; -#X obj 298 122 gemhead; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 9 0 8 0; -#X restore 489 571 pd gemwin; -#X msg 489 552 create; -#X text 485 532 Create window:; +#X obj 479 47 cnv 15 250 550 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 29 Example:; -#X obj 7 47 cnv 15 450 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 199 cnv 15 450 260 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 47 cnv 15 450 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 199 cnv 15 450 260 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 19 198 Inlets:; -#X obj 8 143 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 143 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 142 Arguments:; #X text 26 347 Inlet 1: message: draw [line|fill|point]; #X text 552 8 GEM object; #X text 27 210 Inlet 1: gemlist; #X text 9 420 Outlets:; #X text 20 433 Outlet 1: gemlist; -#X obj 484 141 cnv 15 240 380 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 484 141 cnv 15 240 380 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 494 54 gemhead; -#X floatatom 592 446 5 0 0 2 size - -; -#X floatatom 593 475 5 0 0 2 height - -; -#X floatatom 526 96 5 0 0 0 - - -; +#X floatatom 592 446 5 0 0 2 size - - 0; +#X floatatom 593 475 5 0 0 2 height - - 0; +#X floatatom 526 96 5 0 0 0 - - - 0; #X msg 523 172 draw line; #X msg 523 192 draw fill; #X msg 523 212 draw point; @@ -56,26 +25,22 @@ #X text 26 377 Inlet 2: float: size (dimX & dimY); #X text 26 391 Inlet 3: float: height (dimZ); #X text 26 405 Inlet 4: int: action; -#X obj 565 254 vradio 11 1 0 11 empty empty action -10 -6 0 8 -262144 --1 -1 0; -#X floatatom 626 158 5 0 100 0 - - -; +#X obj 565 254 vradio 11 1 0 11 empty empty action -10 -6 0 8 #fcfcfc #000000 #000000 0; +#X floatatom 626 158 5 0 100 0 - - - 0; #X obj 626 176 / 100; #X msg 626 195 K1 \$1; -#X text 16 68 The newWaves object renders a number of waving square -at the current position with current color. The size of the square -can be changed via the inlet2 \, the height of the wave can be set -via the 3rd inlet. You can also set the wave-form (inlet4); +#X text 16 68 The newWaves object renders a number of waving square at the current position with current color. The size of the square can be changed via the inlet2 \, the height of the wave can be set via the 3rd inlet. You can also set the wave-form (inlet4); #X text 26 223 Inlet 1: bang: trigger waving; #X obj 494 459 t a b; -#X floatatom 626 218 5 0 100 0 - - -; +#X floatatom 626 218 5 0 100 0 - - - 0; #X obj 626 236 / 100; -#X floatatom 626 278 5 0 100 0 - - -; +#X floatatom 626 278 5 0 100 0 - - - 0; #X obj 626 296 / 100; -#X floatatom 676 158 5 0 100 0 - - -; +#X floatatom 676 158 5 0 100 0 - - - 0; #X obj 676 176 / 100; -#X floatatom 676 218 5 0 100 0 - - -; +#X floatatom 676 218 5 0 100 0 - - - 0; #X obj 676 236 / 100; -#X floatatom 676 278 5 0 100 0 - - -; +#X floatatom 676 278 5 0 100 0 - - - 0; #X obj 676 296 / 100; #X msg 676 195 D1 \$1; #X msg 676 255 D2 \$1; @@ -85,16 +50,12 @@ via the 3rd inlet. You can also set the wave-form (inlet4); #X obj 595 272 t a; #X obj 595 212 t a; #X obj 595 332 t a; -#X text 27 237 Inlet 1: K1 \, D1 \, K2 \, D2 \, K3 \, D3: weight/damping -factors (defaults: K1=0.05 D1=0.1 K2=K3=D2=D3=0); +#X text 27 237 Inlet 1: K1 \, D1 \, K2 \, D2 \, K3 \, D3: weight/damping factors (defaults: K1=0.05 D1=0.1 K2=K3=D2=D3=0); #X msg 590 364 position 1 1 10; -#X text 25 265 Inlet 1: message: position (X Y Z): clamp the node at -(X Y) to a certain height and release it; -#X text 7 51 Description: Renders a waving square (mass-spring-system) -; +#X text 25 265 Inlet 1: message: position (X Y Z): clamp the node at (X Y) to a certain height and release it; +#X text 7 51 Description: Renders a waving square (mass-spring-system); #X msg 592 414 noise 1; -#X obj 8 465 cnv 15 450 130 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 465 cnv 15 450 130 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 13 465 actions:; #X text 84 471 00..retrigger current action; #X text 84 482 01..flat; @@ -113,48 +74,59 @@ factors (defaults: K1=0.05 D1=0.1 K2=K3=D2=D3=0); #X msg 502 146 texture 0; #X msg 591 389 force 15 5 -0.5; #X obj 494 115 rotateXYZ 135 0 0; -#X text 24 290 Inlet 1: message: force (X Y val): apply a force of -value "val" onto the wave at position (X Y); +#X text 24 290 Inlet 1: message: force (X Y val): apply a force of value "val" onto the wave at position (X Y); #X text 63 159 1 : X grid-resolution \, default : 3; #X text 63 171 2 : Y grid resolution \, default : X value; -#X text 26 362 Inlet 1 : message texture [1|2] : change texturing mode -; -#X obj 628 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 77 0; -#X connect 19 0 74 1; -#X connect 20 0 74 2; -#X connect 21 0 77 1; -#X connect 22 0 74 0; -#X connect 23 0 74 0; -#X connect 24 0 74 0; -#X connect 29 0 74 3; -#X connect 30 0 31 0; -#X connect 31 0 32 0; -#X connect 32 0 52 0; -#X connect 35 0 74 0; -#X connect 35 1 74 0; +#X text 26 362 Inlet 1 : message texture [1|2] : change texturing mode; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a waving square (mass-spring-system); +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist bang K1 D1 K2 D2 K3 D3 position force noise draw message; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 int; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 628 8 pd META; +#X obj 648 569 world_light; +#X obj 648 542 gemhead; +#X obj 492 528 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 14 0 73 0; +#X connect 15 0 70 1; +#X connect 16 0 70 2; +#X connect 17 0 73 1; +#X connect 18 0 70 0; +#X connect 19 0 70 0; +#X connect 20 0 70 0; +#X connect 25 0 70 3; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 48 0; +#X connect 31 0 70 0; +#X connect 31 1 70 0; +#X connect 32 0 33 0; +#X connect 33 0 46 0; +#X connect 34 0 35 0; +#X connect 35 0 45 0; #X connect 36 0 37 0; -#X connect 37 0 50 0; +#X connect 37 0 42 0; #X connect 38 0 39 0; -#X connect 39 0 49 0; +#X connect 39 0 43 0; #X connect 40 0 41 0; -#X connect 41 0 46 0; -#X connect 42 0 43 0; +#X connect 41 0 44 0; +#X connect 42 0 48 0; #X connect 43 0 47 0; -#X connect 44 0 45 0; -#X connect 45 0 48 0; -#X connect 46 0 52 0; -#X connect 47 0 51 0; -#X connect 48 0 53 0; -#X connect 49 0 53 0; -#X connect 50 0 51 0; -#X connect 51 0 53 0; -#X connect 52 0 51 0; -#X connect 53 0 74 0; -#X connect 55 0 74 0; -#X connect 58 0 74 0; -#X connect 75 0 74 0; -#X connect 76 0 74 0; -#X connect 77 0 35 0; +#X connect 44 0 49 0; +#X connect 45 0 49 0; +#X connect 46 0 47 0; +#X connect 47 0 49 0; +#X connect 48 0 47 0; +#X connect 49 0 70 0; +#X connect 51 0 70 0; +#X connect 54 0 70 0; +#X connect 71 0 70 0; +#X connect 72 0 70 0; +#X connect 73 0 31 0; +#X connect 80 0 79 0; diff --git a/help/ortho-help.pd b/help/ortho-help.pd index 21c1f1235..08165e1b5 100644 --- a/help/ortho-help.pd +++ b/help/ortho-help.pd @@ -1,27 +1,5 @@ #N canvas 397 92 665 345 10; #X declare -lib Gem; -#X obj 462 275 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 467 314 pd gemwin; -#X msg 467 295 create; -#X text 463 274 Create window:; #X text 465 49 Example:; #X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 8 216 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; @@ -50,26 +28,33 @@ #X obj 480 137 rotateXYZ 45 45 0; #X msg 511 180 compat \$1; #X obj 511 160 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; -#X obj 508 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION orthographic rendering; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist bool compat; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 508 8 pd META; #X obj 544 114 % 360; #X obj 487 114 i 45; #X obj 581 114 t f f; #X text 19 92 [ortho] changes the current viewing-mode from (evtl.) "perspective" (objects that are far away appear smaller than objects that are near) to "orthographic" (parallels appear parallel) for all subsequent shapes., f 70; -#X connect 1 0 2 0; -#X connect 2 0 1 0; -#X connect 22 0 24 0; +#X obj 484 280 _gemwin; +#X connect 18 0 20 0; +#X connect 20 0 25 0; +#X connect 20 1 30 0; +#X connect 21 0 19 0; +#X connect 22 0 21 0; +#X connect 23 0 24 1; #X connect 24 0 29 0; -#X connect 24 1 34 0; -#X connect 25 0 23 0; -#X connect 26 0 25 0; -#X connect 27 0 28 1; -#X connect 28 0 33 0; -#X connect 29 0 25 0; -#X connect 30 0 25 0; -#X connect 31 0 30 0; -#X connect 33 0 35 0; -#X connect 34 0 28 0; -#X connect 35 0 34 1; -#X connect 35 1 29 1; -#X connect 35 1 29 2; -#X connect 35 1 29 3; +#X connect 25 0 21 0; +#X connect 26 0 21 0; +#X connect 27 0 26 0; +#X connect 29 0 31 0; +#X connect 30 0 24 0; +#X connect 31 0 30 1; +#X connect 31 1 25 1; +#X connect 31 1 25 2; +#X connect 31 1 25 3; diff --git a/help/part_color-help.pd b/help/part_color-help.pd index 6675eb92c..fcb9cffd8 100644 --- a/help/part_color-help.pd +++ b/help/part_color-help.pd @@ -2,67 +2,29 @@ #X declare -lib Gem; #X text 31 14 Synopsis: [part_color]; #X text 51 37 Class: Particle System; -#X obj 539 18 declare -lib Gem; -#X obj 7 75 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 468 74 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 326 pd gemwin; -#X obj 472 246 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 8 186 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Defines color of particles; +#X text 10 65 KEYWORDS Gem particles; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 color; +#X text 20 125 INLET_2 color; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 539 18 pd META; +#X obj 7 75 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 74 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 246 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 186 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 18 GEM object; #X text 467 55 Example:; -#X obj 7 225 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 225 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 481 293 part_draw; #X obj 481 101 gemhead; #X msg 509 208 0 0 1; #X msg 538 229 1 0 0; #X obj 481 122 part_head; -#X text 14 111 sets the color(s) of a particle-system. You can set -2 different colors \, particles will have either the one or the other. -; +#X text 14 111 sets the color(s) of a particle-system. You can set 2 different colors \, particles will have either the one or the other.; #X text 12 85 Description: Defines color of particles; #X obj 481 256 part_color; #X text 12 195 argument : none; @@ -71,17 +33,17 @@ #X text 577 230 color 2; #X text 19 271 Inlet 2: color R1 G1 B1; #X text 19 291 Inlet 3: color R2 G2 B2; -#X obj 481 79 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 481 79 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 481 185 part_velocity sphere 0 0 0 0.1; #X obj 481 144 part_source 40; #X obj 481 164 part_killold 20; -#X connect 12 0 15 0; -#X connect 13 0 18 1; -#X connect 14 0 18 2; -#X connect 15 0 27 0; -#X connect 18 0 11 0; -#X connect 25 0 12 0; -#X connect 26 0 18 0; -#X connect 27 0 28 0; -#X connect 28 0 26 0; +#X obj 483 323 _gemwin; +#X connect 11 0 14 0; +#X connect 12 0 17 1; +#X connect 13 0 17 2; +#X connect 14 0 26 0; +#X connect 17 0 10 0; +#X connect 24 0 11 0; +#X connect 25 0 17 0; +#X connect 26 0 27 0; +#X connect 27 0 25 0; diff --git a/help/part_damp-help.pd b/help/part_damp-help.pd index 5a5b2b42d..4c981cf79 100644 --- a/help/part_damp-help.pd +++ b/help/part_damp-help.pd @@ -1,59 +1,21 @@ #N canvas 615 303 754 395 10; #X declare -lib Gem; #X text 31 14 Synopsis: [part_damp]; -#X obj 539 8 declare -lib Gem; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 468 64 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 306 pd gemwin; -#X obj 472 233 cnv 15 150 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Change velocity of Particles; +#X text 10 65 KEYWORDS Gem particles; +#X text 20 85 INLET_1 list; +#X text 10 105 AUTHOR IOhannes m zmölnig; +#X text 10 125 LICENSE GPL v2; +#X restore 539 8 pd META; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 64 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 233 cnv 15 150 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 8 GEM object; #X text 467 45 Example:; -#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 38 Class: Particle System; #X text 22 228 inlet 1: gemlist (with part_head); #X text 22 255 Inlet 2: V1 V2 V3; @@ -63,26 +25,23 @@ #X obj 481 277 part_draw; #X msg 604 222 \$1 1 1; #X obj 481 247 part_damp 0.1 0.1 0.1; -#X obj 481 68 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 481 68 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 481 137 part_source 10; #X obj 481 213 part_killold 50; #X obj 481 161 part_velocity sphere 0 0 0 0.1; #X text 20 182 Arguments:; #X text 92 182 domain \, V1 V2 V3; -#X text 19 99 part_damp dampens the velocity of the particles. A damping -vector less than 1 \, 1 \, 1 will slow the particles down. A damping -vector greater than 1 \, 1 \, 1 will speed up the particles., f 70 -; +#X text 19 99 part_damp dampens the velocity of the particles. A damping vector less than 1 \, 1 \, 1 will slow the particles down. A damping vector greater than 1 \, 1 \, 1 will speed up the particles., f 70; #X obj 604 202 * 0.01; #X floatatom 604 183 5 0 0 0 damping\ vector - - 0; -#X connect 14 0 15 0; -#X connect 15 0 20 0; -#X connect 17 0 18 1; -#X connect 18 0 16 0; -#X connect 19 0 14 0; -#X connect 20 0 22 0; -#X connect 21 0 18 0; -#X connect 22 0 21 0; -#X connect 26 0 17 0; -#X connect 27 0 26 0; +#X obj 492 311 _gemwin; +#X connect 13 0 14 0; +#X connect 14 0 19 0; +#X connect 16 0 17 1; +#X connect 17 0 15 0; +#X connect 18 0 13 0; +#X connect 19 0 21 0; +#X connect 20 0 17 0; +#X connect 21 0 20 0; +#X connect 25 0 16 0; +#X connect 26 0 25 0; diff --git a/help/part_draw-help.pd b/help/part_draw-help.pd index 93b06ad8f..9d09b35c2 100644 --- a/help/part_draw-help.pd +++ b/help/part_draw-help.pd @@ -4,59 +4,20 @@ #X text 13 358 See also:; #X obj 86 359 part_render; #X text 31 14 Synopsis: [part_draw]; -#X obj 541 30 declare -lib Gem; -#X obj 9 87 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 470 86 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 478 344 pd gemwin; -#X obj 474 296 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 10 198 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Draw a particle system; +#X text 10 65 KEYWORDS Gem particles; +#X text 10 85 AUTHOR IOhannes m zmölnig; +#X text 10 105 LICENSE GPL v2; +#X restore 541 30 pd META; +#X obj 9 87 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 470 86 cnv 15 170 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 474 296 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 10 198 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 466 30 GEM object; #X text 469 67 Example:; -#X obj 9 237 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 9 237 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X msg 514 255 draw point; #X obj 487 112 gemhead; #X obj 487 133 part_head; @@ -64,25 +25,23 @@ #X msg 588 254 draw \$1; #X floatatom 588 235 5 0 13 0 - - - 0; #X text 23 105 Description: Draw a particle system; -#X text 22 128 [part_draw] finally draws a particle system that was -set up with [part_head] and other [part_]-objects.; -#X text 24 251 inlet 1: gemlist (with part_head) \, draw [line|point|] -; +#X text 22 128 [part_draw] finally draws a particle system that was set up with [part_head] and other [part_]-objects.; +#X text 24 251 inlet 1: gemlist (with part_head) \, draw [line|point|]; #X text 495 215 drawing mode:; #X obj 487 157 part_source 1; #X obj 487 177 part_killold 50; #X obj 487 308 part_draw; #X text 17 199 Arguments: none; -#X obj 487 89 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 487 89 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 487 197 part_velocity sphere 0 0 0 0.1; -#X connect 13 0 25 0; -#X connect 14 0 15 0; -#X connect 15 0 23 0; -#X connect 16 0 25 0; -#X connect 17 0 25 0; -#X connect 18 0 17 0; -#X connect 23 0 24 0; -#X connect 24 0 28 0; -#X connect 27 0 14 0; -#X connect 28 0 25 0; +#X obj 494 367 _gemwin; +#X connect 12 0 24 0; +#X connect 13 0 14 0; +#X connect 14 0 22 0; +#X connect 15 0 24 0; +#X connect 16 0 24 0; +#X connect 17 0 16 0; +#X connect 22 0 23 0; +#X connect 23 0 27 0; +#X connect 26 0 13 0; +#X connect 27 0 24 0; diff --git a/help/part_follow-help.pd b/help/part_follow-help.pd index d87fb1224..eec8ee8ba 100644 --- a/help/part_follow-help.pd +++ b/help/part_follow-help.pd @@ -1,83 +1,42 @@ #N canvas 589 385 718 449 10; #X declare -lib Gem; #X text 34 1 Synopsis: [part_follow]; -#X obj 546 8 declare -lib Gem; -#X obj 14 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Particle follow each other; +#X text 10 65 KEYWORDS Gem particles; +#X text 10 85 AUTHOR IOhannes m zmölnig; +#X text 10 105 LICENSE GPL v2; +#X restore 546 8 pd META; +#X obj 14 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 66 25 Class: particle object; -#X obj 475 64 cnv 15 220 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 491 316 pd gemwin; -#X obj 484 234 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 15 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 475 64 cnv 15 220 275 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 484 234 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 15 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 471 8 GEM object; #X text 474 45 Example:; -#X obj 14 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X text 119 105 [part_follow] lets the particles follow each other. -; +#X obj 14 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 119 105 [part_follow] lets the particles follow each other.; #X text 32 83 Description: Particle follow each other; -#X text 27 132 inlet 1: gemlist (with part_head) \, draw [line|point|] -; +#X text 27 132 inlet 1: gemlist (with part_head) \, draw [line|point|]; #X obj 489 92 gemhead; #X obj 489 113 part_head; #X obj 489 285 part_draw; #X text 24 178 Arguments: particle follow; -#X obj 489 71 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 489 71 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X floatatom 594 202 5 0 100 2 particle\ follow - - 0; #X obj 489 156 part_velocity point 0 -0.1 0; #X obj 489 175 part_killold 40; #X obj 489 137 part_source 10; #X obj 594 221 * 0.0001; #X obj 489 249 part_follow 0.0001; -#X connect 14 0 15 0; -#X connect 15 0 22 0; -#X connect 18 0 14 0; -#X connect 19 0 23 0; -#X connect 20 0 21 0; -#X connect 21 0 24 0; -#X connect 22 0 20 0; -#X connect 23 0 24 1; -#X connect 24 0 16 0; +#X obj 528 353 _gemwin; +#X connect 13 0 14 0; +#X connect 14 0 21 0; +#X connect 17 0 13 0; +#X connect 18 0 22 0; +#X connect 19 0 20 0; +#X connect 20 0 23 0; +#X connect 21 0 19 0; +#X connect 22 0 23 1; +#X connect 23 0 15 0; diff --git a/help/part_gravity-help.pd b/help/part_gravity-help.pd index 197730e14..c8f7abf3b 100644 --- a/help/part_gravity-help.pd +++ b/help/part_gravity-help.pd @@ -1,61 +1,14 @@ #N canvas 450 384 693 443 10; #X declare -lib Gem; #X obj 539 28 declare -lib Gem; -#X obj 7 85 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 468 84 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 337 pd gemwin; -#X obj 472 238 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 8 196 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 7 85 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 84 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 238 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 196 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 28 GEM object; #X text 467 65 Example:; -#X obj 7 235 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X text 32 103 [part_gravity] sets the gravity-vector of the particle-system. -No matter in which direction particles are emitted (pE. via [part_velsphere]) -in the end \, they have to follow the gravity.; +#X obj 7 235 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 32 103 [part_gravity] sets the gravity-vector of the particle-system. No matter in which direction particles are emitted (pE. via [part_velsphere]) in the end \, they have to follow the gravity.; #X obj 482 107 gemhead; #X obj 482 128 part_head; #X obj 482 284 part_draw; @@ -68,15 +21,15 @@ in the end \, they have to follow the gravity.; #X msg 572 211 0 0.01 0; #X obj 482 249 part_gravity; #X msg 502 211 0 -0.01 0; -#X obj 482 87 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 482 87 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 493 191 gravitation vector x y z; -#X connect 10 0 11 0; -#X connect 11 0 15 0; -#X connect 12 0 14 0; -#X connect 13 0 20 0; -#X connect 15 0 13 0; -#X connect 19 0 20 1; -#X connect 20 0 12 0; -#X connect 21 0 20 1; -#X connect 22 0 10 0; +#X obj 489 343 _gemwin; +#X connect 9 0 10 0; +#X connect 10 0 14 0; +#X connect 11 0 13 0; +#X connect 12 0 19 0; +#X connect 14 0 12 0; +#X connect 18 0 19 1; +#X connect 19 0 11 0; +#X connect 20 0 19 1; +#X connect 21 0 9 0; diff --git a/help/part_head-help.pd b/help/part_head-help.pd index f306bb723..c8d199598 100644 --- a/help/part_head-help.pd +++ b/help/part_head-help.pd @@ -1,86 +1,35 @@ #N canvas 619 383 725 370 10; #X declare -lib Gem; #X obj 539 8 declare -lib Gem; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X text 13 78 starts a particle-system. The particle-list normally -holds a number of [part_source]s (particle-generators) [part_]-modifiers -and ends with a particle-renderer such as [part_draw]; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 13 78 starts a particle-system. The particle-list normally holds a number of [part_source]s (particle-generators) [part_]-modifiers and ends with a particle-renderer such as [part_draw]; #X text 42 9 Synopsis: [part_head]; #X text 52 29 Class: particle object; -#X obj 468 64 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 306 pd gemwin; +#X obj 468 64 cnv 15 170 220 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X msg 559 105 speed \$1; #X floatatom 559 81 5 0 0 0 - - - 0; -#X obj 472 124 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 472 124 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 476 94 gemhead; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 464 8 GEM object; #X text 467 45 Example:; -#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X text 14 255 if your particles do not die (e.g.: because the are -killed with [part_killold]) \, your particle source will stop emitting -particles after some time.; -#X text 90 176 the number of particles that can exist in one instance -of time as a creation-argument. (default:1000); -#X text 14 231 speed of the particle-emission with the speed-message. -; +#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 14 255 if your particles do not die (e.g.: because the are killed with [part_killold]) \, your particle source will stop emitting particles after some time.; +#X text 90 176 the number of particles that can exist in one instance of time as a creation-argument. (default:1000); +#X text 14 231 speed of the particle-emission with the speed-message.; #X obj 476 138 part_head; #X obj 476 178 part_source 1; #X obj 476 202 part_velocity point 0 -0.1 0; #X obj 476 251 part_draw; #X obj 476 224 part_killold 50; -#X obj 476 74 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; -#X connect 7 0 19 0; -#X connect 8 0 7 0; -#X connect 10 0 19 0; +#X obj 476 74 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 494 288 _gemwin; +#X connect 6 0 18 0; +#X connect 7 0 6 0; +#X connect 9 0 18 0; +#X connect 18 0 19 0; #X connect 19 0 20 0; -#X connect 20 0 21 0; -#X connect 21 0 23 0; -#X connect 23 0 22 0; -#X connect 24 0 10 0; +#X connect 20 0 22 0; +#X connect 22 0 21 0; +#X connect 23 0 9 0; diff --git a/help/part_info-help.pd b/help/part_info-help.pd index e8bd5c4dc..83941e126 100644 --- a/help/part_info-help.pd +++ b/help/part_info-help.pd @@ -1,90 +1,60 @@ -#N canvas 469 318 684 479 10; +#N canvas 232 183 782 536 10; #X declare -lib Gem; #X obj 539 58 declare -lib Gem; -#X obj 7 115 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 468 114 cnv 15 200 320 empty empty empty 20 12 0 14 #dce4fc -#404040 0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 390 pd gemwin; -#X obj 468 246 cnv 15 200 120 empty empty empty 20 12 0 14 #14e814 -#404040 0; -#X obj 8 226 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 7 115 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 114 cnv 15 200 400 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 468 246 cnv 15 200 120 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 226 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 58 GEM object; #X text 467 95 Example:; -#X obj 7 265 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 265 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 481 140 gemhead; #X obj 481 161 part_head; -#X obj 481 118 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; -#X obj 481 250 part_info, f 18; -#X text 24 130 [part_info] gives you all available information of all -the particles in the system draws a particle system set up with [part_head] -and other [part_]-objects.; -#X text 25 179 If your system contains 15 particles \, then you will -get the information on the outlets 15 times per rendering circle.; +#X obj 481 118 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 508 250 part_info, f 18; +#X text 25 179 If your system contains 15 particles \, then you will get the information on the outlets 15 times per rendering circle.; #X text 39 88 Class: Particle System; -#X text 39 58 Synopsis [part_render]; -#X floatatom 633 270 5 0 0 3 age - - 0; -#X listbox 590 275 6 0 0 3 size - - 0; -#X listbox 551 338 20 0 0 3 velocity - - 0; -#X listbox 533 272 8 0 0 3 color - - 0; -#X listbox 516 304 20 0 0 3 position - - 0; -#X floatatom 498 335 5 0 0 3 id - - 0; -#X obj 481 370 part_killold 10; -#X obj 481 204 part_velocity point 0 0.1 0; +#X floatatom 639 271 5 0 0 3 age - - 0; +#X listbox 595 271 6 0 0 3 size - - 0; +#X listbox 541 338 20 0 0 3 velocity - - 0; +#X listbox 533 271 8 0 0 3 color - - 0; +#X listbox 543 304 20 0 0 3 position - - 0; +#X floatatom 498 321 5 0 0 3 id - - 0; +#X obj 481 480 part_killold 10; #X obj 481 184 part_source 1; -#X obj 481 224 part_draw; -#X connect 9 0 10 0; -#X connect 10 0 25 0; -#X connect 11 0 9 0; -#X connect 12 0 23 0; -#X connect 12 1 22 0; -#X connect 12 2 21 0; -#X connect 12 3 20 0; -#X connect 12 4 19 0; -#X connect 12 5 18 0; -#X connect 12 6 17 0; -#X connect 24 0 26 0; -#X connect 25 0 24 0; -#X connect 26 0 12 0; +#X obj 257 402 _gemwin; +#X text 26 123 [part_info] gives you all available information of all the particles in the particle system set up with [part_head] and other [part_]-objects.; +#X text 39 58 Synopsis [part_info]; +#X text 34 277 Note \, that [part_info] moves the particles (just like [part_draw] and [part_render].; +#X text 36 309 This is convenient if you use it directly to control the rendering \, but makes problems if you use it together with [part_draw] resp [part_render]; +#X obj 481 227 t a a; +#X obj 508 421 translate 1 0 0 0; +#X obj 639 423 /; +#X msg 639 400 0.2 \$1; +#X obj 481 204 part_velocity point 0 0.05 0; +#X obj 508 441 cube \; draw line; +#X obj 508 396 colorRGB 1 1 1; +#X obj 548 371 != 3; +#X connect 8 0 9 0; +#X connect 9 0 21 0; +#X connect 10 0 8 0; +#X connect 11 0 33 0; +#X connect 11 1 19 0; +#X connect 11 2 18 0; +#X connect 11 3 17 0; +#X connect 11 4 16 0; +#X connect 11 5 15 0; +#X connect 11 6 14 0; +#X connect 14 0 30 0; +#X connect 18 0 28 2; +#X connect 19 0 34 0; +#X connect 21 0 31 0; +#X connect 27 0 20 0; +#X connect 27 1 11 0; +#X connect 28 0 32 0; +#X connect 29 0 32 1; +#X connect 30 0 29 0; +#X connect 31 0 27 0; +#X connect 33 0 28 0; +#X connect 34 0 33 2; +#X connect 34 0 33 3; diff --git a/help/part_information-help.pd b/help/part_information-help.pd new file mode 100644 index 000000000..c516b3ede --- /dev/null +++ b/help/part_information-help.pd @@ -0,0 +1,43 @@ +#N canvas 469 318 684 479 10; +#X declare -lib Gem; +#X obj 539 58 declare -lib Gem; +#X obj 7 115 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 114 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 468 246 cnv 15 200 120 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 226 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 464 58 GEM object; +#X text 467 95 Example:; +#X obj 7 265 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 481 140 gemhead; +#X obj 481 161 part_head; +#X obj 481 118 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 25 179 If your system contains 15 particles \, then you will get the information on the outlets 15 times per rendering circle.; +#X text 39 88 Class: Particle System; +#X floatatom 633 270 5 0 0 3 age - - 0; +#X listbox 590 275 6 0 0 3 size - - 0; +#X listbox 551 338 20 0 0 3 velocity - - 0; +#X listbox 533 272 8 0 0 3 color - - 0; +#X listbox 516 304 20 0 0 3 position - - 0; +#X floatatom 498 335 5 0 0 3 id - - 0; +#X obj 481 370 part_killold 10; +#X obj 481 204 part_velocity point 0 0.1 0; +#X obj 481 184 part_source 1; +#X obj 481 224 part_draw; +#X obj 487 402 _gemwin; +#X obj 481 250 part_information, f 18; +#X text 39 58 Synopsis [part_information]; +#X text 24 130 [part_information] gives you all available information of all the particles in the particle system set up with [part_head] and other [part_]-objects.; +#X text 19 271 This is very similar to [part_info] \, but it doesn't move the particles \, so you can use it together with [part_draw] or [part_render].; +#X connect 8 0 9 0; +#X connect 9 0 21 0; +#X connect 10 0 8 0; +#X connect 20 0 22 0; +#X connect 21 0 20 0; +#X connect 22 0 24 0; +#X connect 24 0 19 0; +#X connect 24 1 18 0; +#X connect 24 2 17 0; +#X connect 24 3 16 0; +#X connect 24 4 15 0; +#X connect 24 5 14 0; +#X connect 24 6 13 0; diff --git a/help/part_killold-help.pd b/help/part_killold-help.pd index 231dc0257..498b1dc11 100644 --- a/help/part_killold-help.pd +++ b/help/part_killold-help.pd @@ -1,82 +1,35 @@ #N canvas 619 333 677 430 10; #X declare -lib Gem; #X obj 541 10 declare -lib Gem; -#X obj 9 67 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 9 67 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 54 31 Class: particle object; -#X obj 470 66 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 485 308 pd gemwin; -#X obj 481 219 cnv 15 120 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 470 66 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 481 219 cnv 15 120 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 485 96 gemhead; -#X obj 10 178 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 10 178 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 466 10 GEM object; #X text 469 47 Example:; -#X obj 9 217 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 9 217 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 485 174 part_velocity point 0 -0.1 0; #X obj 485 265 part_draw; -#X text 28 97 kill all particles which are older than the kill time. -The default time is 10 Make the number longer for particles to live -longer and shorter to remove them quicker.; +#X text 28 97 kill all particles which are older than the kill time. The default time is 10 Make the number longer for particles to live longer and shorter to remove them quicker.; #X obj 485 123 part_head; #X text 44 11 Synopsis: [part_killold]; #X text 17 179 Arguments: kill time; #X floatatom 572 199 5 0 100 1 kill\ time - - 0; #X msg 584 127 0 4 0; -#X obj 485 76 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 485 76 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 584 106 loadbang; #X text 625 127 xyz; #X obj 485 153 part_source 10, f 17; #X obj 485 231 part_killold 40; -#X connect 6 0 14 0; -#X connect 11 0 23 0; -#X connect 14 0 22 0; -#X connect 17 0 23 1; -#X connect 18 0 22 3; -#X connect 19 0 6 0; -#X connect 20 0 18 0; +#X obj 504 322 _gemwin; +#X connect 5 0 13 0; +#X connect 10 0 22 0; +#X connect 13 0 21 0; +#X connect 16 0 22 1; +#X connect 17 0 21 3; +#X connect 18 0 5 0; +#X connect 19 0 17 0; +#X connect 21 0 10 0; #X connect 22 0 11 0; -#X connect 23 0 12 0; diff --git a/help/part_killslow-help.pd b/help/part_killslow-help.pd index 8655e52cb..c96db5c42 100644 --- a/help/part_killslow-help.pd +++ b/help/part_killslow-help.pd @@ -1,80 +1,34 @@ #N canvas 726 285 682 383 10; #X declare -lib Gem; #X obj 541 10 declare -lib Gem; -#X obj 9 67 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 9 67 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 54 31 Class: particle object; -#X obj 470 66 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 488 318 pd gemwin; -#X obj 484 236 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 470 66 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 484 236 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 488 96 gemhead; -#X obj 10 178 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 10 178 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 466 10 GEM object; #X text 469 47 Example:; -#X obj 9 217 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 9 217 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 488 283 part_draw; #X obj 488 118 part_head; #X text 17 179 Arguments: kill time; #X floatatom 563 226 5 0 0 1 kill\ time - - 0; -#X text 36 96 kill all particles which are slower than the kill speed. -The default speed is 0.01; +#X text 36 96 kill all particles which are slower than the kill speed. The default speed is 0.01; #X text 43 11 Synopsis: [part_killslow]; #X obj 488 246 part_killslow; #X obj 488 141 part_source 10; #X obj 488 164 part_orbitpoint 0 1 0 0.1; #X floatatom 563 185 5 0 0 0 - - - 0; #X obj 563 204 * 0.001; -#X obj 488 76 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; -#X connect 6 0 12 0; -#X connect 12 0 18 0; -#X connect 14 0 17 1; -#X connect 17 0 11 0; -#X connect 18 0 19 0; -#X connect 19 0 17 0; -#X connect 20 0 21 0; -#X connect 21 0 14 0; -#X connect 22 0 6 0; +#X obj 488 76 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 496 322 _gemwin; +#X connect 5 0 11 0; +#X connect 11 0 17 0; +#X connect 13 0 16 1; +#X connect 16 0 10 0; +#X connect 17 0 18 0; +#X connect 18 0 16 0; +#X connect 19 0 20 0; +#X connect 20 0 13 0; +#X connect 21 0 5 0; diff --git a/help/part_move-help.pd b/help/part_move-help.pd new file mode 100644 index 000000000..23ef11576 --- /dev/null +++ b/help/part_move-help.pd @@ -0,0 +1,74 @@ +#N canvas 469 318 747 550 10; +#X declare -lib Gem; +#X obj 539 58 declare -lib Gem; +#X obj 7 115 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 114 cnv 15 200 400 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 8 226 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 464 58 GEM object; +#X text 467 95 Example:; +#X obj 7 265 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 481 140 gemhead; +#X obj 481 181 part_head; +#X obj 481 118 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 39 88 Class: Particle System; +#X obj 481 222 part_velocity point 0 0.1 0; +#X obj 481 202 part_source 1; +#X obj 277 402 _gemwin; +#X obj 508 341 part_information, f 24; +#X text 39 58 Synopsis [part_move]; +#X text 28 266 [part_draw] and [part_render] do the movement by themselves \, so you won't need this object if you use them.; +#X text 29 300 otoh \, [part_information] will not move the particles.; +#X text 31 321 the misnomed [part_info] combines [part_move] and [part_information] (and is built as an abstraction from the two objects).; +#X obj 173 494 part_info, f 11; +#X obj 481 280 part_move; +#X obj 481 490 part_killold 10; +#X obj 508 431 translate 1 0 0 0; +#X obj 508 406 colorRGB 1 1 1; +#X obj 558 381 != 3; +#X obj 481 311 t a a; +#N canvas 735 461 450 300 demux 0; +#X obj 51 152 t a a; +#X obj 96 177 == 0; +#X obj 51 71 inlet; +#X obj 51 228 outlet; +#X obj 51 205 spigot 1; +#X obj 156 174 spigot 0; +#X obj 156 197 outlet; +#X obj 174 66 inlet; +#X obj 100 100 hradio 18 1 0 2 \$0-demux \$0-demux empty 0 -9 0 10 #fcfcfc #000000 #000000 0; +#X obj 174 89 s \$0-demux; +#X obj 96 136 r \$0-demux; +#X obj 196 136 r \$0-demux; +#X connect 0 0 4 0; +#X connect 0 1 5 0; +#X connect 1 0 4 1; +#X connect 2 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 6 0; +#X connect 7 0 9 0; +#X connect 10 0 1 0; +#X connect 11 0 5 1; +#X coords 0 -1 1 1 36 18 2 100 100; +#X restore 481 243 pd demux; +#X text 24 130 [part_move] moves the particles according to their current velocity and constraints \, and updates their ages!; +#X obj 508 451 cube 0.2 \; draw line; +#X obj 481 161 translateXYZ 0 -3 0; +#X text 104 494 see also; +#X connect 7 0 29 0; +#X connect 8 0 12 0; +#X connect 9 0 7 0; +#X connect 11 0 26 0; +#X connect 12 0 11 0; +#X connect 14 0 23 0; +#X connect 14 1 24 0; +#X connect 14 2 22 2; +#X connect 20 0 25 0; +#X connect 22 0 28 0; +#X connect 23 0 22 0; +#X connect 24 0 23 2; +#X connect 24 0 23 3; +#X connect 25 0 21 0; +#X connect 25 1 14 0; +#X connect 26 0 20 0; +#X connect 26 1 25 0; +#X connect 29 0 8 0; diff --git a/help/part_orbitpoint-help.pd b/help/part_orbitpoint-help.pd index bbe3d76c8..422678b68 100644 --- a/help/part_orbitpoint-help.pd +++ b/help/part_orbitpoint-help.pd @@ -1,62 +1,17 @@ #N canvas 573 367 673 438 10; #X declare -lib Gem; #X obj 546 22 declare -lib Gem; -#X obj 14 79 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 79 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 59 43 Class: particle object; -#X obj 475 78 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 493 330 pd gemwin; -#X obj 486 234 cnv 15 150 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 475 78 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 486 234 cnv 15 150 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 493 104 gemhead; #X obj 493 279 part_draw; #X obj 493 303 part_killold 50; -#X obj 15 190 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 15 190 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 471 22 GEM object; #X text 474 59 Example:; -#X obj 14 229 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 229 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 493 126 part_head; #X floatatom 580 213 5 0 0 1 attraction - - 0; #X obj 493 145 part_source 10; @@ -65,18 +20,16 @@ #X text 512 170 orbipoint x y z; #X text 61 17 Synopsis: [part_orbitpoint]; #X text 24 192 Arguments: orbipoint x y z \, attraction; -#X text 28 110 [part_orbitpoint] will make the particles orbit about -the position x \, y \, z. The gravity is how attracted the particles -are to the point. The default attraction is 1; +#X text 28 110 [part_orbitpoint] will make the particles orbit about the position x \, y \, z. The gravity is how attracted the particles are to the point. The default attraction is 1; #X obj 493 246 part_orbitpoint 0 1 0 0.1; -#X obj 493 85 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; -#X connect 6 0 13 0; -#X connect 7 0 8 0; -#X connect 13 0 15 0; -#X connect 14 0 22 2; -#X connect 15 0 22 0; -#X connect 16 0 22 1; -#X connect 17 0 22 1; -#X connect 22 0 7 0; -#X connect 23 0 6 0; +#X obj 493 85 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 495 338 _gemwin; +#X connect 5 0 12 0; +#X connect 6 0 7 0; +#X connect 12 0 14 0; +#X connect 13 0 21 2; +#X connect 14 0 21 0; +#X connect 15 0 21 1; +#X connect 16 0 21 1; +#X connect 21 0 6 0; +#X connect 22 0 5 0; diff --git a/help/part_render-help.pd b/help/part_render-help.pd index 7d8df6041..f4a12af71 100644 --- a/help/part_render-help.pd +++ b/help/part_render-help.pd @@ -1,71 +1,21 @@ #N canvas 503 464 695 398 10; #X declare -lib Gem; -#X obj 539 -2 declare -lib Gem; -#X obj 7 55 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 468 54 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 306 pd gemwin; -#X obj 472 223 cnv 15 150 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 8 166 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; -#X text 464 -2 GEM object; +#X obj 539 8 declare -lib Gem; +#X obj 7 55 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 54 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 223 cnv 15 150 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 166 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 464 8 GEM object; #X text 467 35 Example:; -#X obj 7 205 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 205 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 28 Class: Particle System; #X obj 481 80 gemhead; #X obj 481 101 part_head; -#X obj 481 58 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 481 58 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 481 121 part_source 10; -#X text 20 61 [part_render] finally draws a particle system that was -set up with [part_head] and other [part_]-objects. The particles are -normal gemLists (for instance a [sphere]); -#X text 21 106 you can turn on/off colouring of paticles (via [part_color]) -; -#X text 21 126 you can turn on/off sizing of paticles (via [part_size]) -; +#X text 20 61 [part_render] finally draws a particle system that was set up with [part_head] and other [part_]-objects. The particles are normal gemLists (for instance a [sphere]); +#X text 21 106 you can turn on/off colouring of paticles (via [part_color]); +#X text 21 126 you can turn on/off sizing of paticles (via [part_size]); #X obj 481 237 part_render; #X obj 481 268 cube 0.1 \; draw line; #X text 41 5 Synopsis [part_render]; @@ -74,12 +24,13 @@ normal gemLists (for instance a [sphere]); #X text 16 170 Arguments: none; #X obj 481 160 part_killold 50; #X obj 481 141 part_velocity sphere 0 0 0 0.1; -#X connect 10 0 11 0; -#X connect 11 0 13 0; -#X connect 12 0 10 0; -#X connect 13 0 24 0; -#X connect 17 0 18 0; -#X connect 20 0 17 0; -#X connect 21 0 17 0; -#X connect 23 0 17 0; -#X connect 24 0 23 0; +#X obj 476 306 _gemwin; +#X connect 9 0 10 0; +#X connect 10 0 12 0; +#X connect 11 0 9 0; +#X connect 12 0 23 0; +#X connect 16 0 17 0; +#X connect 19 0 16 0; +#X connect 20 0 16 0; +#X connect 22 0 16 0; +#X connect 23 0 22 0; diff --git a/help/part_sink-help.pd b/help/part_sink-help.pd index 98b01b764..cea0a2445 100644 --- a/help/part_sink-help.pd +++ b/help/part_sink-help.pd @@ -1,74 +1,21 @@ #N canvas 696 105 686 425 10; #X declare -lib Gem; #X obj 539 8 declare -lib Gem; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 52 29 Class: particle object; -#X obj 468 64 cnv 15 170 320 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 335 pd gemwin; -#X obj 472 238 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 468 64 cnv 1 170 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 238 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 476 74 gemhead; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 8 GEM object; #X text 467 45 Example:; -#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 476 98 part_head; #X obj 476 308 part_draw; -#X text 22 217 : one of "point" \, "line" \, "triangle" \, -"plane" \, "box" \, "sphere" \, "cylinder" \, "cone" \, "blob" \, "disc" -\, "rectangle"; -#X text 22 255 : up to 9 floats \, defining the specified -domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" -\, "x y z r" for "sphere" \, ...). The meaning of the arguments depends --of course- on the domain.; -#X text 26 75 [part_sink] sets up a sink for the particles within the -system \, where they will vanish. You can set the sink-domain (shape) -and the corresponding arguments.; -#X text 29 127 you can turn on/off the killing of particles (default:off) -; +#X text 22 217 : one of "point" \, "line" \, "triangle" \, "plane" \, "box" \, "sphere" \, "cylinder" \, "cone" \, "blob" \, "disc" \, "rectangle"; +#X text 22 255 : up to 9 floats \, defining the specified domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" \, "x y z r" for "sphere" \, ...). The meaning of the arguments depends -of course- on the domain.; +#X text 26 75 [part_sink] sets up a sink for the particles within the system \, where they will vanish. You can set the sink-domain (shape) and the corresponding arguments.; +#X text 29 127 you can turn on/off the killing of particles (default:off); #X obj 476 253 part_sink; #X msg 501 214 symbol sphere; #X obj 476 142 part_velocity sphere 0 0 0 0.1; @@ -79,53 +26,22 @@ and the corresponding arguments.; #X text 96 182 domain \, arguments; #X text 42 9 Synopsis: [part_sink]; #N canvas 146 246 934 704 domain_infos 0; -#X text 36 9 'point' \; A point in space \; arg.1 X pos \; arg.2 Y -pos \; arg.3 Z pos \; \; 'line' \; A line between two points. \; arg.1-3 -Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of -point 1 \; \; 'rectangle' \; A rectangular space between four points. -The fourth point is assumed automatically. \; arg.1-3 Positions X \, -Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7-9 -Positions X \, Y \, Z of point 2 \; \; 'sphere' A space within a sphere. -When argument 5 is larger than zero \, the core is left blank with -the given radius. \; arg.1-3 Positions X \, Y \, Z of center. \; arg.4 -Outer radius \; arg.5 Inner radius \; \; 'box' \; By specifying the -position of two diagonal corners \, the rest will be assumed \; arg.1-3 -Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of -point 1 \; \; 'cylinder' \; When argument 8 is larger than zero \, -the core is left blank with the given radius. arg.1-3 Positions X \, -Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 -Outer radius \; arg.8 Inner radius \; \; 'cone' \; When argument 8 -is larger than zero \, the core is left blank with the given radius. -arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, -Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; -'blob' \; Not too sure what this is other than that it seems to be -a random range. arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Standard -deviation (??) \; \; 'plane' \; You will being specifying two points. -The plain will include point 0 and perpendicular to a line between -the two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 -Positions X \, Y \, Z of point 1 \; Note: When used with [part_source] -this domain always return the position of point 0 and is useless for -such context. \; \; 'disc' \; The concept of arguments 1 through 6 -are identical to 'plane'. \; You can additionally limit the area by -specifying the outer/inner radius of a circle centering at point 0 -\; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X -\, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; -, f 211; +#X text 36 9 'point' \; A point in space \; arg.1 X pos \; arg.2 Y pos \; arg.3 Z pos \; \; 'line' \; A line between two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; \; 'rectangle' \; A rectangular space between four points. The fourth point is assumed automatically. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7-9 Positions X \, Y \, Z of point 2 \; \; 'sphere' A space within a sphere. When argument 5 is larger than zero \, the core is left blank with the given radius. \; arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Outer radius \; arg.5 Inner radius \; \; 'box' \; By specifying the position of two diagonal corners \, the rest will be assumed \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; \; 'cylinder' \; When argument 8 is larger than zero \, the core is left blank with the given radius. arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; 'cone' \; When argument 8 is larger than zero \, the core is left blank with the given radius. arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; 'blob' \; Not too sure what this is other than that it seems to be a random range. arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Standard deviation (??) \; \; 'plane' \; You will being specifying two points. The plain will include point 0 and perpendicular to a line between the two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; Note: When used with [part_source] this domain always return the position of point 0 and is useless for such context. \; \; 'disc' \; The concept of arguments 1 through 6 are identical to 'plane'. \; You can additionally limit the area by specifying the outer/inner radius of a circle centering at point 0 \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \;, f 211; #X restore 14 326 pd domain_infos; #X obj 597 196 * 0.1; #X msg 488 191 kill \$1; -#X obj 488 171 tgl 15 0 empty empty kill 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 488 171 tgl 15 0 empty empty kill 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 476 284 part_killold 50; -#X connect 6 0 11 0; -#X connect 11 0 22 0; -#X connect 17 0 30 0; -#X connect 18 0 17 1; -#X connect 19 0 17 0; -#X connect 20 0 27 0; -#X connect 21 0 17 2; -#X connect 22 0 19 0; -#X connect 27 0 21 0; -#X connect 28 0 17 0; -#X connect 29 0 28 0; -#X connect 30 0 12 0; +#X obj 476 345 _gemwin; +#X connect 5 0 10 0; +#X connect 10 0 21 0; +#X connect 16 0 29 0; +#X connect 17 0 16 1; +#X connect 18 0 16 0; +#X connect 19 0 26 0; +#X connect 20 0 16 2; +#X connect 21 0 18 0; +#X connect 26 0 20 0; +#X connect 27 0 16 0; +#X connect 28 0 27 0; +#X connect 29 0 11 0; diff --git a/help/part_size-help.pd b/help/part_size-help.pd index 3ed3d134d..e3f6eb383 100644 --- a/help/part_size-help.pd +++ b/help/part_size-help.pd @@ -1,63 +1,17 @@ #N canvas 320 413 706 458 10; #X declare -lib Gem; #X obj 546 2 declare -lib Gem; -#X obj 14 59 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 59 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 59 23 Class: particle object; -#X obj 475 58 cnv 15 200 350 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 483 361 pd gemwin; -#X obj 476 233 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 475 58 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 476 233 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 483 81 gemhead; -#X obj 15 170 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 15 170 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 471 2 GEM object; #X text 474 39 Example:; -#X obj 14 209 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 209 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 483 102 part_head; -#X text 31 72 change the size of the particles of a particle-system. -You can also give an initial value.; +#X text 31 72 change the size of the particles of a particle-system. You can also give an initial value.; #X text 31 113 the particle-size defaults to 1.0f; #X obj 483 245 part_size; #X floatatom 534 225 5 0 0 1 size - - 0; @@ -67,22 +21,22 @@ You can also give an initial value.; #X obj 483 324 square 0.1 \; draw line; #X text 24 172 Arguments: size; #X text 32 2 Synopsis: [part_size]; -#X obj 483 63 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 483 63 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 483 143 part_source 1; #X obj 483 123 part_velocity sphere 0 0 0 0.1; #X obj 534 204 / 100; #X obj 534 183 random 200; -#X connect 6 0 11 0; -#X connect 11 0 24 0; -#X connect 14 0 16 0; -#X connect 15 0 14 1; -#X connect 16 0 17 0; -#X connect 17 0 19 0; -#X connect 18 0 14 0; -#X connect 18 1 26 0; -#X connect 22 0 6 0; -#X connect 23 0 18 0; -#X connect 24 0 23 0; -#X connect 25 0 15 0; -#X connect 26 0 25 0; +#X obj 483 360 _gemwin; +#X connect 5 0 10 0; +#X connect 10 0 23 0; +#X connect 13 0 15 0; +#X connect 14 0 13 1; +#X connect 15 0 16 0; +#X connect 16 0 18 0; +#X connect 17 0 13 0; +#X connect 17 1 25 0; +#X connect 21 0 5 0; +#X connect 22 0 17 0; +#X connect 23 0 22 0; +#X connect 24 0 14 0; +#X connect 25 0 24 0; diff --git a/help/part_source-help.pd b/help/part_source-help.pd index ef4b4aa6e..ef93b2167 100644 --- a/help/part_source-help.pd +++ b/help/part_source-help.pd @@ -1,72 +1,21 @@ #N canvas 542 204 699 427 10; #X declare -lib Gem; #X obj 546 12 declare -lib Gem; -#X obj 14 69 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 69 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 59 33 Class: particle object; -#X obj 475 68 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 493 318 pd gemwin; -#X obj 480 196 cnv 15 120 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 475 68 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 480 196 cnv 15 120 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 493 96 gemhead; #X obj 493 269 part_draw; #X obj 493 295 part_killold 50; -#X obj 15 180 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 15 180 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 24 179 Arguments:; #X text 471 12 GEM object; #X text 474 49 Example:; -#X obj 14 219 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X text 24 77 add a particle-source. You will need this if you want -any particles in your particle-system.; -#X text 44 226 : one of "point" \, "line" \, "triangle" \, -"plane" \, "box" \, "sphere" \, "cylinder" \, "cone" \, "blob" \, "disc" -\, "rectangle"; -#X text 43 266 : up to 9 floats \, defining the specified -domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" -\, "x y z r" for "sphere" \, ...). The meaning of the arguments depends --of course- on the domain.; +#X obj 14 219 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 24 77 add a particle-source. You will need this if you want any particles in your particle-system.; +#X text 44 226 : one of "point" \, "line" \, "triangle" \, "plane" \, "box" \, "sphere" \, "cylinder" \, "cone" \, "blob" \, "disc" \, "rectangle"; +#X text 43 266 : up to 9 floats \, defining the specified domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" \, "x y z r" for "sphere" \, ...). The meaning of the arguments depends -of course- on the domain.; #X obj 493 117 part_head; #X obj 493 207 part_source 20; #X text 49 13 Synopsis: [part_source]; @@ -74,57 +23,22 @@ domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" #X msg 547 166 symbol sphere; #X msg 595 185 0 0 0 1; #X obj 493 246 part_velocity point 0 0 0.1; -#X text 96 181 the number of particles that are emitted at each rendering-frame -; -#X text 23 108 Newly created particles will appear in a random position -within the domain.; -#X text 22 132 The key is to pair [part_source] to adjust the rate -of particles appearing and [part_killold] to control its mass in order -to archive the desired effect.; -#X obj 493 77 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X text 96 181 the number of particles that are emitted at each rendering-frame; +#X text 23 108 Newly created particles will appear in a random position within the domain.; +#X text 22 132 The key is to pair [part_source] to adjust the rate of particles appearing and [part_killold] to control its mass in order to archive the desired effect.; +#X obj 493 77 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 631 164 domain; #X text 644 185 args; #N canvas 146 246 934 704 domain_infos 0; -#X text 36 9 'point' \; A point in space \; arg.1 X pos \; arg.2 Y -pos \; arg.3 Z pos \; \; 'line' \; A line between two points. \; arg.1-3 -Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of -point 1 \; \; 'rectangle' \; A rectangular space between four points. -The fourth point is assumed automatically. \; arg.1-3 Positions X \, -Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7-9 -Positions X \, Y \, Z of point 2 \; \; 'sphere' A space within a sphere. -When argument 5 is larger than zero \, the core is left blank with -the given radius. \; arg.1-3 Positions X \, Y \, Z of center. \; arg.4 -Outer radius \; arg.5 Inner radius \; \; 'box' \; By specifying the -position of two diagonal corners \, the rest will be assumed \; arg.1-3 -Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of -point 1 \; \; 'cylinder' \; When argument 8 is larger than zero \, -the core is left blank with the given radius. arg.1-3 Positions X \, -Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 -Outer radius \; arg.8 Inner radius \; \; 'cone' \; When argument 8 -is larger than zero \, the core is left blank with the given radius. -arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, -Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; -'blob' \; Not too sure what this is other than that it seems to be -a random range. arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Standard -deviation (??) \; \; 'plane' \; You will being specifying two points. -The plain will include point 0 and perpendicular to a line between -the two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 -Positions X \, Y \, Z of point 1 \; Note: When used with [part_source] -this domain always return the position of point 0 and is useless for -such context. \; \; 'disc' \; The concept of arguments 1 through 6 -are identical to 'plane'. \; You can additionally limit the area by -specifying the outer/inner radius of a circle centering at point 0 -\; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X -\, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; -, f 211; +#X text 36 9 'point' \; A point in space \; arg.1 X pos \; arg.2 Y pos \; arg.3 Z pos \; \; 'line' \; A line between two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; \; 'rectangle' \; A rectangular space between four points. The fourth point is assumed automatically. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7-9 Positions X \, Y \, Z of point 2 \; \; 'sphere' A space within a sphere. When argument 5 is larger than zero \, the core is left blank with the given radius. \; arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Outer radius \; arg.5 Inner radius \; \; 'box' \; By specifying the position of two diagonal corners \, the rest will be assumed \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; \; 'cylinder' \; When argument 8 is larger than zero \, the core is left blank with the given radius. arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; 'cone' \; When argument 8 is larger than zero \, the core is left blank with the given radius. arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; 'blob' \; Not too sure what this is other than that it seems to be a random range. arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Standard deviation (??) \; \; 'plane' \; You will being specifying two points. The plain will include point 0 and perpendicular to a line between the two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; Note: When used with [part_source] this domain always return the position of point 0 and is useless for such context. \; \; 'disc' \; The concept of arguments 1 through 6 are identical to 'plane'. \; You can additionally limit the area by specifying the outer/inner radius of a circle centering at point 0 \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \;, f 211; #X restore 18 331 pd domain_infos; -#X connect 6 0 17 0; -#X connect 7 0 8 0; -#X connect 17 0 18 0; -#X connect 18 0 23 0; -#X connect 20 0 18 1; -#X connect 21 0 18 2; -#X connect 22 0 18 3; -#X connect 23 0 7 0; -#X connect 27 0 6 0; +#X obj 493 328 _gemwin; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 16 0 17 0; +#X connect 17 0 22 0; +#X connect 19 0 17 1; +#X connect 20 0 17 2; +#X connect 21 0 17 3; +#X connect 22 0 6 0; +#X connect 26 0 5 0; diff --git a/help/part_targetcolor-help.pd b/help/part_targetcolor-help.pd index 14b196a03..18dc85414 100644 --- a/help/part_targetcolor-help.pd +++ b/help/part_targetcolor-help.pd @@ -1,67 +1,19 @@ -#N canvas 733 504 656 395 10; +#N canvas 733 504 678 395 10; #X declare -lib Gem; #X text 51 27 Class: Particle System; #X obj 539 8 declare -lib Gem; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 468 64 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 316 pd gemwin; -#X obj 472 234 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 468 64 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 234 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 8 GEM object; #X text 467 45 Example:; -#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 215 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 481 283 part_draw; #X obj 481 91 gemhead; #X obj 481 112 part_head; -#X obj 481 69 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; -#X text 39 81 part_targetcolor changes the color of the particles by -a scale factor every frame. The target color can be an RGB or RGBA -vector. The scale value defaults to 0.05; +#X obj 481 69 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 39 81 part_targetcolor changes the color of the particles by a scale factor every frame. The target color can be an RGB or RGBA vector. The scale value defaults to 0.05; #X obj 481 175 part_velocity sphere 0 0 0 0.1; #X msg 560 213 1 0 0; #X text 31 4 Synopsis: [part_targetcolor]; @@ -72,12 +24,13 @@ vector. The scale value defaults to 0.05; #X text 12 185 argument : rgb (or rgba) \, scale; #X text 554 197 rgb; #X text 604 195 scale; -#X connect 11 0 12 0; -#X connect 12 0 18 0; -#X connect 13 0 11 0; -#X connect 15 0 20 0; -#X connect 16 0 20 1; -#X connect 18 0 19 0; -#X connect 19 0 15 0; -#X connect 20 0 10 0; -#X connect 21 0 20 2; +#X obj 476 316 _gemwin; +#X connect 10 0 11 0; +#X connect 11 0 17 0; +#X connect 12 0 10 0; +#X connect 14 0 19 0; +#X connect 15 0 19 1; +#X connect 17 0 18 0; +#X connect 18 0 14 0; +#X connect 19 0 9 0; +#X connect 20 0 19 2; diff --git a/help/part_targetsize-help.pd b/help/part_targetsize-help.pd index 7877ca506..01b972aac 100644 --- a/help/part_targetsize-help.pd +++ b/help/part_targetsize-help.pd @@ -1,83 +1,36 @@ #N canvas 796 353 716 478 10; #X declare -lib Gem; #X obj 546 32 declare -lib Gem; -#X obj 14 89 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 89 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 59 53 Class: particle object; -#X obj 475 88 cnv 15 200 350 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 483 391 pd gemwin; -#X obj 476 249 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 475 88 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 476 249 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 483 117 gemhead; -#X obj 15 200 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 15 200 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 471 32 GEM object; #X text 474 69 Example:; -#X obj 14 239 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 239 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 483 138 part_head; #X obj 483 296 part_killold 50; #X obj 483 318 part_render; -#X obj 483 99 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X obj 483 99 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 483 179 part_source 1; #X obj 483 159 part_velocity sphere 0 0 0 0.1; -#X text 36 110 part_targetsize changes the size of the particles by -a scale factor every frame. The default size is 1 The scale value defaults -to 0.05; +#X text 36 110 part_targetsize changes the size of the particles by a scale factor every frame. The default size is 1 The scale value defaults to 0.05; #X text 26 18 Synopsis: part_targetsize; #X obj 483 258 part_targetsize; #X floatatom 526 205 5 0 10 1 size - - 0; #X obj 483 339 square 0.1 \; draw line; #X floatatom 570 226 5 0 10 1 scale - - 0; #X text 24 202 Arguments: size \, scale; -#X connect 6 0 11 0; -#X connect 11 0 16 0; -#X connect 12 0 13 0; -#X connect 13 0 21 0; -#X connect 14 0 6 0; -#X connect 15 0 19 0; -#X connect 16 0 15 0; -#X connect 19 0 12 0; -#X connect 20 0 19 1; -#X connect 22 0 19 2; +#X obj 483 391 _gemwin; +#X connect 5 0 10 0; +#X connect 10 0 15 0; +#X connect 11 0 12 0; +#X connect 12 0 20 0; +#X connect 13 0 5 0; +#X connect 14 0 18 0; +#X connect 15 0 14 0; +#X connect 18 0 11 0; +#X connect 19 0 18 1; +#X connect 21 0 18 2; diff --git a/help/part_velocity-help.pd b/help/part_velocity-help.pd index 4b35b6701..eae7e192c 100644 --- a/help/part_velocity-help.pd +++ b/help/part_velocity-help.pd @@ -1,128 +1,43 @@ #N canvas 600 294 692 462 10; #X declare -lib Gem; #X obj 546 22 declare -lib Gem; -#X obj 14 79 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; -#X obj 475 78 cnv 15 200 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 484 324 pd gemwin; -#X obj 480 222 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 14 79 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 475 78 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 480 222 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 484 102 gemhead; #X obj 484 295 part_draw; #X obj 484 266 part_killold 50; -#X obj 15 190 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 15 190 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 471 22 GEM object; #X text 474 59 Example:; -#X obj 14 229 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 14 229 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 484 123 part_head; #X obj 484 143 part_source 20; #X obj 484 233 part_velocity point 0 0 0.1; -#X text 48 90 [part_velocity] sets velocity of newly emitted particles -within the system. You can set the velocity-domain and the corresponding -arguments.; -#X text 37 232 : one of "point" \, "line" \, "triangle" \, -"plane" \, "box" \, "sphere" \, "cylinder" \, "cone" \, "blob" \, "disc" -\, "rectangle"; -#X text 36 273 : up to 9 floats \, defining the specified -domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" -\, "x y z r" for "sphere" \, ...). The meaning of the arguments depends --of course- on the domain.; +#X text 48 90 [part_velocity] sets velocity of newly emitted particles within the system. You can set the velocity-domain and the corresponding arguments.; +#X text 37 232 : one of "point" \, "line" \, "triangle" \, "plane" \, "box" \, "sphere" \, "cylinder" \, "cone" \, "blob" \, "disc" \, "rectangle"; +#X text 36 273 : up to 9 floats \, defining the specified domain (like "x y z" for "point" \, "x1 y1 z1 x2 y2 z2" for "line" \, "x y z r" for "sphere" \, ...). The meaning of the arguments depends -of course- on the domain.; #X text 59 43 Class: particle object; #X text 49 13 Synopsis: [part_velocity]; #X text 24 192 Arguments:; #X text 96 192 domain \, arguments; #X msg 489 181 symbol sphere; #X msg 579 202 0 0.1 0 0.1; -#X text 48 126 A newly created particle will be given an initial velocity -directing to a random point within the domain. The speed will also -vary according to how far the point is.; -#X obj 484 83 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 -#000000 0 1; +#X text 48 126 A newly created particle will be given an initial velocity directing to a random point within the domain. The speed will also vary according to how far the point is.; +#X obj 484 83 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 578 176 0.1 -0.1 0 0.05; #X text 578 160 arguments; #X text 489 162 domain; #N canvas 146 246 934 704 domain_infos 0; -#X text 36 9 'point' \; A point in space \; arg.1 X pos \; arg.2 Y -pos \; arg.3 Z pos \; \; 'line' \; A line between two points. \; arg.1-3 -Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of -point 1 \; \; 'rectangle' \; A rectangular space between four points. -The fourth point is assumed automatically. \; arg.1-3 Positions X \, -Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7-9 -Positions X \, Y \, Z of point 2 \; \; 'sphere' A space within a sphere. -When argument 5 is larger than zero \, the core is left blank with -the given radius. \; arg.1-3 Positions X \, Y \, Z of center. \; arg.4 -Outer radius \; arg.5 Inner radius \; \; 'box' \; By specifying the -position of two diagonal corners \, the rest will be assumed \; arg.1-3 -Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of -point 1 \; \; 'cylinder' \; When argument 8 is larger than zero \, -the core is left blank with the given radius. arg.1-3 Positions X \, -Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 -Outer radius \; arg.8 Inner radius \; \; 'cone' \; When argument 8 -is larger than zero \, the core is left blank with the given radius. -arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, -Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; -'blob' \; Not too sure what this is other than that it seems to be -a random range. arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Standard -deviation (??) \; \; 'plane' \; You will being specifying two points. -The plain will include point 0 and perpendicular to a line between -the two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 -Positions X \, Y \, Z of point 1 \; Note: When used with [part_source] -this domain always return the position of point 0 and is useless for -such context. \; \; 'disc' \; The concept of arguments 1 through 6 -are identical to 'plane'. \; You can additionally limit the area by -specifying the outer/inner radius of a circle centering at point 0 -\; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X -\, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; -, f 211; +#X text 36 9 'point' \; A point in space \; arg.1 X pos \; arg.2 Y pos \; arg.3 Z pos \; \; 'line' \; A line between two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; \; 'rectangle' \; A rectangular space between four points. The fourth point is assumed automatically. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7-9 Positions X \, Y \, Z of point 2 \; \; 'sphere' A space within a sphere. When argument 5 is larger than zero \, the core is left blank with the given radius. \; arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Outer radius \; arg.5 Inner radius \; \; 'box' \; By specifying the position of two diagonal corners \, the rest will be assumed \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; \; 'cylinder' \; When argument 8 is larger than zero \, the core is left blank with the given radius. arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; 'cone' \; When argument 8 is larger than zero \, the core is left blank with the given radius. arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \; \; 'blob' \; Not too sure what this is other than that it seems to be a random range. arg.1-3 Positions X \, Y \, Z of center. \; arg.4 Standard deviation (??) \; \; 'plane' \; You will being specifying two points. The plain will include point 0 and perpendicular to a line between the two points. \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; Note: When used with [part_source] this domain always return the position of point 0 and is useless for such context. \; \; 'disc' \; The concept of arguments 1 through 6 are identical to 'plane'. \; You can additionally limit the area by specifying the outer/inner radius of a circle centering at point 0 \; arg.1-3 Positions X \, Y \, Z of point 0 \; arg.4-6 Positions X \, Y \, Z of point 1 \; arg.7 Outer radius \; arg.8 Inner radius \;, f 211; #X restore 18 342 pd domain_infos; -#X connect 5 0 12 0; -#X connect 7 0 6 0; +#X obj 484 343 _gemwin; +#X connect 4 0 11 0; +#X connect 6 0 5 0; +#X connect 11 0 12 0; #X connect 12 0 13 0; -#X connect 13 0 14 0; -#X connect 14 0 7 0; -#X connect 22 0 14 1; -#X connect 23 0 14 2; -#X connect 25 0 5 0; -#X connect 26 0 14 2; +#X connect 13 0 6 0; +#X connect 21 0 13 1; +#X connect 22 0 13 2; +#X connect 24 0 4 0; +#X connect 25 0 13 2; diff --git a/help/part_vertex-help.pd b/help/part_vertex-help.pd index 2bf510449..212099ff8 100644 --- a/help/part_vertex-help.pd +++ b/help/part_vertex-help.pd @@ -1,65 +1,18 @@ #N canvas 609 462 664 466 10; #X declare -lib Gem; #X obj 539 28 declare -lib Gem; -#X obj 7 85 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 85 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 52 49 Class: particle object; -#X obj 468 84 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 -0; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc -#000000 #000000 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 476 326 pd gemwin; -#X obj 472 204 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 -0; +#X obj 468 84 cnv 15 170 220 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 472 204 cnv 15 100 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 476 104 gemhead; -#X obj 8 196 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 -0; +#X obj 8 196 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 464 28 GEM object; #X text 467 65 Example:; -#X obj 7 235 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 -0; +#X obj 7 235 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 476 128 part_head; #X obj 476 271 part_draw; -#X text 23 110 add a particle at the specified offset. You will need -this if you want any particles in your particle-system \, especially -with moving particle sources.; +#X text 23 110 add a particle at the specified offset. You will need this if you want any particles in your particle-system \, especially with moving particle sources.; #X text 42 29 Synopsis: [part_vertex]; #X obj 476 222 part_vertex; #X msg 539 184 -1 1 0; @@ -68,10 +21,11 @@ with moving particle sources.; #X obj 476 155 part_velocity point 0 -0.05 0; #X text 17 195 Arguments: default x y z; #X text 536 170 position x y z; -#X connect 6 0 11 0; -#X connect 11 0 19 0; -#X connect 15 0 18 0; -#X connect 16 0 15 1; -#X connect 17 0 15 1; -#X connect 18 0 12 0; -#X connect 19 0 15 0; +#X obj 476 326 _gemwin; +#X connect 5 0 10 0; +#X connect 10 0 18 0; +#X connect 14 0 17 0; +#X connect 15 0 14 1; +#X connect 16 0 14 1; +#X connect 17 0 11 0; +#X connect 18 0 14 0; diff --git a/help/pix_2grey-help.pd b/help/pix_2grey-help.pd index 9d4a67ded..a63870089 100644 --- a/help/pix_2grey-help.pd +++ b/help/pix_2grey-help.pd @@ -1,79 +1,38 @@ #N canvas 404 365 632 342 10; #X declare -lib Gem; #X text 442 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 252 Inlets:; #X text 38 285 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 298 Outlet 1: gemlist; #X text 63 266 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_2grey]; #X text 29 76 Description: convert a pix to greyscale; -#X text 17 151 So \, if you have an RGBA-image \, after [pix_2grey] -the values for R \, G and B will be the same. the chroma-values of -a YUV-image will be set to 127 (no chroma); +#X text 17 151 So \, if you have an RGBA-image \, after [pix_2grey] the values for R \, G and B will be the same. the chroma-values of a YUV-image will be set to 127 (no chroma); #X obj 451 176 pix_2grey; -#X text 17 97 Assuming that you have an image in the gemList (for instance -\, loaded in with pix_image) \, [pix_2grey] will convert the image -into a greyscale \, without changing the actual colorspace.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 27 0; -#X connect 27 0 21 0; +#X text 17 97 Assuming that you have an image in the gemList (for instance \, loaded in with pix_image) \, [pix_2grey] will convert the image into a greyscale \, without changing the actual colorspace.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert a pix to greyscale; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 518 262 _gemwin; +#X obj 451 233 _pix2rectange; +#X obj 451 113 pix_test; +#X connect 11 0 24 0; +#X connect 19 0 23 0; +#X connect 24 0 19 0; diff --git a/help/pix_a_2grey-help.pd b/help/pix_a_2grey-help.pd index cb7d50914..a26610c75 100644 --- a/help/pix_a_2grey-help.pd +++ b/help/pix_a_2grey-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 626 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 275 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 275 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 278 Inlets:; #X text 38 325 Outlets:; -#X obj 8 236 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 236 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 235 Arguments:; -#X obj 7 60 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 60 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 167 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 167 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,35 +30,38 @@ #X text 63 246 ; #X text 56 338 Outlet 1: gemlist; #X text 63 292 Inlet 1: gemlist; -#X obj 451 263 pix_draw; +#X obj 451 263 _pix2rectangle 3; #X text 516 105 open an image; #X text 50 12 Synopsis: [pix_a_2grey]; -#X text 29 66 Description: convert a pixel to greyscale based on alpha -; -#X text 39 87 Assuming that you have an image in the gemList (for instance -\, loaded in with pix_image) \, pix_a_2grey will convert the image -into a greyscale.; -#X text 39 129 If alphaVal > 0 \, then it will convert to greyscale -where ever the pixel alpha is greater than the alphaVal.; +#X text 29 66 Description: convert a pixel to greyscale based on alpha; +#X text 39 87 Assuming that you have an image in the gemList (for instance \, loaded in with pix_image) \, pix_a_2grey will convert the image into a greyscale.; +#X text 39 129 If alphaVal > 0 \, then it will convert to greyscale where ever the pixel alpha is greater than the alphaVal.; #X text 38 189 If alphaVal = 0 \, then nothing happens.; -#X text 38 159 If alphaVal < 0 \, then it will convert to greyscale -where ever the pixel alpha is less than the -alphaVal.; +#X text 38 159 If alphaVal < 0 \, then it will convert to greyscale where ever the pixel alpha is less than the -alphaVal.; #X text 22 210 Obviously \, this will work for RGBA-images only.; #X obj 451 226 pix_a_2grey; -#X floatatom 523 206 4 -1 1 2 alpha-thresh - -; +#X floatatom 523 206 4 -1 1 2 alpha-thresh - - 0; #X text 63 305 Inlet 2: : alpha-threshold (-1..0..+1); #X text 512 118 (TIFF \, ..); #X msg 523 171 0.5; #X msg 479 170 -0.5; #X obj 451 137 pix_coloralpha; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 36 0; -#X connect 30 0 21 0; -#X connect 31 0 30 1; -#X connect 34 0 31 0; -#X connect 35 0 31 0; -#X connect 36 0 30 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert a pixel to greyscale based on alpha; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 518 259 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 33 0; +#X connect 27 0 18 0; +#X connect 28 0 27 1; +#X connect 31 0 28 0; +#X connect 32 0 28 0; +#X connect 33 0 27 0; diff --git a/help/pix_add-help.pd b/help/pix_add-help.pd index cca640700..0643694d4 100644 --- a/help/pix_add-help.pd +++ b/help/pix_add-help.pd @@ -1,46 +1,18 @@ #N canvas 270 306 683 381 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 39 304 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 67 cnv 15 170 300 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 67 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 50 Example:; -#X obj 514 303 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 342 pd gemwin; -#X msg 519 323 create; -#X text 515 302 Create window:; -#X obj 451 188 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 303 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 188 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 139 gemhead; -#X obj 496 122 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 122 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -54,11 +26,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 158 pd image; -#X obj 451 276 pix_texture; #X text 63 196 ; #X text 47 318 Outlet 1: gemlist; #X text 53 262 Inlet 1: gemlist; -#X obj 451 298 square 3; #X text 503 88 (JPEG \, TIFF \, ..); #X obj 541 142 gemhead; #N canvas 0 0 587 366 image 0; @@ -74,26 +44,31 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 541 161 pd image; -#X obj 586 123 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 586 123 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 53 291 Inlet 2: gemlist; #X text 449 67 open two different images; #X text 50 12 Synopsis: [pix_add]; #X text 71 31 Class: pix mix object; #X text 29 67 Description: add 2 images; -#X text 29 91 [pix_add] simply adds two pixes together. It clamps the -images so that they remain in the range of the image. (In other words -\, it is easy to get a white out).; +#X text 29 91 [pix_add] simply adds two pixes together. It clamps the images so that they remain in the range of the image. (In other words \, it is easy to get a white out).; #X obj 451 218 pix_add; #X text 33 137 The 2 images have to be of the same size.; -#X obj 527 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 32 0; -#X connect 17 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 32 1; -#X connect 25 0 24 1; -#X connect 32 0 17 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION add 2 images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 527 8 pd META; +#X obj 451 276 _pix2rectangle 3; +#X obj 520 310 _gemwin; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 27 0; +#X connect 18 0 19 0; +#X connect 19 0 27 1; +#X connect 20 0 19 1; +#X connect 27 0 30 0; diff --git a/help/pix_aging-help.pd b/help/pix_aging-help.pd index 1c24f315f..fbe2ebe2b 100644 --- a/help/pix_aging-help.pd +++ b/help/pix_aging-help.pd @@ -1,117 +1,61 @@ #N canvas 6 61 654 446 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 140 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 345 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 138 cnv 15 190 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 190 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X obj 77 281 pix_buf; -#X msg 103 257 auto 1; -#X obj 103 236 loadbang; -#X text 156 263 [pix_buf] with auto 1 is important if we want to recalculate -our pix-effect each frame but don't want to reload the image all the -time.; -#X connect 0 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X connect 6 0 1 0; -#X connect 7 0 6 0; -#X connect 8 0 7 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 358 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; #X text 50 12 Synopsis: [pix_color]; -#X obj 451 254 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); +#X obj 451 254 _pix2rectangle 3; #X obj 451 216 pix_aging; #X text 11 77 Description: apply a super8-like aging effect; -#X text 16 92 [pix_aging] is an effect that will make your images (better: -films) have a super8-like look.; -#X text 16 123 There are 4 components (color-aging \, light dusts \, -dark pits and vertical scratches) that can be turned on/off individually. -; -#X text 15 168 The number of scratches can be set via the "scratch" -message.; -#X obj 39 399 cnv 15 450 40 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 51 407 acknowledgment: this effect is based on effecTV by Kentarou -Fukuchi (http://effectv.sourceforge.net); +#X text 16 92 [pix_aging] is an effect that will make your images (better: films) have a super8-like look.; +#X text 16 123 There are 4 components (color-aging \, light dusts \, dark pits and vertical scratches) that can be turned on/off individually.; +#X text 15 168 The number of scratches can be set via the "scratch" message.; +#X obj 39 399 cnv 15 450 40 empty empty empty 20 12 0 14 #fcac44 #404040 0; +#X text 51 407 acknowledgment: this effect is based on effecTV by Kentarou Fukuchi (http://effectv.sourceforge.net); #X msg 460 160 dust \$1; -#X obj 460 142 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 580 182 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 460 142 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 580 182 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 580 199 pits \$1; #X msg 480 197 coloraging \$1; -#X obj 481 179 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X floatatom 525 143 5 0 0 0 - - -; +#X obj 481 179 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X floatatom 525 143 5 0 0 0 - - - 0; #X msg 525 161 scratch \$1; #X text 63 275 Inlet 1: dust 0|1: add "dust"; #X text 63 290 Inlet 1: pits 0|1: add "pits"; -#X text 63 324 Inlet 1: scratch : add a maximum of # scratches -; +#X text 63 324 Inlet 1: scratch : add a maximum of # scratches; #X text 63 306 Inlet 1: coloraging 0|1: color-bleaching; -#X obj 538 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 25 0; -#X connect 25 0 22 0; -#X connect 32 0 25 0; -#X connect 33 0 32 0; -#X connect 34 0 35 0; -#X connect 35 0 25 0; -#X connect 36 0 25 0; -#X connect 37 0 36 0; -#X connect 38 0 39 0; -#X connect 39 0 25 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply a super8-like aging effect; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist dust pits coloraging scratch; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 520 262 _gemwin; +#X obj 451 113 pix_test; +#X connect 11 0 39 0; +#X connect 18 0 17 0; +#X connect 25 0 18 0; +#X connect 26 0 25 0; +#X connect 27 0 28 0; +#X connect 28 0 18 0; +#X connect 29 0 18 0; +#X connect 30 0 29 0; +#X connect 31 0 32 0; +#X connect 32 0 18 0; +#X connect 39 0 18 0; diff --git a/help/pix_alpha-help.pd b/help/pix_alpha-help.pd index 9e0e73a87..5404f7c71 100644 --- a/help/pix_alpha-help.pd +++ b/help/pix_alpha-help.pd @@ -1,47 +1,19 @@ #N canvas 42 278 631 490 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 345 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 345 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 348 Inlets:; #X text 38 435 Outlets:; -#X obj 8 306 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 306 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 305 Arguments:; -#X obj 7 56 cnv 15 430 240 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 56 cnv 15 430 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 421 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 460 pd gemwin; -#X msg 519 441 create; -#X text 515 420 Create window:; -#X obj 450 158 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 504 411 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -62,24 +34,13 @@ #X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_alpha]; #X text 29 56 Description: set the alpha values of an RGBA-pix; -#X text 21 229 It defaults to highThresh = 0 0 0 \, lowThresh = 0 0 -0 \, passVal = 0 \, and otherVal = 1 This makes any black pixels totally -transparent.; -#X text 22 170 pix_alpha compares at the color component level \, so -if you wanted pixels with any red and no green or blue in them to be -set to the passVal \, make highThresh = 1 0 0 and lowThresh = 0 0 0 -; -#X text 21 74 pix_alpha sets the alpha values of a pix based on a simple -thresholding. If a pixel value is between the high and low threshold -RGB values \, then the alpha component of the pixel is set to the pass -value. If the pixel value is below the low threshold or above the high -threshold \, then the pixel alpha is set to the other value.; -#X obj 451 283 pix_texture; -#X obj 451 304 square 3; +#X text 21 229 It defaults to highThresh = 0 0 0 \, lowThresh = 0 0 0 \, passVal = 0 \, and otherVal = 1 This makes any black pixels totally transparent.; +#X text 22 170 pix_alpha compares at the color component level \, so if you wanted pixels with any red and no green or blue in them to be set to the passVal \, make highThresh = 1 0 0 and lowThresh = 0 0 0; +#X text 21 74 pix_alpha sets the alpha values of a pix based on a simple thresholding. If a pixel value is between the high and low threshold RGB values \, then the alpha component of the pixel is set to the pass value. If the pixel value is below the low threshold or above the high threshold \, then the pixel alpha is set to the other value.; #X obj 451 110 alpha; #X text 10 276 This obviously only works with RGBA-images; -#X floatatom 465 162 5 0 1 1 pass - -; -#X floatatom 480 182 5 0 1 1 other - -; +#X floatatom 465 162 5 0 1 1 pass - - 0; +#X floatatom 480 182 5 0 1 1 other - - 0; #X msg 494 207 0.6 0.6 0.6; #X msg 509 231 0.2 0.2 0.2; #X obj 445 336 gemhead 1; @@ -91,19 +52,29 @@ threshold \, then the pixel alpha is set to the other value.; #X text 63 388 Inlet 3: : ALPHA-value if not passed; #X text 63 400 Inlet 4: : high-threshold (RGB); #X text 63 413 Inlet 4: : low-threshold (RGB); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 30 0; -#X connect 16 0 17 1; -#X connect 17 0 40 0; -#X connect 28 0 29 0; -#X connect 30 0 17 0; -#X connect 32 0 40 1; -#X connect 33 0 40 2; -#X connect 34 0 40 3; -#X connect 35 0 40 4; -#X connect 36 0 39 0; -#X connect 37 0 38 0; -#X connect 39 0 37 0; -#X connect 40 0 28 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION set the alpha values of an RGBA-pix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 list; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 511 416 _gemwin; +#X obj 451 283 _pix2rectangle 3; +#X connect 11 0 25 0; +#X connect 13 0 14 1; +#X connect 14 0 35 0; +#X connect 25 0 14 0; +#X connect 27 0 35 1; +#X connect 28 0 35 2; +#X connect 29 0 35 3; +#X connect 30 0 35 4; +#X connect 31 0 34 0; +#X connect 32 0 33 0; +#X connect 34 0 32 0; +#X connect 35 0 42 0; diff --git a/help/pix_background-help.pd b/help/pix_background-help.pd index 05df91bd1..b6067f0b8 100644 --- a/help/pix_background-help.pd +++ b/help/pix_background-help.pd @@ -1,75 +1,35 @@ #N canvas 436 61 655 437 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 256 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 256 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 258 Inlets:; #X text 39 390 Outlets:; -#X obj 8 216 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 216 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 215 Arguments:; -#X obj 8 76 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 451 138 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 138 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#X obj 451 233 pix_texture; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #X text 63 226 ; #X text 27 403 Outlet 1: gemlist; #X text 33 272 Inlet 1: gemlist; -#X obj 451 255 square 3; #X msg 464 154 reset; #X text 50 12 Synopsis: [pix_background]; #X text 537 192 threshold; #X text 29 77 Description: separate an objects from background; #X text 33 309 Inlet 1: bang: alias for reset; -#X text 9 92 [pix_background] 'removes' the background of an image -by comparing a static image in memory to an incoming video stream. -all values withing a given range are turned black. for best effect -\, place a camera on a static scene like a blank wall and hit 'reset'. -then set the range control to cover any variance in the background. -when a new object enters the scene it will be the only thing draw against -a black background. use pix_chroma_key or pix_compare to add in images -in place of the black.; -#X text 33 284 Inlet 1: message: reset : reset the background and capture -a new image; +#X text 9 92 [pix_background] 'removes' the background of an image by comparing a static image in memory to an incoming video stream. all values withing a given range are turned black. for best effect \, place a camera on a static scene like a blank wall and hit 'reset'. then set the range control to cover any variance in the background. when a new object enters the scene it will be the only thing draw against a black background. use pix_chroma_key or pix_compare to add in images in place of the black.; +#X text 33 284 Inlet 1: message: reset : reset the background and capture a new image; #X text 34 375 Inlet 2: float: range ( == ); -#X text 34 322 Inlet 2: list: range \; in RGBA mode this is <+-red> -<+-green> <+-blue> \; in YUV-mode this is <+-luma> <+-Cb> <+-Cr> \; -in Gray-mode only the first value is important <+-gray>; +#X text 34 322 Inlet 2: list: range \; in RGBA mode this is <+-red> <+-green> <+-blue> \; in YUV-mode this is <+-luma> <+-Cb> <+-Cr> \; in Gray-mode only the first value is important <+-gray>; #X obj 451 207 pix_background; #X msg 516 177 \$1 \$1 \$1; #X msg 516 142 0.5; -#X floatatom 516 161 5 0 0 0 - - -; +#X floatatom 516 161 5 0 0 0 - - - 0; #N canvas 0 22 599 378 film 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -95,15 +55,23 @@ in Gray-mode only the first value is important <+-gray>; #X restore 451 113 pd film; #X text 516 105 open an movie; #X text 509 118 (AVI \, MPEG \, MOV); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 35 0; -#X connect 16 0 35 1; -#X connect 17 0 21 0; -#X connect 22 0 31 0; -#X connect 31 0 17 0; -#X connect 32 0 31 1; -#X connect 33 0 34 0; -#X connect 34 0 32 0; -#X connect 35 0 31 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION separate an objects from background; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist reset bang; +#X text 20 105 INLET_1 list float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 233 _pix2rectangle 3; +#X obj 519 259 _gemwin; +#X connect 11 0 30 0; +#X connect 13 0 30 1; +#X connect 17 0 26 0; +#X connect 26 0 34 0; +#X connect 27 0 26 1; +#X connect 28 0 29 0; +#X connect 29 0 27 0; +#X connect 30 0 26 0; diff --git a/help/pix_backlight-help.pd b/help/pix_backlight-help.pd index 4ed1b6166..b7a0b8c43 100644 --- a/help/pix_backlight-help.pd +++ b/help/pix_backlight-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 651 356 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 451 138 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 138 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,22 +27,17 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 [ ]; #X text 57 323 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 451 255 square 3; #X text 50 12 Synopsis: [pix_backlight]; -#X floatatom 469 153 5 0 0 2 scale - -; -#X floatatom 509 153 5 0 255 2 floor - -; +#X floatatom 469 153 5 0 0 2 scale - - 0; +#X floatatom 509 153 5 0 255 2 floor - - 0; #X obj 509 171 / 255; -#X floatatom 549 153 5 0 255 2 ceiling - -; +#X floatatom 549 153 5 0 255 2 ceiling - - 0; #X obj 549 171 / 255; #X text 29 77 Description: backlighting effect; -#X text 13 91 [pix_backlight] will radially displace pixels depending -on their luminance value \, thus producing a backlighting effect. You -can set the amount of the displacement as well as floor/ceiling limits -\, to produce displacements only within the specified range.; +#X text 13 91 [pix_backlight] will radially displace pixels depending on their luminance value \, thus producing a backlighting effect. You can set the amount of the displacement as well as floor/ceiling limits \, to produce displacements only within the specified range.; #X obj 451 207 pix_backlight; #X text 64 254 Inlet 2: float: scale-factor (default:0.5); #X text 64 268 Inlet 3: float: floor (default:0); @@ -78,17 +45,27 @@ can set the amount of the displacement as well as floor/ceiling limits #X obj 469 172 / 100; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 31 0; -#X connect 18 0 22 0; -#X connect 24 0 35 0; -#X connect 25 0 26 0; -#X connect 26 0 31 2; -#X connect 27 0 28 0; -#X connect 28 0 31 3; -#X connect 31 0 18 0; -#X connect 35 0 31 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION backlighting effect; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 259 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 26 0; +#X connect 19 0 30 0; +#X connect 20 0 21 0; +#X connect 21 0 26 2; +#X connect 22 0 23 0; +#X connect 23 0 26 3; +#X connect 26 0 35 0; +#X connect 30 0 26 1; diff --git a/help/pix_biquad-help.pd b/help/pix_biquad-help.pd index ae5240641..6277c3822 100644 --- a/help/pix_biquad-help.pd +++ b/help/pix_biquad-help.pd @@ -1,53 +1,23 @@ #N canvas 288 289 658 405 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 267 Inlets:; #X text 39 365 Outlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 540 288 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 545 327 pd gemwin; -#X msg 545 308 create; -#X text 541 287 Create window:; -#X obj 451 172 cnv 15 155 105 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 530 303 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 172 cnv 15 155 105 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 379 Outlet 1: gemlist; #X text 24 281 Inlet 1: gemlist; -#X obj 451 302 square 3; -#X obj 451 280 pix_texture; #X text 71 31 Class: pix object (timebased effect); #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -67,11 +37,11 @@ #X text 516 104 MS Windows: *.AVI; #X text 523 124 linux: depends...; #X text 29 57 Description: timebased IIR-filter; -#X floatatom 457 191 3 0 1 2 fb0 - -; -#X floatatom 481 191 3 0 1 2 fb1 - -; -#X floatatom 505 191 3 0 1 2 fb2 - -; -#X floatatom 534 191 3 0 1 2 ff1 - -; -#X floatatom 558 191 3 0 1 2 ff2 - -; +#X floatatom 457 191 3 0 1 2 fb0 - - 0; +#X floatatom 481 191 3 0 1 2 fb1 - - 0; +#X floatatom 505 191 3 0 1 2 fb2 - - 0; +#X floatatom 534 191 3 0 1 2 ff1 - - 0; +#X floatatom 558 191 3 0 1 2 ff2 - - 0; #N canvas 0 0 450 300 init 0; #X msg 175 214 0.3; #X msg 247 215 0.6; @@ -121,54 +91,54 @@ #X connect 19 1 8 0; #X connect 20 0 2 0; #X restore 605 174 pd init; -#X obj 605 157 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 605 157 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 534 238 set; -#X text 23 298 Inlet 1: message: set: overwrites the filter-buffers -with the next incoming image.; +#X text 23 298 Inlet 1: message: set: overwrites the filter-buffers with the next incoming image.; #X text 439 378 see also:; #X obj 509 381 pix_tIIR; -#X text 23 76 basically it works like the Pd-object [biquad~] (except -\, that applies to images instead of samples); +#X text 23 76 basically it works like the Pd-object [biquad~] (except \, that applies to images instead of samples); #X text 39 134 y(n) = ff1 * w(n) + ff2 * w(n-1) + ff3 * w(n-2); #X text 40 149 w(n) = fb0 * x(n) + fb1 * w(n-1) + fb2 * w(n-2); -#X text 32 104 the operation can be described by the following difference-equation: -; -#X text 18 166 x(n) describes the input-image \, y(n) is the output-image. -; -#X text 16 183 You can set all buffer-images w(m) to the next input-image -x(n) with the "set"-command.; +#X text 32 104 the operation can be described by the following difference-equation:; +#X text 18 166 x(n) describes the input-image \, y(n) is the output-image.; +#X text 16 183 You can set all buffer-images w(m) to the next input-image x(n) with the "set"-command.; #X text 64 237 list:; #X obj 572 381 biquad~; #X text 50 12 Synopsis: [pix_biquad]; #X obj 451 258 pix_biquad; -#X floatatom 582 191 3 0 1 2 ff3 - -; +#X floatatom 582 191 3 0 1 2 ff3 - - 0; #X obj 457 209 pack 1 0 0 1 0 0; -#X text 22 327 Inlet 1: : the filter-coefficients "fb0 fb1 fb2 -ff1 ff2 ff3"; -#X obj 548 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 50 0; -#X connect 20 2 21 0; -#X connect 21 0 20 1; -#X connect 22 0 23 0; -#X connect 23 0 20 0; -#X connect 30 0 52 0; -#X connect 31 0 52 1; -#X connect 32 0 52 2; -#X connect 33 0 52 3; -#X connect 34 0 52 4; -#X connect 35 0 30 0; -#X connect 35 1 31 0; -#X connect 35 2 32 0; -#X connect 35 3 33 0; -#X connect 35 4 34 0; -#X connect 35 5 51 0; -#X connect 36 0 35 0; -#X connect 37 0 50 0; -#X connect 50 0 18 0; -#X connect 51 0 52 5; -#X connect 52 0 50 0; +#X text 22 327 Inlet 1: : the filter-coefficients "fb0 fb1 fb2 ff1 ff2 ff3"; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION timebased IIR-filter; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set list; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 538 308 _gemwin; +#X obj 451 280 _pix2rectangle 3; +#X connect 11 0 15 0; +#X connect 15 0 45 0; +#X connect 15 2 16 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 25 0 47 0; +#X connect 26 0 47 1; +#X connect 27 0 47 2; +#X connect 28 0 47 3; +#X connect 29 0 47 4; +#X connect 30 0 25 0; +#X connect 30 1 26 0; +#X connect 30 2 27 0; +#X connect 30 3 28 0; +#X connect 30 4 29 0; +#X connect 30 5 46 0; +#X connect 31 0 30 0; +#X connect 32 0 45 0; +#X connect 45 0 51 0; +#X connect 46 0 47 5; +#X connect 47 0 45 0; diff --git a/help/pix_bitmask-help.pd b/help/pix_bitmask-help.pd index 4c9e6a5c7..8724b5564 100644 --- a/help/pix_bitmask-help.pd +++ b/help/pix_bitmask-help.pd @@ -1,47 +1,19 @@ #N canvas 43 367 654 380 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 335 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,37 +30,40 @@ #X text 63 216 ; #X text 16 348 Outlet 1: gemlist; #X text 13 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_bitmask]; #X text 13 78 Description: mask out pixels; -#X text 36 94 pix_bitmask uses a bit masking to change the pixels. -If a single mask is used \, the alpha mask is assumed to be 255 (or -\, pass everything).; -#X text 35 137 The mask is an unsigned char \, which means it can go -from 0-255 \, with 0 not passing any bits.; -#X text 34 169 You may need to use pix_gain either before or after -since low bit values will reduce the luminance of the pix.; +#X text 36 94 pix_bitmask uses a bit masking to change the pixels. If a single mask is used \, the alpha mask is assumed to be 255 (or \, pass everything).; +#X text 35 137 The mask is an unsigned char \, which means it can go from 0-255 \, with 0 not passing any bits.; +#X text 34 169 You may need to use pix_gain either before or after since low bit values will reduce the luminance of the pix.; #X obj 451 196 pix_bitmask; -#X floatatom 487 172 5 0 255 2 single - -; +#X floatatom 487 172 5 0 255 2 single - - 0; #X msg 455 158 127; #X msg 455 176 128; #X msg 540 163 255 0 128; #X msg 547 185 0 128 0; -#X text 13 278 Inlet 2: list: mask value for all channels (0..255) -; -#X text 13 295 Inlet 3: list: 3 (RGB) or 4 (RGBA) mask-values in INTeger -(0..255); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 29 0; -#X connect 29 0 21 0; -#X connect 30 0 29 1; -#X connect 31 0 30 0; -#X connect 32 0 30 0; -#X connect 33 0 29 2; -#X connect 34 0 29 2; +#X text 13 278 Inlet 2: list: mask value for all channels (0..255); +#X text 13 295 Inlet 3: list: 3 (RGB) or 4 (RGBA) mask-values in INTeger (0..255); +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION mask out pixels; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 233 _pix2rectangle; +#X obj 520 260 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 25 0; +#X connect 25 0 34 0; +#X connect 26 0 25 1; +#X connect 27 0 26 0; +#X connect 28 0 26 0; +#X connect 29 0 25 2; +#X connect 30 0 25 2; diff --git a/help/pix_buf-help.pd b/help/pix_buf-help.pd index ee74ee062..b711f786d 100644 --- a/help/pix_buf-help.pd +++ b/help/pix_buf-help.pd @@ -9,50 +9,12 @@ #X obj 7 76 cnv 15 430 200 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; +#X obj 474 374 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 450 136 cnv 15 160 110 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 16 438 Outlet 1: gemlist; #X text 23 346 Inlet 1: gemlist; -#X obj 451 273 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_buf] \, [pix_separator]; #X text 29 76 Description: buffer a pix; #X text 11 94 [pix_buf] buffers pixes. This allows you to do some processing which might require a lot of time (for example \, convolution) and store it. All images use a pull system \, so as long as nothing is modified in the pix "upstream" \, the pix_buf is still valid.; @@ -61,19 +23,25 @@ #X obj 487 145 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X msg 487 190 auto \$1; #X obj 487 168 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; -#X obj 451 251 pix_rds; #X text 11 238 [pix_buf] can be used to separate two gemlists processing the same image-data. Thus is is also called [pix_separator]; #X text 22 362 Inlet 1: bang: copy of input-data to the output and force all subsequent [pix_]-objects to process.; #X text 22 391 Inlet 1: auto 1|0: force image-processing in subsequent objects each render-cycle (default:0); -#X obj 518 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION buffer a pix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bang auto; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; #X text 63 296 the default value to force processing; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 27 0; -#X connect 27 0 31 0; -#X connect 28 0 27 0; -#X connect 29 0 27 0; -#X connect 30 0 29 0; -#X connect 31 0 20 0; +#X obj 481 380 _gemwin; +#X obj 451 251 _pix2rectangle 3; +#X obj 451 113 pix_test; +#X connect 11 0 30 0; +#X connect 19 0 29 0; +#X connect 20 0 19 0; +#X connect 21 0 19 0; +#X connect 22 0 21 0; +#X connect 30 0 19 0; diff --git a/help/pix_buffer-help.pd b/help/pix_buffer-help.pd index 8071b743e..accfc205c 100644 --- a/help/pix_buffer-help.pd +++ b/help/pix_buffer-help.pd @@ -1,44 +1,31 @@ -#N canvas 350 148 668 535 10; +#N canvas 350 148 668 577 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 263 cnv 15 430 250 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 263 cnv 15 430 250 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 265 Inlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 452 75 cnv 15 200 170 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 452 75 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 461 54 Example:; -#X obj 457 120 cnv 15 190 150 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 457 120 cnv 15 190 150 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 71 31 Class: pix object; #X text 29 57 Description: a storage place for a number of images; -#X text 11 79 [pix_buffer] is a named storage place for images. It -is quite similar to Pd's [table] object (but you cannot open it and -have a look at it's contents).; +#X text 11 79 [pix_buffer] is a named storage place for images. It is quite similar to Pd's [table] object (but you cannot open it and have a look at it's contents).; #X text 50 11 Synopsis: [pix_buffer]; -#X text 23 281 Inlet 1: bang: get the size of the buffer in frames -; -#X text 12 123 The images stored in the [pix_buffer] can have different -dimensions and colourspaces. Memory is reserved on demand \, but you -can preallocate memory with the [allocate( message.; +#X text 23 281 Inlet 1: bang: get the size of the buffer in frames; +#X text 12 123 The images stored in the [pix_buffer] can have different dimensions and colourspaces. Memory is reserved on demand \, but you can preallocate memory with the [allocate( message.; #X text 23 481 Outlet 1: int: size of the buffer; #X msg 464 128 bang; -#X floatatom 464 253 5 0 0 0 - - -; +#X floatatom 464 303 5 0 0 0 - - - 0; #X msg 505 154 allocate 256 256 4; -#X text 462 296 see also:; -#X obj 475 348 pix_buffer_read; -#X obj 474 323 pix_buffer_write; +#X text 462 426 see also:; +#X obj 475 478 pix_buffer_read; +#X obj 474 453 pix_buffer_write; #X text 64 237 list: ; -#X obj 464 230 pix_buffer depot 10; -#X text 10 170 To write data to the [pix_buffer] or get images from -it \, you can use separate objects [pix_buffer_write] and [pix_buffer_read] -or the [open( message.; -#X obj 505 80 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 240 pix_buffer depot 10; +#X text 10 170 To write data to the [pix_buffer] or get images from it \, you can use separate objects [pix_buffer_write] and [pix_buffer_read] or the [open( message.; +#X obj 505 80 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 openpanel 0; #X obj 114 62 inlet; #X obj 121 254 outlet; @@ -51,28 +38,106 @@ or the [open( message.; #X connect 3 1 1 0; #X connect 4 0 3 0; #X restore 505 97 pd openpanel; -#X text 23 300 Inlet 1: message: open : put an image -into the pix_buffer at the given index; +#X text 23 300 Inlet 1: message: open : put an image into the pix_buffer at the given index; #X msg 505 132 open somefile.jpg 0; #X msg 506 174 resize 15; -#X text 23 384 Inlet 1: message: resize : re-allocate slots in -the buffer (slots will survive this); -#X text 23 333 Inlet 1: message: allocate : -assume that all images in the pix_buffer will have the given dimension -and preallocate memory for them (pixes will be set to black); +#X text 23 384 Inlet 1: message: resize : re-allocate slots in the buffer (slots will survive this); +#X text 23 333 Inlet 1: message: allocate : assume that all images in the pix_buffer will have the given dimension and preallocate memory for them (pixes will be set to black); #X msg 506 193 copy 0 2; #X msg 506 212 save /tmp/out.jpg 2; -#X text 23 414 Inlet 1: message: copy : copy a pix from -slot to slot ; -#X text 23 444 Inlet 1: message: save : save image -in given slot to harddisk.; -#X obj 548 8 declare -lib Gem; +#X text 23 414 Inlet 1: message: copy : copy a pix from slot to slot ; +#X text 23 444 Inlet 1: message: save : save image in given slot to harddisk.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION a storage place for a number of images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 bang open allocate resize copy save; +#X text 20 105 OUTLET_0 int; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 464 277 route float; +#X obj 587 240 r \$0-ctl; +#N canvas 6 49 515 369 print 0; +#X obj 102 176 inlet; +#X obj 102 198 s \$0-info; +#X obj 102 220 r \$0-infoprint; +#X obj 102 242 print INFO; +#X text 62 90 actually you can just hook a [print] to the 3rd outlet.; +#X text 64 115 here it's a bit more complicated \, as we want to filter out the messages generated from the [pd PROPERTIES] window.; +#N canvas 664 456 450 465 logic 0; +#X obj 223 19 r \$0load-ctl; +#X obj 242 184 s \$0-ctl; +#X obj 83 119 r \$0-info; +#X obj 353 19 r \$0save-ctl; +#X obj 353 42 t b a b; +#X obj 83 142 list prepend 0; +#X obj 83 188 s \$0-infoprint; +#X obj 122 380 s \$0load-info; +#X obj 147 400 s \$0save-info; +#X msg 223 64 0; +#X msg 262 64 1; +#X msg 392 66 2; +#X msg 353 65 0; +#X obj 353 88 t f; +#X obj 223 42 t b b b; +#X msg 242 151 loadbackend; +#X msg 372 156 savebackend; +#X obj 223 105 t a; +#X obj 156 261 fudiformat -u; +#X obj 188 305 fudiparse; +#X obj 83 165 route 0; +#X obj 122 209 list split 1; +#X obj 122 328 list append; +#X obj 122 351 route 1 2; +#X obj 156 284 list split 4; +#X obj 156 235 list trim; +#X connect 0 0 14 0; +#X connect 2 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 12 0; +#X connect 4 1 16 0; +#X connect 4 2 11 0; +#X connect 5 0 20 0; +#X connect 9 0 17 0; +#X connect 10 0 17 0; +#X connect 11 0 13 0; +#X connect 12 0 13 0; +#X connect 13 0 17 0; +#X connect 14 0 9 0; +#X connect 14 1 15 0; +#X connect 14 2 10 0; +#X connect 15 0 1 0; +#X connect 16 0 1 0; +#X connect 17 0 5 1; +#X connect 18 0 24 0; +#X connect 19 0 22 1; +#X connect 20 0 6 0; +#X connect 20 1 21 0; +#X connect 21 0 22 0; +#X connect 21 1 25 0; +#X connect 22 0 23 0; +#X connect 23 0 7 0; +#X connect 23 1 8 0; +#X connect 24 1 19 0; +#X connect 25 0 18 0; +#X restore 347 257 pd logic; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X restore 543 277 pd print; +#X obj 67 549 _backendinfo \$0save imagesaver; +#X obj 67 523 _backendinfo \$0load imageloader; +#X text 244 524 loading images; +#X text 244 551 saving images; #X connect 16 0 23 0; #X connect 18 0 23 0; -#X connect 23 0 17 0; +#X connect 23 0 37 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 28 0 23 0; #X connect 29 0 23 0; #X connect 32 0 23 0; #X connect 33 0 23 0; +#X connect 37 0 17 0; +#X connect 37 1 39 0; +#X connect 38 0 23 0; diff --git a/help/pix_buffer_read-help.pd b/help/pix_buffer_read-help.pd index 2566ed0c0..a3797a852 100644 --- a/help/pix_buffer_read-help.pd +++ b/help/pix_buffer_read-help.pd @@ -1,48 +1,20 @@ #N canvas 48 174 691 406 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 267 Inlets:; #X text 39 352 Outlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 549 329 pd gemwin; -#X msg 549 310 create; -#X text 545 289 Create window:; -#X obj 451 109 cnv 15 155 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 109 cnv 15 155 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 366 Outlet 1: gemlist; #X text 24 281 Inlet 1: gemlist; -#X obj 451 242 pix_texture; -#X floatatom 560 142 3 0 9 2 index - -; +#X floatatom 560 142 3 0 9 2 index - - 0; #X text 71 31 Class: pix object; #X text 64 237 list: ; #X text 440 363 see also:; @@ -50,26 +22,26 @@ #X text 50 12 Synopsis: [pix_buffer_read]; #X text 29 57 Description: read from a [pix_buffer]; #X obj 451 168 pix_buffer_read depot; -#X obj 451 271 translate -2 0 1 0; -#X obj 451 292 square 1.9; -#X text 24 295 Inlet 1: message: set : read from another -buffer.; -#X text 24 320 Inlet 2: int: index of the frame in the named pix_buffer -to read.; -#X text 11 79 [pix_buffer_read] reads an image from the named buffer -provided by [pix_buffer]. Specify the frame of the buffer you want -to read via the second inlet. If no frame is stored at the specified -index \, you will get no image. (eg: no texture will be applied). You -can change the buffer to read from on the fly via the [set( message. -; +#X obj 451 221 translate -2 0 1 0; +#X text 24 295 Inlet 1: message: set : read from another buffer.; +#X text 24 320 Inlet 2: int: index of the frame in the named pix_buffer to read.; +#X text 11 79 [pix_buffer_read] reads an image from the named buffer provided by [pix_buffer]. Specify the frame of the buffer you want to read via the second inlet. If no frame is stored at the specified index \, you will get no image. (eg: no texture will be applied). You can change the buffer to read from on the fly via the [set( message.; #X msg 464 138 set depot3; #X obj 508 362 pix_buffer depot3 1; -#X obj 548 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 25 0; -#X connect 17 0 26 0; -#X connect 18 0 25 1; -#X connect 25 0 17 0; -#X connect 26 0 27 0; -#X connect 31 0 25 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION read from a [pix_buffer]; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 548 295 _gemwin; +#X obj 451 242 _pix2rectangle 1.9; +#X connect 11 0 21 0; +#X connect 14 0 21 1; +#X connect 21 0 22 0; +#X connect 22 0 30 0; +#X connect 26 0 21 0; diff --git a/help/pix_buffer_write-help.pd b/help/pix_buffer_write-help.pd index 7e08da48d..380163a91 100644 --- a/help/pix_buffer_write-help.pd +++ b/help/pix_buffer_write-help.pd @@ -1,51 +1,22 @@ #N canvas 19 61 654 413 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 267 Inlets:; #X text 39 352 Outlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 536 293 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 541 332 pd gemwin; -#X msg 541 313 create; -#X text 537 292 Create window:; -#X obj 451 179 cnv 15 155 70 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 536 293 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 179 cnv 15 155 70 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 366 Outlet 1: gemlist; #X text 24 281 Inlet 1: gemlist; -#X obj 451 252 pix_texture; #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -64,37 +35,39 @@ #X text 523 114 macOS: quicktime; #X text 516 104 MS Windows: *.AVI; #X text 523 124 linux: depends...; -#X floatatom 560 196 3 0 9 2 index - -; +#X floatatom 560 196 3 0 9 2 index - - 0; #X text 50 12 Synopsis: [pix_buffer_write]; #X text 71 31 Class: pix object; #X obj 451 222 pix_buffer_write depot; #X text 24 320 Inlet 2: int: index in the named pix_buffer.; #X msg 464 192 set depot2; -#X text 11 79 [pix_buffer_write] writes an image into a named buffer -created by the [pix_buffer] object. When the index of the frame in -the buffer is passed via the second inlet to [pix_buffer_write] \, -the NEXT incoming image will be written to the buffer \, and the internal -state is reset. You have to re-set the index to write again.; +#X text 11 79 [pix_buffer_write] writes an image into a named buffer created by the [pix_buffer] object. When the index of the frame in the buffer is passed via the second inlet to [pix_buffer_write] \, the NEXT incoming image will be written to the buffer \, and the internal state is reset. You have to re-set the index to write again.; #X text 64 237 list: ; -#X text 24 295 Inlet 1: message: set : write to another -buffer.; +#X text 24 295 Inlet 1: message: set : write to another buffer.; #X text 440 363 see also:; #X obj 508 382 pix_buffer_read; #X obj 507 362 pix_buffer depot2 1; #X text 29 57 Description: write images to a [pix_buffer]; -#X obj 451 272 translate 2 0 1 0; -#X obj 451 292 square 1.9; -#X obj 548 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 18 0; -#X connect 17 0 40 0; -#X connect 18 0 30 0; -#X connect 18 2 19 0; -#X connect 19 0 18 1; -#X connect 20 0 21 0; -#X connect 21 0 18 0; -#X connect 27 0 30 1; -#X connect 30 0 17 0; -#X connect 32 0 30 0; -#X connect 40 0 41 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION write images to a [pix_buffer]; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 541 298 _gemwin; +#X obj 451 252 translate 2 0 1 0; +#X obj 451 272 _pix2rectangle 1.9; +#X connect 11 0 14 0; +#X connect 14 0 26 0; +#X connect 14 2 15 0; +#X connect 15 0 14 1; +#X connect 16 0 17 0; +#X connect 17 0 14 0; +#X connect 23 0 26 1; +#X connect 26 0 38 0; +#X connect 28 0 26 0; +#X connect 38 0 39 0; diff --git a/help/pix_chroma_key-help.pd b/help/pix_chroma_key-help.pd index 610f36e33..8c5c08893 100644 --- a/help/pix_chroma_key-help.pd +++ b/help/pix_chroma_key-help.pd @@ -10,35 +10,12 @@ #X obj 449 77 cnv 15 195 345 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 518 430 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 523 469 pd gemwin; -#X msg 523 450 create; -#X text 515 429 Create window:; #X obj 451 185 cnv 15 160 175 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 119 gemhead; #X obj 496 101 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; -#X obj 451 370 pix_texture; #X text 63 302 ; #X text 18 516 Outlet 1: gemlist; #X text 15 342 Inlet 1: gemlist; -#X obj 451 398 square 3; #X obj 580 120 gemhead; #X obj 625 102 bng 15 250 50 0 empty empty empty 20 8 0 8 #fcfcfc #000000 #000000; #X text 16 483 Inlet 2: gemlist; @@ -98,28 +75,36 @@ #X connect 9 0 5 0; #X connect 10 0 9 0; #X restore 580 139 pd image; -#X obj 508 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION mix 2 images based on their color; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist value range direction; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 508 8 pd META; #X obj 451 161 pix_rgba; #X obj 580 162 pix_rgba; #X text 511 155 or [pix_yuv], f 9; #X text 15 215 RGB values are 0-1 \, YUV values are 16/255-239/255. It is strongly advised to convert explicitly to your preferred colorspace before [pix_chroma_key] because the default colorspace is not guaranteed to be the same across operating systems (see [pix_rgba] or [pix_yuv]).; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 41 0; -#X connect 15 0 41 1; -#X connect 16 0 20 0; -#X connect 21 0 43 0; -#X connect 22 0 43 1; -#X connect 27 0 16 0; -#X connect 28 0 27 0; -#X connect 29 0 28 0; -#X connect 31 0 39 0; -#X connect 32 0 40 0; -#X connect 37 0 32 0; -#X connect 38 0 31 0; -#X connect 39 0 27 0; -#X connect 40 0 27 0; -#X connect 41 0 45 0; -#X connect 43 0 46 0; -#X connect 45 0 27 0; -#X connect 46 0 27 1; +#X obj 451 370 _pix2rectangle 3; +#X obj 526 436 _gemwin; +#X connect 11 0 36 0; +#X connect 12 0 36 1; +#X connect 16 0 38 0; +#X connect 17 0 38 1; +#X connect 22 0 44 0; +#X connect 23 0 22 0; +#X connect 24 0 23 0; +#X connect 26 0 34 0; +#X connect 27 0 35 0; +#X connect 32 0 27 0; +#X connect 33 0 26 0; +#X connect 34 0 22 0; +#X connect 35 0 22 0; +#X connect 36 0 40 0; +#X connect 38 0 41 0; +#X connect 40 0 22 0; +#X connect 41 0 22 1; diff --git a/help/pix_color-help.pd b/help/pix_color-help.pd index 75fe4c841..e88c501d8 100644 --- a/help/pix_color-help.pd +++ b/help/pix_color-help.pd @@ -1,60 +1,18 @@ #N canvas 6 61 630 343 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; @@ -62,24 +20,25 @@ #X text 29 76 Description: set the colour-channels of an image; #X msg 527 165 0 0.5 0.8; #X obj 451 196 pix_color; -#X obj 451 233 pix_draw; #X msg 458 164 1 0 0 1; -#X text 42 95 [pix_color] sets each pixel of an image to a certain -RGBA-value. As this is a pix_fx \, you will need an image first \, -to set its pixels to a certain value.; +#X text 42 95 [pix_color] sets each pixel of an image to a certain RGBA-value. As this is a pix_fx \, you will need an image first \, to set its pixels to a certain value.; #X text 63 275 Inlet 2: list: 3 (RGB) or 4 (RGBA) values; -#X text 29 133 Note that this is done by the CPU in the main-memory -of your machine \, while [color] is can be done very fast by your graphics-card. -Generally it is NOT a good idea to use [pix_color] if the same result -can be achieved with the [color] object !; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 23 0 24 1; -#X connect 24 0 25 0; -#X connect 26 0 24 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION set the colour-channels of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 524 259 _gemwin; +#X obj 451 113 pix_test; +#X text 29 133 Note that this is done by the CPU in the main-memory of your machine \, while [color] can be done very fast by your graphics-card. Generally it is NOT a good idea to use [pix_color] if the same result can be achieved with the [color] object !; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 25 0; +#X connect 18 0 19 1; +#X connect 19 0 27 0; +#X connect 20 0 19 1; +#X connect 25 0 19 0; diff --git a/help/pix_coloralpha-help.pd b/help/pix_coloralpha-help.pd index cb18ac82c..daafea3a8 100644 --- a/help/pix_coloralpha-help.pd +++ b/help/pix_coloralpha-help.pd @@ -1,91 +1,50 @@ -#N canvas 75 61 633 341 10; +#N canvas 443 230 633 358 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 520 218 cnv 15 90 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 525 257 pd gemwin; -#X msg 525 238 create; -#X text 521 218 Create window:; -#X obj 450 138 cnv 15 160 50 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 520 238 cnv 15 90 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 50 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 162 pix_coloralpha; -#X obj 451 196 pix_texture; -#X obj 451 240 square 3; -#X obj 451 218 alpha; -#X obj 452 265 gemhead 1; -#X obj 452 305 sphere; +#X obj 452 285 gemhead 1; +#X obj 452 325 sphere; #X text 50 12 Synopsis: [pix_coloralpha]; -#X text 19 76 Description: calculate the Alpha-channels from the RGB-data -; -#X text 28 102 [pix_coloralpha] will set the alpha-channel to be the -mean-value of the RGB-triple for each pixel.; -#X text 16 155 This of course \, makes only sense with RGBA-images. -; -#X obj 452 285 translate 2 0 0 -1; +#X text 19 76 Description: calculate the Alpha-channels from the RGB-data; +#X text 28 102 [pix_coloralpha] will set the alpha-channel to be the mean-value of the RGB-triple for each pixel.; +#X text 16 155 This of course \, makes only sense with RGBA-images.; #X text 63 275 Inlet 1: 1|0 : turn on/off (default:1); -#X obj 467 142 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 23 0; -#X connect 23 0 24 0; -#X connect 24 0 26 0; -#X connect 26 0 25 0; -#X connect 27 0 33 0; -#X connect 33 0 28 0; -#X connect 35 0 23 0; +#X obj 467 142 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION calculate the Alpha-channels from the RGB-data; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 244 _gemwin; +#X obj 451 113 pix_test; +#X obj 451 196 alpha; +#X obj 451 218 _pix2rectangle 3; +#X obj 452 305 translateXYZ 0 0 -2; +#X floatatom 457 256 5 -4 4 0 - - - 0; +#X connect 11 0 27 0; +#X connect 16 0 28 0; +#X connect 17 0 30 0; +#X connect 24 0 16 0; +#X connect 27 0 16 0; +#X connect 28 0 29 0; +#X connect 30 0 18 0; +#X connect 31 0 30 1; diff --git a/help/pix_colorclassify-help.pd b/help/pix_colorclassify-help.pd index 3e236fbd1..72f43893e 100644 --- a/help/pix_colorclassify-help.pd +++ b/help/pix_colorclassify-help.pd @@ -1,47 +1,19 @@ #N canvas 117 177 635 396 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 39 246 Outlets:; -#X obj 8 158 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 158 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 157 Arguments:; -#X obj 8 76 cnv 15 430 75 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 75 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,37 +27,34 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 168 ; -#X obj 451 255 square 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X text 29 77 Description: detects color classes in an image; -#X obj 8 324 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 324 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 16 323 See Also:; #X text 62 334 examples/04.video/08.color_detection.pd; #X text 56 212 Inlet 1: gemlist \, RGBA image; -#X text 57 232 Inlet 2: whether to output unreliable guesses (todo) -; -#X text 57 259 Outlet 1: gemlist \, RGBA image with encoded color class -representatives for each pixel: red [1 0 0] \, green [0 1 0] \, blue -[0 0 1] \, yellow [1 1 0] \, black [0 0 0] \, white [1 1 1] \, unsure -[154/255 \, 115/255 \, 86/255]; +#X text 57 232 Inlet 2: whether to output unreliable guesses (todo); +#X text 57 259 Outlet 1: gemlist \, RGBA image with encoded color class representatives for each pixel: red [1 0 0] \, green [0 1 0] \, blue [0 0 1] \, yellow [1 1 0] \, black [0 0 0] \, white [1 1 1] \, unsure [154/255 \, 115/255 \, 86/255]; #X obj 451 180 pix_colorclassify; -#X text 16 357 Author: Ricardo Fabbri labmacambira.sf.net rfabbri at -gmail; -#X text 42 95 [pix_colorclassify] will detect colors in a pixImage -\, classifying each pixel into 6 classes: red \, green \, blue \, yellow -\, black \, white \, or 'uncertain'. It will only detect a color if -it is unambiguous.; +#X text 16 357 Author: Ricardo Fabbri labmacambira.sf.net rfabbri at gmail; +#X text 42 95 [pix_colorclassify] will detect colors in a pixImage \, classifying each pixel into 6 classes: red \, green \, blue \, yellow \, black \, white \, or 'uncertain'. It will only detect a color if it is unambiguous.; #X text 50 12 Synopsis: [pix_colorclassify]; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 30 0; -#X connect 18 0 20 0; -#X connect 30 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION detects color classes in an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist RGBA; +#X text 20 105 INLET_1 bool; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 258 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 25 0; +#X connect 25 0 31 0; #X coords 0 0 1 1 85 60 0; diff --git a/help/pix_colormatrix-help.pd b/help/pix_colormatrix-help.pd index d143db80b..ca8f2f73f 100644 --- a/help/pix_colormatrix-help.pd +++ b/help/pix_colormatrix-help.pd @@ -1,75 +1,26 @@ -#N canvas 76 273 636 411 10; +#N canvas 409 270 636 411 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 295 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 295 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 298 Inlets:; #X text 38 355 Outlets:; -#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 255 Arguments:; -#X obj 7 76 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 443 77 cnv 15 180 310 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 443 77 cnv 15 180 310 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 314 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 353 pd gemwin; -#X msg 519 334 create; -#X text 515 313 Create window:; -#X obj 450 138 cnv 15 160 150 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 314 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 150 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 266 ; #X text 56 368 Outlet 1: gemlist; #X text 63 312 Inlet 1: gemlist; -#X obj 451 293 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_colormatrix]; #X text 29 76 Description: transform the pixel values by a matrix; -#X text 63 325 Inlet 2: list: 9 (RGB) or 16 (RGBA) values \, forming -a matrix.; -#X text 12 94 pix_colormatrix transforms the pixel values by a matrix. -The matrix can be either a 3x3 or a 4x4. If the matrix is a 3x3 \, -then the alpha is set to 1; -#X text 12 135 See the HTML file from Paul Haberli for example matrices. -; +#X text 63 325 Inlet 2: list: 9 (RGB) or 16 (RGBA) values \, forming a matrix.; +#X text 12 94 pix_colormatrix transforms the pixel values by a matrix. The matrix can be either a 3x3 or a 4x4. If the matrix is a 3x3 \, then the alpha is set to 1; +#X text 12 135 See the HTML file from Paul Haberli for example matrices.; #X text 135 159 the matrix; #X text 194 226 r g b a; #X text 194 211 r g b a; @@ -79,82 +30,133 @@ then the alpha is set to 1; #X text 93 204 r g b; #X text 94 221 r g b; #X obj 451 266 pix_colormatrix; -#X floatatom 495 165 3 -1 2 0 - - -; -#X floatatom 518 165 3 -1 2 0 - - -; -#X floatatom 541 165 3 -1 2 0 - - -; -#X floatatom 495 189 3 -1 2 0 - - -; -#X floatatom 518 189 3 -1 2 0 - - -; -#X floatatom 541 189 3 -1 2 0 - - -; -#X floatatom 495 213 3 -1 2 0 - - -; -#X floatatom 518 213 3 -1 2 0 - - -; -#X floatatom 541 213 3 -1 2 0 - - -; -#N canvas 0 0 450 300 pack 0; -#X obj 69 169 pack 0 0 0 0 0 0 0 0 0; -#X obj 69 139 t b f; -#X obj 106 139 t b f; -#X obj 143 139 t b f; -#X obj 180 139 t b f; -#X obj 217 139 t b f; -#X obj 254 139 t b f; -#X obj 291 139 t b f; -#X obj 328 139 t b f; -#X obj 32 111 inlet; -#X obj 69 111 inlet; -#X obj 106 111 inlet; -#X obj 143 111 inlet; -#X obj 180 111 inlet; -#X obj 217 111 inlet; -#X obj 254 111 inlet; -#X obj 291 111 inlet; -#X obj 328 111 inlet; -#X obj 69 196 outlet; -#X connect 0 0 18 0; -#X connect 1 0 0 0; -#X connect 1 1 0 1; -#X connect 2 0 0 0; -#X connect 2 1 0 2; -#X connect 3 0 0 0; -#X connect 3 1 0 3; -#X connect 4 0 0 0; -#X connect 4 1 0 4; -#X connect 5 0 0 0; -#X connect 5 1 0 5; -#X connect 6 0 0 0; -#X connect 6 1 0 6; -#X connect 7 0 0 0; -#X connect 7 1 0 7; -#X connect 8 0 0 0; -#X connect 8 1 0 8; -#X connect 9 0 0 0; -#X connect 10 0 1 0; -#X connect 11 0 2 0; -#X connect 12 0 3 0; -#X connect 13 0 4 0; -#X connect 14 0 5 0; -#X connect 15 0 6 0; -#X connect 16 0 7 0; -#X connect 17 0 8 0; -#X restore 474 236 pd pack 9 . . .; -#X msg 471 164 1; -#X obj 471 145 loadbang; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 37 0; -#X connect 37 0 21 0; -#X connect 38 0 47 0; -#X connect 39 0 47 1; -#X connect 40 0 47 2; -#X connect 41 0 47 3; -#X connect 42 0 47 4; -#X connect 43 0 47 5; -#X connect 44 0 47 6; -#X connect 45 0 47 7; -#X connect 46 0 47 8; -#X connect 47 0 37 1; -#X connect 48 0 38 0; -#X connect 48 0 42 0; -#X connect 48 0 46 0; -#X connect 49 0 48 0; +#X floatatom 495 145 3 -1 2 0 - \$0-1/1 \$0-1/1- 0; +#X floatatom 518 145 3 -1 2 0 - \$0-2/1 \$0-2/1- 0; +#X floatatom 541 145 3 -1 2 0 - \$0-3/1 \$0-3/1- 0; +#X floatatom 495 165 3 -1 2 0 - \$0-1/2 \$0-1/2- 0; +#X floatatom 518 165 3 -1 2 0 - \$0-2/2 \$0-2/2- 0; +#X floatatom 541 165 3 -1 2 0 - \$0-3/2 \$0-3/2- 0; +#X floatatom 495 185 3 -1 2 0 - \$0-1/3 \$0-1/3- 0; +#X floatatom 518 185 3 -1 2 0 - \$0-2/3 \$0-2/3- 0; +#X floatatom 541 185 3 -1 2 0 - \$0-3/3 \$0-3/3- 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION transform the pixel values by a matrix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 317 _gemwin; +#X obj 451 293 _pix2rectangle 3; +#X obj 451 113 pix_test; +#N canvas 1221 289 450 576 init 1; +#X obj 76 108 unpack 0 0 0 0 0 0 0 0 0; +#X obj 76 131 s \$0-1/1; +#X obj 76 151 s \$0-1/2; +#X obj 76 171 s \$0-1/3; +#X obj 136 131 s \$0-2/1; +#X obj 136 151 s \$0-2/2; +#X obj 136 171 s \$0-2/3; +#X obj 196 131 s \$0-3/1; +#X obj 196 151 s \$0-3/2; +#X obj 196 171 s \$0-3/3; +#X msg 76 49 1 0 0 0 1 0 0 0 1; +#X obj 19 485 outlet; +#X obj 26 200 r \$0-1/1-; +#X obj 26 252 r \$0-1/2-; +#X obj 26 301 r \$0-1/3-; +#X obj 86 200 r \$0-2/1-; +#X obj 86 251 r \$0-2/2-; +#X obj 86 301 r \$0-2/3-; +#X obj 146 200 r \$0-3/1-; +#X obj 146 251 r \$0-3/2-; +#X obj 146 301 r \$0-3/3-; +#X obj 19 356 t b; +#X obj 26 223 t a a; +#X obj 26 275 t a a; +#X obj 26 324 t a a; +#X obj 86 223 t a a; +#X obj 86 274 t a a; +#X obj 86 324 t a a; +#X obj 146 223 t a a; +#X obj 146 274 t a a; +#X obj 146 324 t a a; +#X obj 270 60 inlet preset; +#X obj 76 27 loadbang; +#X msg 84 74 0 0 1 0 1 0 1 0 0; +#X msg 275 123 1 3; +#X obj 275 146 /; +#X msg 275 169 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1; +#X obj 19 430 route 0; +#X obj 19 407 pack 0 0 0 0 0 0 0 0 0 0; +#X obj 270 83 select 0 1 2 3 4 5; +#X msg 272 196 1 1 1 0 0 0 0 0 0; +#X msg 272 226 0 0 0 1 1 1 0 0 0; +#X msg 273 256 0 0 0 0 0 0 1 1 1; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 0 2 3 0; +#X connect 0 3 4 0; +#X connect 0 4 5 0; +#X connect 0 5 6 0; +#X connect 0 6 7 0; +#X connect 0 7 8 0; +#X connect 0 8 9 0; +#X connect 10 0 0 0; +#X connect 12 0 22 0; +#X connect 13 0 23 0; +#X connect 14 0 24 0; +#X connect 15 0 25 0; +#X connect 16 0 26 0; +#X connect 17 0 27 0; +#X connect 18 0 28 0; +#X connect 19 0 29 0; +#X connect 20 0 30 0; +#X connect 21 0 38 0; +#X connect 22 0 21 0; +#X connect 22 1 38 1; +#X connect 23 0 21 0; +#X connect 23 1 38 2; +#X connect 24 0 21 0; +#X connect 24 1 38 3; +#X connect 25 0 21 0; +#X connect 25 1 38 4; +#X connect 26 0 21 0; +#X connect 26 1 38 5; +#X connect 27 0 21 0; +#X connect 27 1 38 6; +#X connect 28 0 21 0; +#X connect 28 1 38 7; +#X connect 29 0 21 0; +#X connect 29 1 38 8; +#X connect 30 0 21 0; +#X connect 30 1 38 9; +#X connect 31 0 39 0; +#X connect 32 0 10 0; +#X connect 33 0 0 0; +#X connect 34 0 35 0; +#X connect 35 0 36 0; +#X connect 36 0 0 0; +#X connect 37 0 11 0; +#X connect 38 0 37 0; +#X connect 39 0 10 0; +#X connect 39 1 33 0; +#X connect 39 2 34 0; +#X connect 39 3 40 0; +#X connect 39 4 41 0; +#X connect 39 5 42 0; +#X connect 40 0 0 0; +#X connect 41 0 0 0; +#X connect 42 0 0 0; +#X restore 456 208 pd init; +#X obj 508 208 hradio 18 1 0 6 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0; +#X listbox 456 231 20 0 0 0 - - - 0; +#X connect 11 0 42 0; +#X connect 29 0 41 0; +#X connect 42 0 29 0; +#X connect 43 0 45 0; +#X connect 44 0 43 0; +#X connect 45 0 29 1; diff --git a/help/pix_colorreduce-help.pd b/help/pix_colorreduce-help.pd index 890b2cf45..4edbc056c 100644 --- a/help/pix_colorreduce-help.pd +++ b/help/pix_colorreduce-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 631 342 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 39 282 Outlets:; -#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 75 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 75 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,34 +27,39 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 166 ; #X text 57 295 Outlet 1: gemlist; #X text 63 212 Inlet 1: gemlist; #X obj 451 196 pix_colorreduce; #X text 50 12 Synopsis: [pix_colorreduce]; -#X text 29 77 Description: reduce the number of colour in the image -; -#X text 42 95 [pix_colorreduce] will reduce the number of colours in -a pixImage \, based on statistical information of the image.; +#X text 29 77 Description: reduce the number of colour in the image; +#X text 42 95 [pix_colorreduce] will reduce the number of colours in a pixImage \, based on statistical information of the image.; #X text 64 232 Inlet 2: float: number of colours; #X text 64 247 Inlet 3: float: persistency of the palette; #X text 64 262 Inlet 4: float: edge smoothing; -#X floatatom 464 178 5 0 255 2 number - -; -#X floatatom 516 178 5 0 1 2 persist - -; -#X obj 451 255 square 3; -#X obj 569 176 tgl 15 0 empty empty smooth 0 -6 0 8 -262144 -1 -1 0 -1; +#X floatatom 464 178 5 0 255 2 number - - 0; +#X floatatom 516 178 5 0 1 2 persist - - 0; +#X obj 569 176 tgl 15 0 empty empty smooth 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 22 0; -#X connect 18 0 31 0; -#X connect 22 0 18 0; -#X connect 29 0 22 1; -#X connect 30 0 22 2; -#X connect 32 0 22 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION reduce the number of colour in the image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 258 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 18 0; +#X connect 18 0 32 0; +#X connect 25 0 18 1; +#X connect 26 0 18 2; +#X connect 27 0 18 3; diff --git a/help/pix_compare-help.pd b/help/pix_compare-help.pd index e1c2f6ae9..771ecda4b 100644 --- a/help/pix_compare-help.pd +++ b/help/pix_compare-help.pd @@ -1,47 +1,19 @@ #N canvas 69 186 628 389 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 228 Inlets:; #X text 39 294 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 66 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 66 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 49 Example:; -#X obj 514 279 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 318 pd gemwin; -#X msg 519 299 create; -#X text 515 278 Create window:; -#X obj 451 157 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 279 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 157 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 112 gemhead; #X text 71 31 Class: pix object; -#X obj 496 95 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 95 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,11 +27,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 131 pd image; -#X obj 451 252 pix_texture; #X text 63 196 ; #X text 47 308 Outlet 1: gemlist; #X text 53 242 Inlet 1: gemlist; -#X obj 451 274 square 3; #X text 503 77 (JPEG \, TIFF \, ..); #X obj 541 115 gemhead; #N canvas 0 22 587 366 image 0; @@ -75,37 +45,37 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 541 134 pd image; -#X obj 586 96 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 586 96 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X msg 491 185 direction \$1; -#X obj 491 167 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 491 167 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 50 12 Synopsis: [pix_compare]; #X text 29 67 Description: mix 2 images based on their luminance; #X text 53 281 Inlet 2: gemlist; #X obj 451 215 pix_compare; -#X text 53 254 Inlet 1: message: direction [0|1]: take lower or higher(default) -valued pixel; +#X text 53 254 Inlet 1: message: direction [0|1]: take lower or higher(default) valued pixel; #X text 449 66 open two different images; -#X text 18 81 [pix_compare] compares two images pixel by pixel and -outputs a composite image. [pix_compare] can do a greater than comparison -where a brighter pixel in the right stream will replace the corresponding -pixel in the left stream or the comparison can be reversed and the -dimmer pixel can be replaced. this operation works best using YUV but -can also be effective in RGB.; +#X text 18 81 [pix_compare] compares two images pixel by pixel and outputs a composite image. [pix_compare] can do a greater than comparison where a brighter pixel in the right stream will replace the corresponding pixel in the left stream or the comparison can be reversed and the dimmer pixel can be replaced. this operation works best using YUV but can also be effective in RGB.; #X text 33 354 see also:; #X obj 99 355 pix_diff; #X obj 159 355 pix_subtract; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 32 0; -#X connect 18 0 22 0; -#X connect 24 0 25 0; -#X connect 25 0 32 1; -#X connect 26 0 25 1; -#X connect 27 0 32 0; -#X connect 28 0 27 0; -#X connect 32 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION mix 2 images based on their luminance; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist direction; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 252 _pix2rectangle 3; +#X obj 521 283 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 27 0; +#X connect 19 0 20 0; +#X connect 20 0 27 1; +#X connect 21 0 20 1; +#X connect 22 0 27 0; +#X connect 23 0 22 0; +#X connect 27 0 35 0; diff --git a/help/pix_composite-help.pd b/help/pix_composite-help.pd index 661d21ce9..cc280c4c3 100644 --- a/help/pix_composite-help.pd +++ b/help/pix_composite-help.pd @@ -1,46 +1,18 @@ #N canvas 6 252 639 381 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 39 304 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; -#X obj 451 208 cnv 15 160 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 208 cnv 15 160 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 122 gemhead; -#X obj 496 105 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 105 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -54,11 +26,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 141 pd image; -#X obj 451 263 pix_texture; #X text 63 196 ; #X text 47 318 Outlet 1: gemlist; #X text 53 262 Inlet 1: gemlist; -#X obj 451 285 square 3; #X text 503 88 (JPEG \, TIFF \, ..); #X obj 547 122 gemhead; #N canvas 0 0 587 366 image 0; @@ -74,8 +44,7 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 547 141 pd image; -#X obj 592 105 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 592 105 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 53 291 Inlet 2: gemlist; #X text 449 77 open two different images; #X text 71 31 Class: pix mix object; @@ -83,18 +52,25 @@ #X obj 451 218 pix_composite; #X text 50 12 Synopsis: [pix_composite]; #X text 29 67 Description: alpha-blend 2 images; -#X text 13 84 [pix_composite] mixes two pixes together based on the -alpha value of the 1st pix.; +#X text 13 84 [pix_composite] mixes two pixes together based on the alpha value of the 1st pix.; #X obj 451 166 pix_coloralpha; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 34 0; -#X connect 17 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 30 1; -#X connect 25 0 24 1; -#X connect 30 0 17 0; -#X connect 34 0 30 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION alpha-blend 2 images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 295 _gemwin; +#X obj 451 263 _pix2rectangle 3; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 29 0; +#X connect 18 0 19 0; +#X connect 19 0 25 1; +#X connect 20 0 19 1; +#X connect 25 0 32 0; +#X connect 29 0 25 0; diff --git a/help/pix_contrast-help.pd b/help/pix_contrast-help.pd index f4ee19fb4..c83ca2a48 100644 --- a/help/pix_contrast-help.pd +++ b/help/pix_contrast-help.pd @@ -1,47 +1,19 @@ #N canvas 59 276 630 345 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 225 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 225 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 232 Inlets:; #X text 38 295 Outlets:; -#X obj 8 184 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 184 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 183 Arguments:; -#X obj 7 76 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,28 +30,33 @@ #X text 63 194 [ []]; #X text 56 308 Outlet 1: gemlist; #X text 63 246 Inlet 1: gemlist; -#X obj 451 233 pix_draw; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 196 pix_contrast; #X text 50 12 Synopsis: [pix_contrast]; -#X text 29 76 Description: change contrast and saturation of an image -; -#X text 17 97 [pix_contrast] will modify the contrast and saturation -of an image. When processing greyscale images \, only the contrast -can be modified (since there is no hue); -#X floatatom 490 148 5 0 10 1 contrast - -; -#X floatatom 530 175 5 0 0 0 saturation - -; -#X text 21 141 A contrast (or saturation) of "1" will not change the -image. Both contrast and saturation modifiers must be >=0!; +#X text 29 76 Description: change contrast and saturation of an image; +#X text 17 97 [pix_contrast] will modify the contrast and saturation of an image. When processing greyscale images \, only the contrast can be modified (since there is no hue); +#X floatatom 490 148 5 0 10 1 contrast - - 0; +#X floatatom 530 175 5 0 0 0 saturation - - 0; +#X text 21 141 A contrast (or saturation) of "1" will not change the image. Both contrast and saturation modifiers must be >=0!; #X text 63 261 Inlet 2: float: contrast (>=0. default:1); #X text 63 274 Inlet 3: float: saturation (>=0. default:1); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 24 0 21 0; -#X connect 28 0 24 1; -#X connect 29 0 24 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION change contrast and saturation of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 233 _pix2rectangle 3; +#X obj 520 263 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 20 0; +#X connect 20 0 30 0; +#X connect 24 0 20 1; +#X connect 25 0 20 2; diff --git a/help/pix_convert-help.pd b/help/pix_convert-help.pd index 317d82954..cc37b64ca 100644 --- a/help/pix_convert-help.pd +++ b/help/pix_convert-help.pd @@ -1,80 +1,27 @@ #N canvas 473 61 629 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 135 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 135 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X obj 77 290 pix_buf; -#X msg 99 267 auto 1; -#X obj 99 246 loadbang; -#X connect 0 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X connect 6 0 1 0; -#X connect 7 0 6 0; -#X connect 8 0 7 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X text 22 93 Images can be stored in various formats/color-spaces. -; +#X text 22 93 Images can be stored in various formats/color-spaces.; #X text 62 339 see also:; #X obj 205 338 pix_yuv; #X obj 138 338 pix_grey; -#X text 22 107 GREY-scale images have no color-component \, while YUV -is missing the Alpha-channel.; -#X text 19 133 Traditionally \, RGBA is the native colour-space of -Gem \, although it is quite CPU-consumptive.; +#X text 22 107 GREY-scale images have no color-component \, while YUV is missing the Alpha-channel.; +#X text 19 133 Traditionally \, RGBA is the native colour-space of Gem \, although it is quite CPU-consumptive.; #X obj 451 206 pix_convert; #X msg 477 183 color \$1; #X obj 477 163 symbol; @@ -84,22 +31,25 @@ Gem \, although it is quite CPU-consumptive.; #X text 50 12 Synopsis: [pix_convert]; #X text 15 77 Description: convert the colorspace of an image; #X obj 265 338 pix_rgba; -#X text 63 276 Inlet 1: color :: colorspace to convert to -; -#X text 19 159 You can use [pix_convert] to convert images of any format -into a format you can choose.; -#X obj 451 233 pix_texture; -#X obj 451 256 square 3; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 29 0; -#X connect 29 0 40 0; -#X connect 30 0 29 0; -#X connect 31 0 30 0; -#X connect 32 0 31 0; -#X connect 33 0 31 0; -#X connect 34 0 31 0; -#X connect 40 0 41 0; +#X text 63 276 Inlet 1: color :: colorspace to convert to; +#X text 19 159 You can use [pix_convert] to convert images of any format into a format you can choose.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert the colorspace of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist color; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 233 _pix2rectangle 3; +#X obj 451 113 pix_test; +#X obj 521 260 _gemwin; +#X connect 11 0 35 0; +#X connect 22 0 34 0; +#X connect 23 0 22 0; +#X connect 24 0 23 0; +#X connect 25 0 24 0; +#X connect 26 0 24 0; +#X connect 27 0 24 0; +#X connect 35 0 22 0; diff --git a/help/pix_convolve-help.pd b/help/pix_convolve-help.pd index 3ad2fbfd0..c9174ff9d 100644 --- a/help/pix_convolve-help.pd +++ b/help/pix_convolve-help.pd @@ -1,81 +1,33 @@ #N canvas 105 476 635 410 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 295 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 295 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 298 Inlets:; #X text 38 355 Outlets:; -#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 255 Arguments:; -#X obj 7 76 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 443 77 cnv 15 180 310 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 443 77 cnv 15 180 310 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 314 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 353 pd gemwin; -#X msg 519 334 create; -#X text 515 313 Create window:; -#X obj 450 138 cnv 15 160 150 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 314 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 150 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 71 31 Class: pix object; #X text 56 368 Outlet 1: gemlist; #X text 63 312 Inlet 1: gemlist; #X text 50 12 Synopsis: [pix_convolve]; #X text 29 76 Description: apply a convolution kernel; -#X text 20 95 pix_convolve accepts a convolution kernel to apply to -a pix. The scale is a divisor for the result (to normal the matrix). -The default is 1.0.; -#X obj 489 183 cnv 15 100 40 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X text 20 95 pix_convolve accepts a convolution kernel to apply to a pix. The scale is a divisor for the result (to normal the matrix). The default is 1.0.; +#X obj 489 183 cnv 15 100 40 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 451 84 gemhead; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; -#X obj 451 293 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X floatatom 505 182 3 -1 2 0 - - -; -#X floatatom 528 182 3 -1 2 0 - - -; -#X floatatom 551 182 3 -1 2 0 - - -; -#X floatatom 505 196 3 -1 2 0 - - -; -#X floatatom 528 196 3 -1 2 0 - - -; -#X floatatom 551 196 3 -1 2 0 - - -; -#X floatatom 505 210 3 -1 2 0 - - -; -#X floatatom 528 210 3 -1 2 0 - - -; -#X floatatom 551 210 3 -1 2 0 - - -; +#X floatatom 505 182 3 -1 2 0 - - - 0; +#X floatatom 528 182 3 -1 2 0 - - - 0; +#X floatatom 551 182 3 -1 2 0 - - - 0; +#X floatatom 505 196 3 -1 2 0 - - - 0; +#X floatatom 528 196 3 -1 2 0 - - - 0; +#X floatatom 551 196 3 -1 2 0 - - - 0; +#X floatatom 505 210 3 -1 2 0 - - - 0; +#X floatatom 528 210 3 -1 2 0 - - - 0; +#X floatatom 551 210 3 -1 2 0 - - - 0; #N canvas 0 0 450 469 pack 0; #X obj 69 169 pack 0 0 0 0 0 0 0 0 0; #X obj 69 139 t b f; @@ -163,7 +115,7 @@ The default is 1.0.; #X connect 33 0 32 0; #X restore 484 224 pd pack 9 . . .; #X obj 451 266 pix_convolve 3 3; -#X floatatom 484 249 5 0 0 1 scale - -; +#X floatatom 484 249 5 0 0 1 scale - - 0; #N canvas 411 476 605 305 unpack 0; #X obj 60 270 outlet; #X obj 111 270 outlet; @@ -206,40 +158,47 @@ The default is 1.0.; #X msg 493 142 smooth; #X text 63 325 Inlet 2: : scale-factor; #X text 63 338 Inlet 2: list: the convolution-kernel; -#X text 20 144 The matrix must have the same size as the arguments -(in this instance \, a 3 x 3 matrix) \, and is given as a single list -of the matrix-values row after row.; +#X text 20 144 The matrix must have the same size as the arguments (in this instance \, a 3 x 3 matrix) \, and is given as a single list of the matrix-values row after row.; #X text 63 266 : matrix dimensions; #X text 28 190 Currently \, only square matrices are supported.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 21 0 23 0; -#X connect 22 0 23 1; -#X connect 23 0 37 0; -#X connect 27 0 36 0; -#X connect 28 0 36 1; -#X connect 29 0 36 2; -#X connect 30 0 36 3; -#X connect 31 0 36 4; -#X connect 32 0 36 5; -#X connect 33 0 36 6; -#X connect 34 0 36 7; -#X connect 35 0 36 8; -#X connect 36 0 38 0; -#X connect 36 1 37 2; -#X connect 37 0 24 0; -#X connect 38 0 37 1; -#X connect 39 0 27 0; -#X connect 39 1 28 0; -#X connect 39 2 29 0; -#X connect 39 3 30 0; -#X connect 39 4 31 0; -#X connect 39 5 32 0; -#X connect 39 6 33 0; -#X connect 39 7 34 0; -#X connect 39 8 35 0; -#X connect 40 0 39 0; -#X connect 41 0 39 0; -#X connect 42 0 39 0; -#X connect 43 0 39 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply a convolution kernel; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 523 318 _gemwin; +#X obj 451 293 _pix2rectangle 3; +#X obj 451 113 pix_test; +#X connect 18 0 44 0; +#X connect 19 0 28 0; +#X connect 20 0 28 1; +#X connect 21 0 28 2; +#X connect 22 0 28 3; +#X connect 23 0 28 4; +#X connect 24 0 28 5; +#X connect 25 0 28 6; +#X connect 26 0 28 7; +#X connect 27 0 28 8; +#X connect 28 0 30 0; +#X connect 28 1 29 2; +#X connect 29 0 43 0; +#X connect 30 0 29 1; +#X connect 31 0 19 0; +#X connect 31 1 20 0; +#X connect 31 2 21 0; +#X connect 31 3 22 0; +#X connect 31 4 23 0; +#X connect 31 5 24 0; +#X connect 31 6 25 0; +#X connect 31 7 26 0; +#X connect 31 8 27 0; +#X connect 32 0 31 0; +#X connect 33 0 31 0; +#X connect 34 0 31 0; +#X connect 35 0 31 0; +#X connect 44 0 29 0; diff --git a/help/pix_coordinate-help.pd b/help/pix_coordinate-help.pd index ad5af861c..aef4d94ed 100644 --- a/help/pix_coordinate-help.pd +++ b/help/pix_coordinate-help.pd @@ -1,100 +1,51 @@ #N canvas 395 396 626 458 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 335 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 335 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 338 Inlets:; #X text 38 385 Outlets:; -#X obj 8 296 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 296 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 295 Arguments:; -#X obj 7 76 cnv 15 430 210 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 474 344 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 479 383 pd gemwin; -#X msg 479 364 create; -#X text 475 343 Create window:; -#X obj 450 188 cnv 15 160 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 474 344 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 188 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 22 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 306 ; #X text 56 398 Outlet 1: gemlist; #X text 63 352 Inlet 1: gemlist; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 296 square 3; #X text 50 12 Synopsis: [pix_coordinate]; #X text 13 76 Description: set the texture-coordinates for a pix; -#X text 34 94 pix_coordinate remaps the S \, T texture values from -the default values. For instance \, a texture could repeat by increasing -the texture S \, T values from 1 \, 1 to 2 \, 2 (See the examples). -; +#X text 34 94 pix_coordinate remaps the S \, T texture values from the default values. For instance \, a texture could repeat by increasing the texture S \, T values from 1 \, 1 to 2 \, 2 (See the examples).; #X text 63 367 Inlet 2: list: 8 values (4 (s \, t)-pairs); -#X obj 538 144 loadbang; #X msg 461 237 \$1 \$1 0 \$1 0 0 \$1 0; -#X floatatom 461 220 3 0 256 0 - - -; -#X obj 451 136 pix_texture; -#X text 14 159 IMPORTANT NOTE-1: [pix_texture] sets the texture-coordinates -to "appropriate" values \, so you probably want to use [pix_coordinate] -afterwards; -#X obj 10 201 cnv 15 420 45 empty empty empty 20 12 0 14 -225280 -66577 -0; +#X floatatom 461 220 3 0 256 0 - - - 0; +#X text 14 159 IMPORTANT NOTE-1: [pix_texture] sets the texture-coordinates to "appropriate" values \, so you probably want to use [pix_coordinate] afterwards; +#X obj 10 201 cnv 15 420 45 empty empty empty 20 12 0 14 #d8fcfc #404040 0; #X obj 451 266 pix_coordinate; #X msg 459 193 0 0 1 0 1 1 0 1; -#X msg 468 167 rectangle 0 \, repeat 1; -#X text 14 248 IMPORTANT NOTE-3: Images with dimensions that are not -powers-of-2 \, will not "repeat" properly in any case., f 60; -#X text 14 203 IMPORTANT NOTE-2: if your hardware supports it \, Gem -tries to use "rectangle-texturing"\\\, which does not support "repeat" -mode. This is an OpenGL limitation; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 31 0; -#X connect 28 0 36 0; -#X connect 29 0 34 1; -#X connect 30 0 29 0; -#X connect 31 0 34 0; -#X connect 34 0 23 0; -#X connect 35 0 34 1; -#X connect 36 0 31 0; +#X text 14 248 IMPORTANT NOTE-3: Images with dimensions that are not powers-of-2 \, will not "repeat" properly in any case., f 60; +#X text 14 203 IMPORTANT NOTE-2: if your hardware supports it \, Gem tries to use "rectangle-texturing"\\\, which does not support "repeat" mode. This is an OpenGL limitation; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION set the texture-coordinates for a pix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 113 pix_test; +#X obj 451 136 pix_texture \; rectangle 0 \; repeat 1; +#X obj 479 350 _gemwin; +#X connect 11 0 30 0; +#X connect 21 0 25 1; +#X connect 22 0 21 0; +#X connect 25 0 16 0; +#X connect 26 0 25 1; +#X connect 30 0 31 0; +#X connect 31 0 25 0; diff --git a/help/pix_crop-help.pd b/help/pix_crop-help.pd index 83cd98d51..e22e9c87f 100644 --- a/help/pix_crop-help.pd +++ b/help/pix_crop-help.pd @@ -1,90 +1,53 @@ #N canvas 6 61 624 360 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 146 cnv 15 165 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 146 cnv 15 165 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 57 323 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 451 255 square 3; #X obj 451 196 pix_crop; #X text 63 245 Inlet 2: float: dimenX; #X text 63 258 Inlet 3: float: dimenY; #X text 63 273 Inlet 4: float: offsetX; #X text 63 284 Inlet 5: float: offsetY; #X text 50 12 Synopsis: [pix_crop]; -#X floatatom 463 160 5 0 0 1 dimX - -; -#X floatatom 476 177 5 0 0 1 dimY - -; -#X floatatom 543 160 5 0 0 1 offX - -; -#X floatatom 556 177 5 0 0 1 offY - -; +#X floatatom 463 160 5 0 0 1 dimX - - 0; +#X floatatom 476 177 5 0 0 1 dimY - - 0; +#X floatatom 543 160 5 0 0 1 offX - - 0; +#X floatatom 556 177 5 0 0 1 offY - - 0; #X text 29 77 Description: get a subimage of an image; -#X text 12 91 [pix_crop]: only passes the selected rectangle further -on. The selection is made by the dimension of the subimage in pixels -and the offset (in pixels) from the lower left corner.; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 23 0; -#X connect 18 0 22 0; -#X connect 23 0 18 0; -#X connect 29 0 23 1; -#X connect 30 0 23 2; -#X connect 31 0 23 3; -#X connect 32 0 23 4; +#X text 12 91 [pix_crop]: only passes the selected rectangle further on. The selection is made by the dimension of the subimage in pixels and the offset (in pixels) from the lower left corner.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION get a subimage of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 233 _pix2rectangle 3; +#X obj 521 261 _gemwin; +#X obj 451 113 pix_test; +#X connect 11 0 31 0; +#X connect 16 0 29 0; +#X connect 22 0 16 1; +#X connect 23 0 16 2; +#X connect 24 0 16 3; +#X connect 25 0 16 4; +#X connect 31 0 16 0; diff --git a/help/pix_curve-help.pd b/help/pix_curve-help.pd index 2c1227c3f..a656c751d 100644 --- a/help/pix_curve-help.pd +++ b/help/pix_curve-help.pd @@ -1,47 +1,19 @@ #N canvas 6 321 733 553 10; #X declare -lib Gem; #X text 542 8 GEM object; -#X obj 8 386 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 386 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 388 Inlets:; #X text 38 495 Outlets:; -#X obj 8 306 cnv 15 430 60 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 306 cnv 15 430 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 47 305 Arguments:; -#X obj 7 76 cnv 15 430 220 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 270 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 270 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 451 138 cnv 15 260 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 584 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 138 cnv 15 260 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -49,9 +21,7 @@ #X obj 223 55 inlet; #X msg 223 123 open \$1; #X obj 223 100 openpanel; -#X text 156 263 [pix_buf] with "auto 1" is important if we want to -recalculate our pix-effect each frame but don't want to reload the -image all the time.; +#X text 156 263 [pix_buf] with "auto 1" is important if we want to recalculate our pix-effect each frame but don't want to reload the image all the time.; #X obj 77 281 pix_buf; #X obj 102 229 loadbang; #X msg 102 250 auto 1; @@ -66,30 +36,20 @@ image all the time.; #X restore 451 113 pd image; #X text 16 511 Outlet 1: gemlist; #X text 23 402 Inlet 1: gemlist; -#X obj 451 253 pix_draw; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_curve]; #X text 29 76 Description: apply color curves to an image; -#X text 13 96 [pix_curve] applies color-curves (that are stored in -arrays) to an image.; -#X text 14 125 You can specify one table for all 4 (RGBA) channels -or one for each channel. If you do not specify a table for the Alpha-channel -\, it will not be touched.; -#X text 17 175 You can specify the tables with creation-arguments and -(re)set them with the "set"-message.; -#X text 15 204 The length of the used table does not matter. The table -will be stretched/squeezed to (virtually) hold 256 items. If it is -stretched \, no interpolation is done!; -#X text 17 257 The values of the table-items have range between 0 and -255 !; +#X text 13 96 [pix_curve] applies color-curves (that are stored in arrays) to an image.; +#X text 14 125 You can specify one table for all 4 (RGBA) channels or one for each channel. If you do not specify a table for the Alpha-channel \, it will not be touched.; +#X text 17 175 You can specify the tables with creation-arguments and (re)set them with the "set"-message.; +#X text 15 204 The length of the used table does not matter. The table will be stretched/squeezed to (virtually) hold 256 items. If it is stretched \, no interpolation is done!; +#X text 17 257 The values of the table-items have range between 0 and 255 !; #X msg 469 142 set tab-rgba; #X msg 469 162 set tab-red tab-green tab-blue; #N canvas 46 428 568 342 table-init 0; -#X msg 26 171 \; tab-red cosinesum 128 1 0.6 -0.2 0.2 \; tab-red normalize -256; -#X msg 26 222 \; tab-blue cosinesum 8 0.5 -0.4 0.3 \; tab-blue normalize -256; +#X msg 26 171 \; tab-red cosinesum 128 1 0.6 -0.2 0.2 \; tab-red normalize 256; +#X msg 26 222 \; tab-blue cosinesum 8 0.5 -0.4 0.3 \; tab-blue normalize 256; #X obj 352 120 until; #X msg 353 49 100; #X obj 352 167 i; @@ -105,8 +65,7 @@ stretched \, no interpolation is done!; #X obj 352 71 t f b; #X obj 381 239 + 100; #X obj 200 39 t b b b; -#X msg 148 103 \; tab-green normalize 256 \; tab-rgba normalize 256 -; +#X msg 148 103 \; tab-green normalize 256 \; tab-rgba normalize 256; #X obj 37 125 t b b; #X connect 2 0 4 0; #X connect 3 0 14 0; @@ -137,22 +96,26 @@ stretched \, no interpolation is done!; #X obj 451 215 pix_curve tab-rgba; #X msg 469 183 set tab-green tab-blue tab-red tab-rgba; #X text 13 336 3 args: separate s for all channels; -#X text 13 350 4 args: separate s for all channels (incl. -alpha); +#X text 13 350 4 args: separate s for all channels (incl. alpha); #X text 13 322 1 arg:: common for all channels; -#X text 23 415 Inlet 1: set : common table for all channels -; -#X text 23 432 Inlet 1: set : separate tables -for all channels; -#X text 23 461 Inlet 1: set : separate -tables for all channels (incl. Alpha); -#X obj 618 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 37 0; -#X connect 30 0 37 0; -#X connect 31 0 37 0; -#X connect 37 0 20 0; -#X connect 38 0 37 0; +#X text 23 415 Inlet 1: set : common table for all channels; +#X text 23 432 Inlet 1: set : separate tables for all channels; +#X text 23 461 Inlet 1: set : separate tables for all channels (incl. Alpha); +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply color curves to an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 618 8 pd META; +#X obj 590 262 _gemwin; +#X obj 451 253 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 33 0; +#X connect 26 0 33 0; +#X connect 27 0 33 0; +#X connect 33 0 43 0; +#X connect 34 0 33 0; diff --git a/help/pix_data-help.pd b/help/pix_data-help.pd index e77c9877a..953fbd719 100644 --- a/help/pix_data-help.pd +++ b/help/pix_data-help.pd @@ -17,33 +17,8 @@ #X floatatom 492 170 5 0 0 1 x-pos - - 0; #X floatatom 507 193 5 0 0 1 y-pos - - 0; #X obj 477 94 gemhead; -#X obj 477 138 pix_image; -#X obj 562 68 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; -#X obj 562 86 openpanel; -#X msg 562 109 open \$1; #X text 453 15 GEM object; #X obj 500 413 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 505 452 pd gemwin; -#X msg 505 433 create; -#X text 501 412 Create window:; #X obj 568 8 declare -lib Gem; #X text 21 271 Inlets:; #X text 23 239 Arguments:; @@ -70,24 +45,21 @@ #X text 42 453 Outlet 3: float: grey value (normalized 0..1); #X obj 484 353 unpack 0 0 0 0; #X floatatom 626 376 5 0 0 0 A - - 0; -#X connect 7 1 50 0; +#X obj 506 420 _gemwin; +#X obj 477 138 pix_test; +#X connect 7 1 43 0; #X connect 7 2 9 0; #X connect 8 0 7 0; #X connect 14 0 7 2; #X connect 15 0 7 3; -#X connect 16 0 17 0; -#X connect 17 0 7 1; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 17 0; -#X connect 23 0 24 0; -#X connect 24 0 23 0; -#X connect 41 0 42 0; -#X connect 42 0 7 0; -#X connect 43 0 44 0; -#X connect 44 0 7 0; -#X connect 45 0 7 0; -#X connect 50 0 12 0; -#X connect 50 1 11 0; -#X connect 50 2 10 0; -#X connect 50 3 51 0; +#X connect 16 0 46 0; +#X connect 34 0 35 0; +#X connect 35 0 7 0; +#X connect 36 0 37 0; +#X connect 37 0 7 0; +#X connect 38 0 7 0; +#X connect 43 0 12 0; +#X connect 43 1 11 0; +#X connect 43 2 10 0; +#X connect 43 3 44 0; +#X connect 46 0 7 1; diff --git a/help/pix_deinterlace-help.pd b/help/pix_deinterlace-help.pd index 345087b90..cc18eed91 100644 --- a/help/pix_deinterlace-help.pd +++ b/help/pix_deinterlace-help.pd @@ -1,47 +1,19 @@ #N canvas 392 297 654 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 252 Inlets:; #X text 38 315 Outlets:; -#X obj 8 204 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 204 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 203 Arguments:; -#X obj 7 76 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -68,28 +40,26 @@ #X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 196 pix_deinterlace; #X msg 477 168 mode \$1; -#X obj 477 150 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 451 223 pix_texture; -#X obj 451 244 square 5; +#X obj 477 150 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 50 12 Synopsis: [pix_deinterlace]; #X text 29 76 Description: deinterlace an image; -#X text 17 97 [pix_deinterlace] will apply a deinterlacing algorithm -on the incoming image. This is done by getting the average of neighbouring -rows.; -#X text 21 141 When mode is set to "0" \, only those pixels are de-interlaced -if they appear to be interlaced (this is detected by thresholding the -difference between adjacent pixels). In mode "1" de-interlacing is -always enforced.; -#X text 63 282 Inlet 1: mode : enforce(1) or not(0) (default:1) -; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 23 0; -#X connect 23 0 26 0; -#X connect 24 0 23 0; -#X connect 25 0 24 0; -#X connect 26 0 27 0; +#X text 17 97 [pix_deinterlace] will apply a deinterlacing algorithm on the incoming image. This is done by getting the average of neighbouring rows.; +#X text 21 141 When mode is set to "0" \, only those pixels are de-interlaced if they appear to be interlaced (this is detected by thresholding the difference between adjacent pixels). In mode "1" de-interlacing is always enforced.; +#X text 63 282 Inlet 1: mode : enforce(1) or not(0) (default:1); +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION deinterlace an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist mode; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 223 _pix2rectangle 3; +#X obj 521 261 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 20 0; +#X connect 20 0 29 0; +#X connect 21 0 20 0; +#X connect 22 0 21 0; diff --git a/help/pix_delay-help.pd b/help/pix_delay-help.pd index 3c3d4606a..26276699e 100644 --- a/help/pix_delay-help.pd +++ b/help/pix_delay-help.pd @@ -1,56 +1,26 @@ #N canvas 230 61 629 377 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 225 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 225 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 227 Inlets:; #X text 40 322 Outlets:; -#X obj 9 185 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 185 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 184 Arguments:; -#X obj 8 56 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; -#X obj 451 198 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 198 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 18 336 Outlet 1: gemlist; #X text 24 241 Inlet 1: gemlist; -#X obj 451 292 square 3; -#X obj 451 270 pix_texture; #X obj 451 232 pix_delay 100; #X text 50 12 Synopsis: [pix_delay]; #X text 71 31 Class: pix object (timebased effect); #X text 29 57 Description: delay a series of images; #X obj 451 162 pix_film; #X obj 515 162 t f; -#X obj 464 105 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 105 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -64,7 +34,7 @@ #X connect 4 0 1 0; #X connect 5 0 4 0; #X restore 464 134 pd open; -#X floatatom 537 213 5 0 0 0 - - -; +#X floatatom 537 213 5 0 0 0 - - - 0; #X text 505 77 open a supported; #X text 506 88 movie-clip; #X text 505 109 macOS: quicktime; @@ -73,20 +43,23 @@ #X text 528 198 scrub me!; #X text 64 195 int: max.number of delayed frames; #X text 24 254 Inlet 1: int: delay (in frames); -#X text 11 79 [pix_delay] is a frame-based delay-line. All frames stored -in the delay-line have to have the same dimensions and colour-space. -You can specify the length of the entire delay-line (==maximum delay) -as an argument to the [pix_delay] object. The delay in frames defaults -to 0 (route through) and can be changed via the second inlet.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 23 0; -#X connect 18 0 17 0; -#X connect 19 0 18 0; -#X connect 23 0 19 0; -#X connect 23 2 24 0; -#X connect 24 0 23 1; -#X connect 25 0 26 0; -#X connect 26 0 23 0; -#X connect 27 0 19 1; +#X text 11 79 [pix_delay] is a frame-based delay-line. All frames stored in the delay-line have to have the same dimensions and colour-space. You can specify the length of the entire delay-line (==maximum delay) as an argument to the [pix_delay] object. The delay in frames defaults to 0 (route through) and can be changed via the second inlet.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION delay a series of images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist int; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 270 _pix2rectangle 3; +#X obj 521 297 _gemwin; +#X connect 11 0 18 0; +#X connect 14 0 33 0; +#X connect 18 0 14 0; +#X connect 18 2 19 0; +#X connect 19 0 18 1; +#X connect 20 0 21 0; +#X connect 21 0 18 0; +#X connect 22 0 14 1; diff --git a/help/pix_diff-help.pd b/help/pix_diff-help.pd index e09f4bb29..13b15543f 100644 --- a/help/pix_diff-help.pd +++ b/help/pix_diff-help.pd @@ -1,46 +1,18 @@ #N canvas 6 320 629 381 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 34 236 Inlets:; #X text 34 292 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 448 66 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 448 66 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 452 49 Example:; -#X obj 513 279 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 518 318 pd gemwin; -#X msg 518 299 create; -#X text 514 278 Create window:; -#X obj 450 157 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 513 279 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 157 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 450 118 gemhead; -#X obj 495 101 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 495 101 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -54,11 +26,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 450 137 pd image; -#X obj 450 252 pix_texture; #X text 63 196 ; #X text 42 306 Outlet 1: gemlist; #X text 48 250 Inlet 1: gemlist; -#X obj 450 274 square 3; #X text 502 77 (JPEG \, TIFF \, ..); #X obj 540 118 gemhead; #N canvas 0 22 587 366 image 0; @@ -74,28 +44,34 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 540 137 pd image; -#X obj 585 101 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 585 101 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 48 279 Inlet 2: gemlist; #X text 448 66 open two different images; #X text 71 31 Class: pix mix object; #X text 33 150 The 2 images have to be of the same size.; #X text 50 12 Synopsis: [pix_diff]; #X text 29 67 Description: get the difference between 2 pixes; -#X text 24 94 [pix_diff] will get the absolute value of the difference -between 2 images (in contrast to [pix_subtract]); +#X text 24 94 [pix_diff] will get the absolute value of the difference between 2 images (in contrast to [pix_subtract]); #X obj 450 187 pix_diff; #X text 32 353 see also:; #X obj 100 353 pix_subtract; #X obj 180 353 pix_compare; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 33 0; -#X connect 17 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 33 1; -#X connect 25 0 24 1; -#X connect 33 0 17 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION get the difference between 2 pixes; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 450 252 _pix2rectangle; +#X obj 520 285 _gemwin; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 28 0; +#X connect 18 0 19 0; +#X connect 19 0 28 1; +#X connect 20 0 19 1; +#X connect 28 0 33 0; diff --git a/help/pix_dot-help.pd b/help/pix_dot-help.pd index cb85338f2..d5c52387a 100644 --- a/help/pix_dot-help.pd +++ b/help/pix_dot-help.pd @@ -1,49 +1,21 @@ #N canvas 6 61 633 352 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 39 282 Outlets:; -#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 75 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 75 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 50 12 Synopsis: [pix_dot]; #X text 71 31 Class: pix object; #X obj 451 180 pix_dot; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -57,25 +29,29 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X floatatom 524 181 5 0 100 2 size - -; -#X obj 451 233 pix_texture; +#X floatatom 524 181 5 0 100 2 size - - 0; #X text 57 295 Outlet 1: gemlist; #X text 63 212 Inlet 1: gemlist; #X text 29 77 Description: make dotty images; #X text 64 232 Inlet 2: float: size of the dots; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X text 34 94 [pix_dot] will simplify an image \, as the image will -be segmented and each segment will be represented by a white dot \, -whose size is relative to the luminance of the original segment.; -#X obj 451 255 square 3; +#X text 34 94 [pix_dot] will simplify an image \, as the image will be segmented and each segment will be represented by a white dot \, whose size is relative to the luminance of the original segment.; #X text 63 166 ; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 19 0; -#X connect 17 0 21 0; -#X connect 18 0 19 1; -#X connect 19 0 17 0; -#X connect 20 0 17 1; -#X connect 21 0 29 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION make dotty images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 523 260 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 16 0; +#X connect 14 0 28 0; +#X connect 15 0 16 1; +#X connect 16 0 14 0; +#X connect 17 0 14 1; diff --git a/help/pix_draw-help.pd b/help/pix_draw-help.pd index a977db215..c6445389d 100644 --- a/help/pix_draw-help.pd +++ b/help/pix_draw-help.pd @@ -1,47 +1,19 @@ #N canvas 106 178 626 382 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 295 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 295 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 298 Inlets:; #X text 34 331 Outlets:; -#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 255 Arguments:; -#X obj 7 76 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 200 cnv 15 80 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 200 cnv 15 80 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -63,28 +35,27 @@ #X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_draw]; #X text 29 76 Description: draw pixels on the screen; -#X text 29 94 pix_draw simply draws the pixels on the screen without -doing any texture mapping. Because it is just blasting pixels \, rotations -and translations in the Z dimension won't do anything (except maybe -have the raster point be clicked). See the OpenGL reference manual -under glDrawPixels for more information).; -#X obj 16 180 cnv 15 410 30 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 19 181 WARNING: On most PCs with graphics accelerators \, pix_draw -is MUCH SLOWER than [pix_texture]!!; +#X text 29 94 pix_draw simply draws the pixels on the screen without doing any texture mapping. Because it is just blasting pixels \, rotations and translations in the Z dimension won't do anything (except maybe have the raster point be clicked). See the OpenGL reference manual under glDrawPixels for more information).; +#X obj 16 180 cnv 15 410 30 empty empty empty 20 12 0 14 #fcac44 #404040 0; +#X text 19 181 WARNING: On most PCs with graphics accelerators \, pix_draw is MUCH SLOWER than [pix_texture]!!; #X obj 451 171 translateXYZ; -#X floatatom 472 149 5 -4 4 0 - - -; -#X floatatom 519 148 5 -4 4 0 - - -; -#X floatatom 563 149 5 -4 2 0 - - -; -#X text 16 216 [pix_draw] is used in the example patches a lot \, just -because it is one object less (compared to [pix_texture]; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 29 0; -#X connect 29 0 21 0; -#X connect 30 0 29 1; -#X connect 31 0 29 2; -#X connect 32 0 29 3; +#X floatatom 472 149 5 -4 4 0 - - - 0; +#X floatatom 519 148 5 -4 4 0 - - - 0; +#X floatatom 563 149 5 -4 2 0 - - - 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION draw pixels on the screen; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 260 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 26 0; +#X connect 26 0 18 0; +#X connect 27 0 26 1; +#X connect 28 0 26 2; +#X connect 29 0 26 3; diff --git a/help/pix_dump-help.pd b/help/pix_dump-help.pd index c48e2d8d2..09551c66a 100644 --- a/help/pix_dump-help.pd +++ b/help/pix_dump-help.pd @@ -1,93 +1,51 @@ #N canvas 207 155 629 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 305 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 304 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 343 pd gemwin; -#X msg 519 324 create; -#X text 515 303 Create window:; -#X obj 448 158 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 304 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 448 158 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 272 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 318 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 186 pix_dump; #X obj 502 213 print DATA; #X msg 487 162 bang; #X text 29 76 Description: dump all the pixel-data of an image; -#X text 21 111 [pix_dump] will output one long list of (m*n) pixel-tuples. -; +#X text 21 111 [pix_dump] will output one long list of (m*n) pixel-tuples.; #X text 22 142 For a RGBA-image the list will have the form:; #X text 42 162 R1 G1 B1 A1 R2 G2 B2 A2 R3 G3 ... B(m*n) A(m*n); #X text 63 274 Inlet 1: bang: do dump; #X text 56 332 Outlet 2: list: dumped pixel data; #X text 50 12 Synopsis: [pix_dump]; -#X obj 530 168 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 451 135 pix_resize 20 20; -#X obj 451 245 pix_texture; -#X obj 451 267 rectangle 3 3; +#X obj 530 168 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 530 186 bytemode \$1; #X text 63 286 Inlet 1: bytemode: set normalization on or off; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 34 0; -#X connect 23 0 35 0; -#X connect 23 1 24 0; -#X connect 25 0 23 0; -#X connect 33 0 37 0; -#X connect 34 0 23 0; -#X connect 35 0 36 0; -#X connect 37 0 23 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION dump all the pixel-data of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bang bytemode; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 list; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 245 _pix2rectangle 3; +#X obj 522 310 _gemwin; +#X obj 451 113 pix_test 20 20; +#X connect 11 0 32 0; +#X connect 16 0 30 0; +#X connect 16 1 17 0; +#X connect 18 0 16 0; +#X connect 26 0 27 0; +#X connect 27 0 16 0; +#X connect 32 0 16 0; diff --git a/help/pix_duotone-help.pd b/help/pix_duotone-help.pd index 5bb857fcf..c346978bc 100644 --- a/help/pix_duotone-help.pd +++ b/help/pix_duotone-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 651 353 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,23 +27,14 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 57 323 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 451 255 square 3; -#X text 64 258 Inlet 3: list: color if original pixel-value is below -threshold; -#X text 64 283 Inlet 4: list: color if original pixel-value is above -threshold; +#X text 64 258 Inlet 3: list: color if original pixel-value is below threshold; +#X text 64 283 Inlet 4: list: color if original pixel-value is above threshold; #X text 50 12 Synopsis: [pix_duotone]; -#X text 29 77 Description: reduce the number of colours by thresholding -; -#X text 13 91 [pix_duotone] will reduce the number of colours in a -pixImage \, based on thresholding. If the pixel has a greater value -than the threshold (on all channels) \, the pixel will be set to color1 -\, else color2 will be used. The same goes for green and blue. In YUV-space -the values are not RGB but YCrCb.; +#X text 29 77 Description: reduce the number of colours by thresholding; +#X text 13 91 [pix_duotone] will reduce the number of colours in a pixImage \, based on thresholding. If the pixel has a greater value than the threshold (on all channels) \, the pixel will be set to color1 \, else color2 will be used. The same goes for green and blue. In YUV-space the values are not RGB but YCrCb.; #X obj 451 196 pix_duotone; #X msg 465 166 0.2 0.1 0.2; #X msg 562 164 1 0 0; @@ -79,14 +42,24 @@ the values are not RGB but YCrCb.; #X text 63 245 Inlet 2: list: threshold (RGB); #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 28 0; -#X connect 18 0 22 0; -#X connect 28 0 18 0; -#X connect 29 0 28 1; -#X connect 30 0 28 2; -#X connect 31 0 28 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION reduce the number of colours by thresholding; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 INLET_3 list; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 261 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 23 0; +#X connect 23 0 32 0; +#X connect 24 0 23 1; +#X connect 25 0 23 2; +#X connect 26 0 23 3; diff --git a/help/pix_equal-help.pd b/help/pix_equal-help.pd index 16969b6e2..8e47fbdbe 100644 --- a/help/pix_equal-help.pd +++ b/help/pix_equal-help.pd @@ -1,47 +1,19 @@ #N canvas 176 166 639 504 10; #X declare -lib Gem; #X text 462 18 GEM object; -#X obj 18 206 cnv 15 430 210 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 18 206 cnv 15 430 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 49 208 Inlets:; #X text 49 301 Outlets:; -#X obj 18 168 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 18 168 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 27 167 Arguments:; -#X obj 18 86 cnv 15 430 75 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 459 87 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 18 86 cnv 15 430 75 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 459 87 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 463 70 Example:; -#X obj 524 271 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 529 310 pd gemwin; -#X msg 529 291 create; -#X text 525 270 Create window:; -#X obj 460 151 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 524 271 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 460 151 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 461 94 gemhead; #X text 81 41 Class: pix object; -#X obj 520 95 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 520 95 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 4 49 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,32 +27,19 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 461 123 pd image; -#X obj 461 250 pix_texture; #X text 73 178 ; -#X obj 461 272 square 3; #X text 526 115 open an image; #X text 519 128 (JPEG \, TIFF \, ..); -#X obj 18 424 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 18 424 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 26 425 See Also:; #X text 83 424 examples/04.video/08.color_detection.pd; #X text 66 229 Inlet 1: gemlist \, RGBA image; -#X text 26 459 Author: Ricardo Fabbri labmacambira.sf.net rfabbri at -gmail; +#X text 26 459 Author: Ricardo Fabbri labmacambira.sf.net rfabbri at gmail; #X text 60 22 Synopsis: [pix_equal]; -#X text 38 107 [pix_equal] outputs a binary image where 'white' marks -those pixels that are equal to a given value (within given closed bounds) -\, and 'black' marks the remaining ones.; -#X text 67 248 Inlet 2(resp.3): list of lower(resp.upper) bounds [R -G B A( \, with each value ranging from 0 to 1 \, and A being optional -and equal to 0(resp.1) by default.; -#X text 67 319 Outlet 1: gemlist \, a binary RGBA image with white -pixels marking only those pixels that are within the specified (closed) -RGBA ranges simultaneously on all four channels. This can be used \, -for instance \, in separating color blobs from [pix_colorclassify]. -; -#X text 39 87 Description: marks the pixels nearly equal to a given -color; +#X text 38 107 [pix_equal] outputs a binary image where 'white' marks those pixels that are equal to a given value (within given closed bounds) \, and 'black' marks the remaining ones.; +#X text 67 248 Inlet 2(resp.3): list of lower(resp.upper) bounds [R G B A( \, with each value ranging from 0 to 1 \, and A being optional and equal to 0(resp.1) by default.; +#X text 67 319 Outlet 1: gemlist \, a binary RGBA image with white pixels marking only those pixels that are within the specified (closed) RGBA ranges simultaneously on all four channels. This can be used \, for instance \, in separating color blobs from [pix_colorclassify].; +#X text 39 87 Description: marks the pixels nearly equal to a given color; #X obj 461 209 pix_equal; #X msg 528 172 0.8 0.7 0 0; #X text 524 156 lower bound; @@ -89,13 +48,20 @@ color; #X text 456 373 and having any alpha; #X text 457 342 e.g. marks whatever is within; #X text 456 358 a certain bright yellow range; -#X obj 528 18 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 33 0; -#X connect 18 0 20 0; -#X connect 33 0 18 0; -#X connect 34 0 33 1; -#X connect 37 0 33 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION marks the pixels nearly equal to a given color; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist RGBA; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 528 18 pd META; +#X obj 531 280 _gemwin; +#X obj 461 250 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 28 0; +#X connect 28 0 38 0; +#X connect 29 0 28 1; +#X connect 32 0 28 2; diff --git a/help/pix_film-help.pd b/help/pix_film-help.pd index c15173258..de7fc1015 100644 --- a/help/pix_film-help.pd +++ b/help/pix_film-help.pd @@ -1,123 +1,62 @@ #N canvas 163 143 704 623 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 272 cnv 15 430 340 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 272 cnv 15 430 340 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 274 Inlets:; #X text 39 487 Outlets:; -#X obj 9 239 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 239 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 238 Arguments:; -#X obj 8 56 cnv 15 430 180 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 57 cnv 15 250 450 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 57 cnv 15 250 450 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 40 Example:; -#X obj 594 440 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 599 479 pd gemwin; -#X msg 599 460 create; -#X text 595 439 Create window:; -#X obj 451 88 cnv 15 215 300 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 574 440 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 88 cnv 15 215 300 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 63 gemhead; #X text 17 503 Outlet 1: gemlist; #X text 18 288 Inlet 1: gemlist, f 68; -#X obj 451 410 pix_texture; -#X obj 463 90 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 463 90 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X text 505 57 open a supported; #X text 506 68 movie-clip; -#X floatatom 466 342 5 0 0 3 length - -; -#X floatatom 514 342 5 0 0 3 width - -; -#X floatatom 565 342 5 0 0 3 height - -; -#X obj 514 281 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144 --1 -1; -#X floatatom 504 263 5 0 10000 1 frameNum - -; +#X floatatom 466 352 5 0 0 3 length - - 0; +#X floatatom 514 352 5 0 0 3 width - - 0; +#X floatatom 565 352 5 0 0 3 height - - 0; +#X floatatom 504 263 5 0 10000 1 frameNum - - 0; #X text 71 31 Class: pix object (pix source); #X text 29 57 Description: load in a movie-file; #X obj 463 117 openpanel; -#X obj 451 432 rectangle 4 3; #X text 50 12 Synopsis: [pix_film]; -#X text 15 78 [pix_film] loads in a preproduced digital-video to be -used as a texture \, bitblit or something else., f 69; +#X text 15 78 [pix_film] loads in a preproduced digital-video to be used as a texture \, bitblit or something else., f 69; #X text 64 249 symbol: file to load initially; -#X text 18 303 Inlet 1: message: open [RGBA|YUV|Grey]: opens -the movie \, decodes it into the specified color-space if supported. -, f 69; -#X text 18 336 Inlet 1: message: colorspace "RGBA|YUV|Grey": decodes -the current film into the specified colorspace \, if supported., f 69; -#X text 18 365 Inlet 1: message : auto 1|0 : starts/stops automatic -playback. (default:0), f 69; -#X text 17 576 Outlet 3: bang: indicates that the last frame has been -reached. (or: an illegal frame would have been decoded), f 69; +#X text 18 303 Inlet 1: message: open [RGBA|YUV|Grey]: opens the movie \, decodes it into the specified color-space if supported., f 69; +#X text 18 336 Inlet 1: message: colorspace "RGBA|YUV|Grey": decodes the current film into the specified colorspace \, if supported., f 69; +#X text 18 365 Inlet 1: message : auto 1|0 : starts/stops automatic playback. (default:0), f 69; +#X text 17 576 Outlet 3: bang: indicates that the last frame has been reached. (or: an illegal frame would have been decoded), f 69; #X msg 469 174 auto \$1; -#X obj 469 156 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 469 156 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 480 193 colorspace Grey; -#X text 17 520 Outlet 2: list: : gets -the dimensions (in frames and pixels) of a film when it gets loaded. -if length is not available (video-streams) -1 is returned., f 69; +#X text 17 520 Outlet 2: list: : gets the dimensions (in frames and pixels) of a film when it gets loaded. if length is not available (video-streams) -1 is returned., f 69; #N canvas 18 93 928 614 :: 0; -#X text 24 16 the format [pix_film] is able to decode depends on the -system you are running Gem.; -#X text 33 52 basically Gem's decoding capabilities are handled by -plugins. You should see \, which plugins are loaded \, when instantiating -the first [pix_film] object: a line "[pix_film]: foo support" means -\, that the 'foo' plugin has been loaded.; -#X text 453 50 you can add a plugin to your system by simply copying -the plugin-binary called "gem_filmNAME.dll" (or gem_filmNAME.so if -you are on a unix-like system) into your Gem-directory (where you find -the Gem-binary \, e.g. Gem.dll); -#X text 456 103 if you want to remove a plugin (e.g. because you are -not satisfied with the decoding quality of because it is unstable) -\, you can simply remove the corresponding gem_filmNAME.dll file from -your Gem-directory.; -#X text 35 123 which media can be decoded \, depends on the installed -plugins and on the codecs you have installed on your system.; -#X obj 45 248 cnv 15 200 15 empty empty empty 20 12 0 14 -203904 -66577 -0; -#X obj 45 303 cnv 15 200 15 empty empty empty 20 12 0 14 -203904 -66577 -0; -#X obj 445 248 cnv 15 200 15 empty empty empty 20 12 0 14 -203904 -66577 -0; +#X text 24 16 the format [pix_film] is able to decode depends on the system you are running Gem.; +#X text 33 52 basically Gem's decoding capabilities are handled by plugins. You should see \, which plugins are loaded \, when instantiating the first [pix_film] object: a line "[pix_film]: foo support" means \, that the 'foo' plugin has been loaded.; +#X text 453 50 you can add a plugin to your system by simply copying the plugin-binary called "gem_filmNAME.dll" (or gem_filmNAME.so if you are on a unix-like system) into your Gem-directory (where you find the Gem-binary \, e.g. Gem.dll); +#X text 456 103 if you want to remove a plugin (e.g. because you are not satisfied with the decoding quality of because it is unstable) \, you can simply remove the corresponding gem_filmNAME.dll file from your Gem-directory.; +#X text 35 123 which media can be decoded \, depends on the installed plugins and on the codecs you have installed on your system.; +#X obj 45 248 cnv 15 200 15 empty empty empty 20 12 0 14 #c4c4fc #404040 0; +#X obj 45 303 cnv 15 200 15 empty empty empty 20 12 0 14 #c4c4fc #404040 0; +#X obj 445 248 cnv 15 200 15 empty empty empty 20 12 0 14 #c4c4fc #404040 0; #X text 449 249 Gmerlin (gem_filmGMERLIN); #X text 49 249 QuickTime (gem_filmQT); -#X text 73 262 available on OS-X (PPC and i386 \, but not 64bit!) and -W32; -#X text 73 277 should be able to decode any QuickTime MOV \, and probably -a lot more; +#X text 73 262 available on OS-X (PPC and i386 \, but not 64bit!) and W32; +#X text 73 277 should be able to decode any QuickTime MOV \, and probably a lot more; #X text 49 304 DirectShow (gem_filmDS); #X text 73 317 available on W32; -#X text 73 331 should be able to decode anything for which you have -a DirectShow filter installed; +#X text 73 331 should be able to decode anything for which you have a DirectShow filter installed; #X text 50 365 AVI (gem_filmAVI); #X text 73 380 available on W32; -#X text 73 394 this uses the old (pre-XP) W32-API for decoding movies. -Support for newer codecs is probably limited; +#X text 73 394 this uses the old (pre-XP) W32-API for decoding movies. Support for newer codecs is probably limited; #X text 50 424 AVIPLAY (gem_filmAVIPLAY); #X text 73 439 available on linux; -#X text 74 452 uses the meta-framework "avifile" to decode movies \, -which itself has a plugin system to use ffmpeg \, vorbis \, w32-dlls -\, ... to decode videos; +#X text 74 452 uses the meta-framework "avifile" to decode movies \, which itself has a plugin system to use ffmpeg \, vorbis \, w32-dlls \, ... to decode videos; #X text 73 507 available on linux; #X text 50 494 quicktime4linux (gem_filmQT4L); #X text 73 522 uses libquicktime/lqt for decoding; @@ -125,80 +64,81 @@ which itself has a plugin system to use ffmpeg \, vorbis \, w32-dlls #X text 473 277 uses Gmerlin-avdecoder to decode lots of formats; #X text 449 304 MPEG3 (gem_filmMPEG3); #X text 473 317 available on linux; -#X text 473 331 should be able to decode various MPEG-formats (e.g. -MPEG-2-Video and MPEG-2-transportstreams); +#X text 473 331 should be able to decode various MPEG-formats (e.g. MPEG-2-Video and MPEG-2-transportstreams); #X text 473 380 available on linux; -#X text 473 394 uses an old \, buggy (and no longer developed) library -to decode MPEG-streams; +#X text 473 394 uses an old \, buggy (and no longer developed) library to decode MPEG-streams; #X text 450 365 MPEG (gem_filmMPEG1); #X text 450 424 Darwin (gem_filmDarwin); #X text 473 439 available on OS-X; #X text 450 484 test (gem_TEST); #X text 473 497 available on ALL platforms; -#X text 473 512 outputs test images rather than decoding real media -files; +#X text 473 512 outputs test images rather than decoding real media files; #X text 270 194 available film decoding plugins; #X text 260 210 (recommended plugins are highlighted); -#X text 474 452 an alternative implementation of the QuickTime plugin -for OS-X only; +#X text 474 452 an alternative implementation of the QuickTime plugin for OS-X only; #X restore 455 484 pd :: FORMATS; -#X obj 473 305 unpack 0 0 0 0; -#X floatatom 581 306 5 0 0 3 fps - -; +#X obj 473 325 unpack 0 0 0 0; +#X floatatom 581 326 5 0 0 1 fps - - 0; #X obj 451 281 pix_film; -#X msg 489 237 bang; -#X text 17 418 Inlet 1: message : bang: (re)send the l/w/h/fps info -to the 2nd outlet, f 69; -#X text 14 144 Normally \, you will only get one specified (via the -second inlet) frame of the film. To play back a complete film \, you -have to change the frame accordingly \, OR use the "auto" message \, -to automatically proceed to the next frame each rendering-cycle. In -auto-mode \, the film is NOT looped. Instead you can reset the current-frame -to zero when the end of the film is reached., f 69; -#X text 16 445 Inlet 2: float: changes the frame to be decoded -on rendering (starting with 0), f 69; -#X msg 486 212 loader foo; -#X text 17 391 Inlet 1: message : loader : open the film using -only the specified backend(s), f 70; -#X obj 578 8 declare -lib Gem; +#X msg 489 217 bang; +#X text 17 418 Inlet 1: message : bang: (re)send the l/w/h/fps info to the 2nd outlet, f 69; +#X text 14 151 Normally \, you will only get one specified (via the second inlet) frame of the film. To play back a complete film \, you have to change the frame accordingly \, OR use the "auto" message \, to automatically proceed to the next frame each rendering-cycle. In auto-mode \, the film is NOT looped. Instead you can reset the current-frame to zero when the end of the film is reached., f 69; +#X text 16 445 Inlet 2: float: changes the frame to be decoded on rendering (starting with 0), f 69; +#X text 17 391 Inlet 1: message : backend : open the film using only the specified backend(s), f 70; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load in a movie-file; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist open colorspace message; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 20 145 OUTLET_1 list; +#X text 20 165 OUTLET_2 bang; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 578 8 pd META; #N canvas 2 93 450 310 :: 0; -#X text 35 220 If a specific colorspace is required \, it is strongly -recommended to convert using [pix_rgba] \, [pix_yuv] \, [pix_grey] -etc. This is the only way to guarantee a colorspace., f 60; -#X text 35 33 Note that the default colorspace may vary on different -operating systems \, even for the same patch and same video file. For -instance \, [pix_film] may output YUV images in macOS \, while the -same patch and same video file may obtain RGB images in Linux. While -most downstream [pix] objects can adapt automatically to the incoming -format \, there are some (e.g. [pix_chroma_key]) which take a user-specified -color as an input. Such objects are sensitive to the image's colorspace -\, and patches using them may exhibit variable behavior on different -OSes.; -#X text 35 172 Note also that codecs may choose to disregard the colorspace -passed to pix_film -- you may or may not get the requested colorspace. -; -#X restore 211 130 pd :: COLORSPACES; -#X text 13 104 You can open a specified film via the "open" message -\, which takes an optional argument for the colorspace \, to which -the movie should be decoded (RGBA \, YUV or Grey). See, f 70; +#X text 35 220 If a specific colorspace is required \, it is strongly recommended to convert using [pix_rgba] \, [pix_yuv] \, [pix_grey] etc. This is the only way to guarantee a colorspace., f 60; +#X text 35 33 Note that the default colorspace may vary on different operating systems \, even for the same patch and same video file. For instance \, [pix_film] may output YUV images in macOS \, while the same patch and same video file may obtain RGB images in Linux. While most downstream [pix] objects can adapt automatically to the incoming format \, there are some (e.g. [pix_chroma_key]) which take a user-specified color as an input. Such objects are sensitive to the image's colorspace \, and patches using them may exhibit variable behavior on different OSes.; +#X text 35 172 Note also that codecs may choose to disregard the colorspace passed to pix_film -- you may or may not get the requested colorspace.; +#X restore 217 133 pd :: COLORSPACES; +#X text 14 104 You can open a specified film via the "open" message \, which takes an optional argument for the colorspace \, to which the movie should be decoded (RGBA \, YUV or Grey). See, f 70; #X msg 463 136 open \$1 RGBA; #X text 546 129 Recommended to specify colorspace!, f 20; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 44 0; -#X connect 17 0 29 0; -#X connect 18 0 28 0; -#X connect 25 0 44 1; -#X connect 28 0 54 0; -#X connect 37 0 44 0; -#X connect 38 0 37 0; -#X connect 39 0 44 0; -#X connect 42 0 21 0; -#X connect 42 1 22 0; -#X connect 42 2 23 0; -#X connect 42 3 43 0; -#X connect 44 0 17 0; -#X connect 44 1 42 0; -#X connect 44 2 24 0; -#X connect 45 0 44 0; -#X connect 49 0 44 0; -#X connect 54 0 44 0; +#X obj 457 584 _backendinfo \$0 film; +#X obj 489 241 r \$0-ctl; +#X obj 463 241 t a; +#X obj 509 282 route bang; +#X obj 509 302 bng 18 250 50 0 \$0-end \$0-end end_reached 20 9 0 10 #fcfcfc #000000 #000000; +#N canvas 6 49 515 369 print 0; +#X obj 102 176 inlet; +#X obj 102 198 s \$0-info; +#X obj 102 220 r \$0-infoprint; +#X obj 102 242 print INFO; +#X text 62 90 actually you can just hook a [print] to the 3rd outlet.; +#X text 64 115 here it's a bit more complicated \, as we want to filter out the messages generated from the [pd PROPERTIES] window.; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X restore 583 282 pd print; +#X obj 451 410 _pix2rectangle 3; +#X obj 582 445 _gemwin; +#X connect 11 0 38 0; +#X connect 14 0 23 0; +#X connect 20 0 38 1; +#X connect 23 0 47 0; +#X connect 31 0 51 0; +#X connect 32 0 31 0; +#X connect 33 0 51 0; +#X connect 36 0 17 0; +#X connect 36 1 18 0; +#X connect 36 2 19 0; +#X connect 36 3 37 0; +#X connect 38 0 55 0; +#X connect 38 1 36 0; +#X connect 38 2 52 0; +#X connect 39 0 51 0; +#X connect 47 0 51 0; +#X connect 50 0 51 0; +#X connect 51 0 38 0; +#X connect 52 0 53 0; +#X connect 52 1 54 0; diff --git a/help/pix_flip-help.pd b/help/pix_flip-help.pd index 1abb82140..c13f6ca23 100644 --- a/help/pix_flip-help.pd +++ b/help/pix_flip-help.pd @@ -10,50 +10,13 @@ #X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 514 284 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 323 pd gemwin; -#X msg 519 304 create; -#X text 515 283 Create window:; #X obj 450 138 cnv 15 160 110 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; -#N canvas 0 22 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; #X text 50 12 Synopsis: [pix_color]; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X msg 514 146 none; #X msg 514 166 horizontal; #X msg 514 186 vertical; @@ -63,17 +26,22 @@ #X text 20 153 It defaults to none; #X text 63 275 Inlet 1: none|horizontal|vertical|both; #X obj 451 226 pix_flip; -#X obj 451 253 pix_texture; -#X obj 451 274 square; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 32 0; -#X connect 24 0 32 0; -#X connect 25 0 32 0; -#X connect 26 0 32 0; -#X connect 27 0 32 0; -#X connect 32 0 33 0; -#X connect 33 0 34 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION flips the image along an axis; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist none horizontal vertical both; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 292 _gemwin; +#X obj 451 253 _pix2rectangle 3; +#X obj 451 113 pix_test; +#X connect 11 0 29 0; +#X connect 17 0 25 0; +#X connect 18 0 25 0; +#X connect 19 0 25 0; +#X connect 20 0 25 0; +#X connect 25 0 28 0; +#X connect 29 0 25 0; diff --git a/help/pix_freeframe-help.pd b/help/pix_freeframe-help.pd index 3766111b9..59de60b9f 100644 --- a/help/pix_freeframe-help.pd +++ b/help/pix_freeframe-help.pd @@ -1,57 +1,24 @@ #N canvas 346 61 665 552 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 340 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 340 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 342 Arguments:; -#X obj 8 56 cnv 15 430 280 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 56 cnv 15 430 280 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 451 58 Example:; #X text 71 31 Class: pix object; -#X obj 13 512 cnv 15 410 30 empty empty empty 20 12 0 14 -260818 -66577 -0; +#X obj 13 512 cnv 15 410 30 empty empty empty 20 12 0 14 #fcac44 #404040 0; #X text 50 12 Synopsis: [pix_freeframe]; #X text 63 353 : the plugin to load; -#X text 13 72 This object allows you to load any FreeFrame video-effect. -FreeFrame is an open \, cross-platform (osX \, linux \, w32) standard -for realtime video effects.; -#X text 15 513 You can get more information as well as links to public -domain and commercial plugin-packs at http://freeframe.org; -#X msg 455 330 gemList; +#X text 13 72 This object allows you to load any FreeFrame video-effect. FreeFrame is an open \, cross-platform (osX \, linux \, w32) standard for realtime video effects.; +#X text 15 513 You can get more information as well as links to public domain and commercial plugin-packs at http://freeframe.org; #X text 28 56 Description: run a FreeFrame effect; #X obj 449 113 gemhead; -#X obj 448 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 514 340 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 519 379 pd gemwin; -#X msg 519 360 create; -#X text 515 339 Create window:; +#X obj 448 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 514 350 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 451 83 gemhead; -#X obj 451 342 square 3; -#X obj 451 320 pix_texture; #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -70,15 +37,12 @@ domain and commercial plugin-packs at http://freeframe.org; #X text 523 114 macOS: quicktime; #X text 516 104 MS Windows: *.AVI; #X text 523 124 linux: depends...; -#X obj 450 227 cnv 15 160 85 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X floatatom 567 241 5 0 0 0 - - -; -#X obj 463 241 hsl 100 15 0 1 0 0 empty empty friction -2 -6 0 10 -262144 --1 -1 0 1; +#X obj 450 227 cnv 15 160 85 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X floatatom 567 241 5 0 0 0 - - - 0; +#X obj 463 241 hsl 100 15 0 1 0 0 empty empty friction -2 -6 0 10 #fcfcfc #000000 #000000 0 1; #X obj 451 289 pix_freeframe WaveVFX; -#X floatatom 567 270 5 0 0 0 - - -; -#X obj 463 270 hsl 100 15 0 1 0 0 empty empty speed -2 -6 0 10 -262144 --1 -1 0 1; +#X floatatom 567 270 5 0 0 0 - - - 0; +#X obj 463 270 hsl 100 15 0 1 0 0 empty empty speed -2 -6 0 10 #fcfcfc #000000 #000000 0 1; #X text 442 431 This example relies on; #X text 442 446 finding the "WaveVFX" plugin; #X text 443 461 (which is part of PeteWarden's; @@ -86,50 +50,40 @@ domain and commercial plugin-packs at http://freeframe.org; #X obj 451 179 pix_rgba; #X text 513 176 FreeFrame plugins; #X text 515 190 need RGBA images!; -#X text 12 109 If you specify the plugin when creating the object (e.g -[pix_freeframe WaveVFX] or [pix_WaveVFX] \, the plugin is fixed and -you cannot change it (apart from deleting the object and creating a -new one); -#X text 13 154 However \, if you only create an object [pix_freeframe] -(without specifying the plugin \, you will get a dynamic version \, -where you can load in a plugin using the "load" message.; -#X text 12 308 Plugins are searched in all the paths that Pd searches -for abstractions \, ...!; -#X text 13 284 FreeFrame numerical parameters are supposed to be in -the range 0..1.; -#X text 12 202 Most plugins have a number of parameters which you can -use to change the behaviour of the effect while it runs. For each parameter -exposed \, the [pix_freeframe] object will get one additional inlet -\, which can be used to modify the given parameter. Alternatively (e.g. -when using dynamic plugin instances) you can also use the parametername -or "#" (starting from 1).; -#X obj 7 376 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X text 12 109 If you specify the plugin when creating the object (e.g [pix_freeframe WaveVFX] or [pix_WaveVFX] \, the plugin is fixed and you cannot change it (apart from deleting the object and creating a new one); +#X text 13 154 However \, if you only create an object [pix_freeframe] (without specifying the plugin \, you will get a dynamic version \, where you can load in a plugin using the "load" message.; +#X text 12 308 Plugins are searched in all the paths that Pd searches for abstractions \, ...!; +#X text 13 284 FreeFrame numerical parameters are supposed to be in the range 0..1.; +#X text 12 202 Most plugins have a number of parameters which you can use to change the behaviour of the effect while it runs. For each parameter exposed \, the [pix_freeframe] object will get one additional inlet \, which can be used to modify the given parameter. Alternatively (e.g. when using dynamic plugin instances) you can also use the parametername or "#" (starting from 1).; +#X obj 7 376 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 378 Inlets:; #X text 11 478 Outlets:; #X text 29 491 Outlet 1: gemlist; #X text 22 392 Inlet 1: gemlist; -#X text 21 453 Inlet 2..N (if applicable): : depending on the -settable parameter; -#X text 22 406 Inlet 1: open : load another plugin (if applicable) -; -#X text 22 419 Inlet 1: # : set parameter # (starting -from 1); -#X text 22 441 Inlet 1: : set parameter given by -; -#X obj 538 8 declare -lib Gem; -#X connect 16 0 17 0; -#X connect 17 0 16 0; -#X connect 19 0 22 0; -#X connect 21 0 20 0; -#X connect 22 0 41 0; -#X connect 22 2 23 0; -#X connect 23 0 22 1; -#X connect 24 0 25 0; -#X connect 25 0 22 0; -#X connect 32 0 34 1; -#X connect 33 0 32 0; -#X connect 34 0 21 0; -#X connect 35 0 34 2; -#X connect 36 0 35 0; -#X connect 41 0 34 0; +#X text 21 453 Inlet 2..N (if applicable): : depending on the settable parameter; +#X text 22 406 Inlet 1: open : load another plugin (if applicable); +#X text 22 419 Inlet 1: # : set parameter # (starting from 1); +#X text 22 441 Inlet 1: : set parameter given by ; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION run a FreeFrame effect; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist open list ; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 451 320 _pix2rectangle 3; +#X obj 521 356 _gemwin; +#X connect 15 0 16 0; +#X connect 16 0 35 0; +#X connect 16 2 17 0; +#X connect 17 0 16 1; +#X connect 18 0 19 0; +#X connect 19 0 16 0; +#X connect 26 0 28 1; +#X connect 27 0 26 0; +#X connect 28 0 53 0; +#X connect 29 0 28 2; +#X connect 30 0 29 0; +#X connect 35 0 28 0; diff --git a/help/pix_frei0r-help.pd b/help/pix_frei0r-help.pd index 245ffd7bc..11fe265fe 100644 --- a/help/pix_frei0r-help.pd +++ b/help/pix_frei0r-help.pd @@ -1,64 +1,30 @@ #N canvas 19 86 676 556 10; #X declare -lib Gem; #X text 482 18 GEM object; -#X obj 7 376 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 376 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 378 Inlets:; #X text 11 478 Outlets:; -#X obj 8 340 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 340 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 342 Arguments:; -#X obj 8 56 cnv 15 430 280 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 56 cnv 15 430 280 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 451 58 Example:; #X text 71 31 Class: pix object; #X text 29 491 Outlet 1: gemlist; #X text 22 392 Inlet 1: gemlist; -#X obj 13 512 cnv 15 410 30 empty empty empty 20 12 0 14 -260818 -66577 -0; +#X obj 13 512 cnv 15 410 30 empty empty empty 20 12 0 14 #fcac44 #404040 0; #X text 50 12 Synopsis: [pix_frei0r]; #X text 63 353 : the plugin to load; -#X text 13 72 This object allows you to load any Frei0r video-effect. -Frei0r is a minimalistic plugin API for realtime video effects.; -#X text 15 513 You can get more information as well as links to downloadable -plugin-packs at http://piksel.org/frei0r; -#X msg 455 330 gemList; -#X text 12 308 Plugins are searched in all the paths that Pd searches -for abstractions \, ...!; +#X text 13 72 This object allows you to load any Frei0r video-effect. Frei0r is a minimalistic plugin API for realtime video effects.; +#X text 15 513 You can get more information as well as links to downloadable plugin-packs at http://piksel.org/frei0r; +#X text 12 308 Plugins are searched in all the paths that Pd searches for abstractions \, ...!; #X text 28 56 Description: run a Frei0r effect; #X obj 449 113 gemhead; -#X obj 448 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 514 340 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 519 379 pd gemwin; -#X msg 519 360 create; -#X text 515 339 Create window:; +#X obj 448 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 514 344 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 451 83 gemhead; -#X obj 451 342 square 3; -#X obj 451 320 pix_texture; #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -77,14 +43,11 @@ for abstractions \, ...!; #X text 523 114 macOS: quicktime; #X text 516 104 MS Windows: *.AVI; #X text 523 124 linux: depends...; -#X obj 450 227 cnv 15 160 85 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X floatatom 567 241 5 0 0 0 - - -; -#X obj 463 241 hsl 100 15 0 1 0 0 empty empty xSize -2 -6 0 10 -262144 --1 -1 0 1; -#X floatatom 567 270 5 0 0 0 - - -; -#X obj 463 270 hsl 100 15 0 1 0 0 empty empty ySize -2 -6 0 10 -262144 --1 -1 0 1; +#X obj 450 227 cnv 15 160 85 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X floatatom 567 241 5 0 0 0 - - - 0; +#X obj 463 241 hsl 100 15 0 1 0 0 empty empty xSize -2 -6 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 567 270 5 0 0 0 - - - 0; +#X obj 463 270 hsl 100 15 0 1 0 0 empty empty ySize -2 -6 0 10 #fcfcfc #000000 #000000 0 1; #X text 442 411 This example relies on; #X obj 451 180 pix_rgba; #X text 513 176 Frei0r plugins; @@ -93,41 +56,34 @@ for abstractions \, ...!; #X text 442 426 finding the "pixeliz0r" plugin; #X text 445 457 plugin set) in Pd's search path; #X text 443 441 (which is part of the official frei0r; -#X text 12 112 If you specify the plugin when creating the object (e.g -[pix_frei0r bw0r] or [pix_bw0r] \, the plugin is fixed and you cannot -change it (apart from deleting the object and creating a new one); -#X text 13 163 However \, if you only create an object [pix_frei0r] -(without specifying the plugin \, you will get a dynamic version \, -where you can load in a plugin using the "load" message.; -#X text 12 202 Most plugins have a number of parameters which you can -use to change the behaviour of the effect while it runs. For each parameter -exposed \, the [pix_frei0r] object will get one additional inlet \, -which can be used to modify the given parameter. Alternatively (e.g. -when using dynamic plugin instances) you can also use the parametername -or "#" (starting from 1).; -#X text 13 284 Frei0r numerical parameters are supposed to be in the -range 0..1.; -#X text 21 453 Inlet 2..N (if applicable): : depending on the -settable parameter; -#X text 22 419 Inlet 1: # : set parameter # (starting -from 1); -#X text 22 441 Inlet 1: : set parameter given by -; -#X obj 548 18 declare -lib Gem; -#X text 22 406 Inlet 1: load : load another plugin (if applicable) -; -#X connect 22 0 23 0; -#X connect 23 0 22 0; -#X connect 25 0 28 0; -#X connect 27 0 26 0; -#X connect 28 0 43 0; -#X connect 28 2 29 0; -#X connect 29 0 28 1; -#X connect 30 0 31 0; -#X connect 31 0 28 0; -#X connect 38 0 46 1; -#X connect 39 0 38 0; -#X connect 40 0 46 2; -#X connect 41 0 40 0; -#X connect 43 0 46 0; -#X connect 46 0 27 0; +#X text 12 112 If you specify the plugin when creating the object (e.g [pix_frei0r bw0r] or [pix_bw0r] \, the plugin is fixed and you cannot change it (apart from deleting the object and creating a new one); +#X text 13 163 However \, if you only create an object [pix_frei0r] (without specifying the plugin \, you will get a dynamic version \, where you can load in a plugin using the "load" message.; +#X text 12 202 Most plugins have a number of parameters which you can use to change the behaviour of the effect while it runs. For each parameter exposed \, the [pix_frei0r] object will get one additional inlet \, which can be used to modify the given parameter. Alternatively (e.g. when using dynamic plugin instances) you can also use the parametername or "#" (starting from 1).; +#X text 13 284 Frei0r numerical parameters are supposed to be in the range 0..1.; +#X text 21 453 Inlet 2..N (if applicable): : depending on the settable parameter; +#X text 22 419 Inlet 1: # : set parameter # (starting from 1); +#X text 22 441 Inlet 1: : set parameter given by ; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION run a Frei0r effect; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist load list ; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 548 18 pd META; +#X text 22 406 Inlet 1: load : load another plugin (if applicable); +#X obj 521 350 _gemwin; +#X obj 451 320 _pix2rectangle 3; +#X connect 21 0 22 0; +#X connect 22 0 37 0; +#X connect 22 2 23 0; +#X connect 23 0 22 1; +#X connect 24 0 25 0; +#X connect 25 0 22 0; +#X connect 32 0 40 1; +#X connect 33 0 32 0; +#X connect 34 0 40 2; +#X connect 35 0 34 0; +#X connect 37 0 40 0; +#X connect 40 0 54 0; diff --git a/help/pix_gain-help.pd b/help/pix_gain-help.pd index d02a6bc1b..d8f6c66eb 100644 --- a/help/pix_gain-help.pd +++ b/help/pix_gain-help.pd @@ -1,90 +1,53 @@ -#N canvas 394 120 624 402 10; +#N canvas 394 120 624 410 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 275 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 275 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 278 Inlets:; -#X text 38 355 Outlets:; -#X obj 8 236 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X text 38 365 Outlets:; +#X obj 8 236 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 235 Arguments:; -#X obj 7 76 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 148 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 274 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 246 ; -#X text 56 368 Outlet 1: gemlist; +#X text 56 378 Outlet 1: gemlist; #X text 23 292 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 451 206 pix_gain; +#X obj 451 253 _pix2rectangle 3; +#X obj 451 193 pix_gain; #X text 50 12 Synopsis: [pix_gain]; #X text 29 76 Description: multiply pixel-values; -#X floatatom 476 151 5 0 0 1 common - -; -#X msg 527 179 1 0.5 0; -#X msg 528 201 0 0.4 0.8 1; -#X text 10 93 pix_gain applies a gain multiplier to each pixel in a -pix. The float is a constant modifier applied to all color components. -If you use just R G B \, it assumes an alpha of 1.0.; -#X text 13 152 NOTE: while you can use this \, remember that you can -often achieve the very same thing using the [color]-object for coloring -the Geo onto which the image data is textured \, which could be done -on the gfx-card (very efficient!) \, while [pix_gain] is always(!) -done on the CPU!!!; -#X text 23 305 Inlet 1: : multiplier for all channels; -#X text 23 321 Inlet 2: list: 3 (RGB) or 4 (RGBA) values as multipliers -for each channels; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 24 0 21 0; -#X connect 27 0 24 1; -#X connect 28 0 24 2; -#X connect 29 0 24 2; +#X floatatom 473 148 5 0 0 1 common - - 0; +#X msg 527 166 1 0.5 0; +#X msg 528 188 0 0.4 0.8 1; +#X text 10 93 pix_gain applies a gain multiplier to each pixel in a pix. The float is a constant modifier applied to all color components. If you use just R G B \, it assumes an alpha of 1.0.; +#X text 13 152 NOTE: while you can use this \, remember that you can often achieve the very same thing using the [color]-object for coloring the Geo onto which the image data is textured \, which could be done on the gfx-card (very efficient!) \, while [pix_gain] is always(!) done on the CPU!!!; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION multiply pixel-values; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist saturate; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 523 280 _gemwin; +#X obj 451 113 pix_test; +#X msg 480 216 saturate \$1; +#X obj 557 216 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X text 23 318 Inlet 2: : multiplier for all channels; +#X text 23 331 Inlet 3: list: 3 (RGB) or 4 (RGBA) values as multipliers for each channel., f 68; +#X text 23 302 Inlet 1: saturate 1|0; +#X connect 11 0 27 0; +#X connect 17 0 16 0; +#X connect 20 0 17 1; +#X connect 21 0 17 2; +#X connect 22 0 17 2; +#X connect 27 0 17 0; +#X connect 28 0 17 0; +#X connect 29 0 28 0; diff --git a/help/pix_grey-help.pd b/help/pix_grey-help.pd index a2adac138..47f7bdfc7 100644 --- a/help/pix_grey-help.pd +++ b/help/pix_grey-help.pd @@ -10,50 +10,13 @@ #X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; -#N canvas 0 22 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); +#X obj 451 233 _pix2rectangle 3; #X text 50 12 Synopsis: [pix_grey]; #X text 15 77 Description: convert the colorspace of an image to GREY; #X text 22 93 Images can be stored in various formats/color-spaces.; @@ -67,11 +30,18 @@ #X obj 248 338 pix_rgba; #X obj 24 390 pix_2grey; #X text 97 384 produces similar ("grey") results \, but does NO colourspace-conversion!!; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 29 0; -#X connect 29 0 21 0; -#X connect 30 0 29 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert the colorspace of an image to GREY; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 113 pix_test; +#X obj 523 259 _gemwin; +#X connect 11 0 31 0; +#X connect 22 0 16 0; +#X connect 23 0 22 0; +#X connect 31 0 22 0; diff --git a/help/pix_halftone-help.pd b/help/pix_halftone-help.pd index c89903302..d845db2db 100644 --- a/help/pix_halftone-help.pd +++ b/help/pix_halftone-help.pd @@ -1,46 +1,18 @@ #N canvas 318 61 628 469 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 335 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 261 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 300 pd gemwin; -#X msg 519 281 create; -#X text 515 260 Create window:; -#X obj 450 133 cnv 15 160 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 261 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 133 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -62,21 +34,15 @@ #X text 50 13 Synopsis: [pix_halftone]; #X text 71 31 Class: pix object (fx); #X obj 451 206 pix_halftone; -#X obj 451 237 pix_texture; -#X obj 451 261 square 3; -#X floatatom 467 150 5 1 32 2 size - -; -#X floatatom 515 150 5 0 0 2 angle - -; -#X floatatom 560 150 5 0 1 2 smooth - -; -#X obj 536 187 hradio 15 1 0 5 empty empty style 40 -6 0 8 -262144 --1 -1 0; -#X msg 539 205 style \$1; +#X floatatom 467 150 5 1 32 2 size - - 0; +#X floatatom 515 150 5 0 0 2 angle - - 0; +#X floatatom 560 150 5 0 1 2 smooth - - 0; +#X obj 536 187 hradio 15 1 0 5 empty empty style 40 -6 0 8 #fcfcfc #000000 #000000 0; +#X msg 536 206 style \$1; #X text 29 76 Description: make halftone-patterns; -#X text 19 97 [pix_halftone] draws the input using the patterns of -dots or diamonds that are found in newspaper photographs.; -#X text 20 132 You can set the type of pattern \, the size and orientation -of the patterns and how blurry they are on-screen.; -#X text 63 275 Inlet 1: message: style [0|1|2|3|4]:: select a style -; +#X text 19 97 [pix_halftone] draws the input using the patterns of dots or diamonds that are found in newspaper photographs.; +#X text 20 132 You can set the type of pattern \, the size and orientation of the patterns and how blurry they are on-screen.; +#X text 63 275 Inlet 1: message: style [0|1|2|3|4]:: select a style; #X text 62 291 Inlet 2: float: pattern-size (1..32. default 8); #X text 62 306 Inlet 3: float: orientation in degree (0..360); #X text 62 321 Inlet 4: float: smoothness (0..1. default 0.5); @@ -85,16 +51,26 @@ of the patterns and how blurry they are on-screen.; #X text 111 405 2...diamond dots; #X text 111 418 3...'euclidean' dots; #X text 111 431 4...postscript diamond dots; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 24 0; -#X connect 24 0 25 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION make halftone-patterns; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist style; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 237 _pix2rectangle 3; +#X obj 521 268 _gemwin; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 21 0; +#X connect 21 0 40 0; +#X connect 22 0 21 1; +#X connect 23 0 21 2; +#X connect 24 0 21 3; #X connect 25 0 26 0; -#X connect 27 0 24 1; -#X connect 28 0 24 2; -#X connect 29 0 24 3; -#X connect 30 0 31 0; -#X connect 31 0 24 0; +#X connect 26 0 21 0; diff --git a/help/pix_histo-help.pd b/help/pix_histo-help.pd index 892aa3eae..c92b33ddd 100644 --- a/help/pix_histo-help.pd +++ b/help/pix_histo-help.pd @@ -1,47 +1,19 @@ #N canvas 230 118 660 604 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 405 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 405 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 408 Inlets:; #X text 38 505 Outlets:; -#X obj 8 336 cnv 15 430 60 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 336 cnv 15 430 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 335 Arguments:; -#X obj 7 76 cnv 15 430 250 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 250 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 143 cnv 15 180 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 264 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 143 cnv 15 180 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,21 +30,13 @@ #X text 56 518 Outlet 1: gemlist; #X text 63 422 Inlet 1: gemlist; #X text 50 12 Synopsis: [pix_color]; -#X obj 451 253 pix_draw; +#X obj 451 243 _pix2rectangle 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X text 20 101 [pix_histo] will get the histogram (density function) -of an image.; -#X text 21 140 The histogram will be stored in tables. If you specify -(via creation-arguments or via the "set"-command) only one table \, -a histogram of the greyscaled-image will be made. If you provide 3 -tables \, the Alpha channel will be ignored.; -#X text 21 200 The length of the used table does not matter. The first -element of the table will always hold the density of the "0"(min) value -\, the last element will hold the density of the "255"(max) value. -; -#X text 23 259 The histogram will be scaled \, so that all densities -sum up to 1.0f; +#X text 20 101 [pix_histo] will get the histogram (density function) of an image.; +#X text 21 140 The histogram will be stored in tables. If you specify (via creation-arguments or via the "set"-command) only one table \, a histogram of the greyscaled-image will be made. If you provide 3 tables \, the Alpha channel will be ignored.; +#X text 21 200 The length of the used table does not matter. The first element of the table will always hold the density of the "0"(min) value \, the last element will hold the density of the "255"(max) value.; +#X text 23 259 The histogram will be scaled \, so that all densities sum up to 1.0f; #X text 29 75 Description: excerpt histograms of an image; #X obj 158 543 table tab-1; #X obj 242 544 table tab-2; @@ -88,19 +52,23 @@ sum up to 1.0f; #X text 63 346 1 arg:: to store grey-histogram; #X text 62 363 3 args: s to store RGB-histograms; #X text 62 378 4 args: s to store RGBA-histograms; -#X text 63 435 Inlet 1: set : table to store grey-histogram -; -#X text 63 449 Inlet 1: set : tables to store -RGB-histograms; -#X text 63 474 Inlet 1: set : tables -to store RGBA-histograms; -#X obj 528 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 34 0; -#X connect 32 0 34 0; -#X connect 34 0 21 0; -#X connect 35 0 34 0; -#X connect 36 0 34 0; +#X text 63 435 Inlet 1: set
: table to store grey-histogram; +#X text 63 449 Inlet 1: set : tables to store RGB-histograms; +#X text 63 474 Inlet 1: set : tables to store RGBA-histograms; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION excerpt histograms of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 528 8 pd META; +#X obj 522 271 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 31 0; +#X connect 29 0 31 0; +#X connect 31 0 18 0; +#X connect 32 0 31 0; +#X connect 33 0 31 0; diff --git a/help/pix_hsv2rgb-help.pd b/help/pix_hsv2rgb-help.pd index 1cb35b02a..ad510e43b 100644 --- a/help/pix_hsv2rgb-help.pd +++ b/help/pix_hsv2rgb-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 626 365 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,27 +30,30 @@ #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; +#X obj 451 233 _pix2rectangle 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 186 pix_hsv2rgb; -#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; +#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; #X text 63 275 Inlet 1: 1|0 : apply/don't apply (default:1); #X text 50 12 Synopsis: [pix_hsv2rgb]; #X text 29 76 Description: convert HSV into RGB; -#X text 25 104 [pix_hsv2rgb] will (virtually) transform an HSV(hue -\, saturation \, value)images into RGB(red \, green \, blue) color-space. -; -#X text 24 156 On the technical (internal) side \, the image is always -RGBA. The Red-channel is interpreted as Hue-values....; +#X text 25 104 [pix_hsv2rgb] will (virtually) transform an HSV(hue \, saturation \, value)images into RGB(red \, green \, blue) color-space.; +#X text 24 156 On the technical (internal) side \, the image is always RGBA. The Red-channel is interpreted as Hue-values....; #X text 94 340 see also:; #X obj 187 338 pix_rgb2hsv; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 24 0 21 0; -#X connect 25 0 24 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert HSV into RGB; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 258 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 21 0; +#X connect 21 0 18 0; +#X connect 22 0 21 0; diff --git a/help/pix_image-help.pd b/help/pix_image-help.pd index 247c80b68..ed2e8b99c 100644 --- a/help/pix_image-help.pd +++ b/help/pix_image-help.pd @@ -1,49 +1,21 @@ #N canvas 265 101 690 395 10; #X declare -lib Gem; #X text 502 8 GEM object; -#X obj 8 295 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 295 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 298 Inlets:; #X text 38 355 Outlets:; -#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 256 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 255 Arguments:; -#X obj 7 76 cnv 15 430 175 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 230 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 175 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 230 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 451 148 cnv 15 220 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 564 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 148 cnv 15 220 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 56 368 Outlet 1: gemlist; #X text 63 312 Inlet 1: gemlist; -#X obj 451 263 pix_draw; -#X obj 467 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 451 263 _pix2rectangle 3; +#X obj 467 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 openpanel 0; #X obj 114 62 inlet; #X obj 121 254 outlet; @@ -61,38 +33,35 @@ #X text 29 76 Description: loads in an image file; #X text 50 12 Synopsis: [pix_image]; #X text 71 31 Class: pix source; -#X text 16 93 [pix_image] loads in an image to be used a texture \, -bitblit \, or something else. If you don't give it a default image -file \, you can send the open message with a filename.; +#X text 16 93 [pix_image] loads in an image to be used a texture \, bitblit \, or something else. If you don't give it a default image file \, you can send the open message with a filename.; #X text 63 266 ; -#X text 15 202 The image can be either drawn directly using [pix_draw] -(VERY slow) or applied as a texture onto a Geo ([pix_texture]); #X text 63 338 Inlet 1: thread <1|0>; #X text 237 339 see; #N canvas 747 482 552 300 threaded 0; -#X text 53 58 on some systems (namely: linux) \, [pix_image] will usually -be compiled with threaded image-loading.; -#X text 52 90 this will make loading of images more smooth \, as chances -are low that it will block the entire Pd-process.; -#X text 56 130 caveat: some users have reported problems when using -large numbers of [pix_image]s (e.g. 300) which will create 300 helper-threads. -this might eventually slow down your machine.; -#X text 57 197 you can turn off thread-loading by sending a [thread -0( message to [pix_image] _before_ loading an image.; +#X text 53 58 on some systems (namely: linux) \, [pix_image] will usually be compiled with threaded image-loading.; +#X text 52 90 this will make loading of images more smooth \, as chances are low that it will block the entire Pd-process.; +#X text 56 130 caveat: some users have reported problems when using large numbers of [pix_image]s (e.g. 300) which will create 300 helper-threads. this might eventually slow down your machine.; +#X text 57 197 you can turn off thread-loading by sending a [thread 0( message to [pix_image] _before_ loading an image.; #X restore 272 340 pd threaded loading; #X msg 521 196 thread \$1; -#X obj 521 177 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X text 15 138 [pix_image] loads in TIFFs \, JPEGs and probably more -(depending on your platform and how Gem was compiled); +#X obj 521 177 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X text 15 138 [pix_image] loads in TIFFs \, JPEGs and probably more (depending on your platform and how Gem was compiled); #X obj 451 226 pix_image examples/data/fractal.JPG; -#X obj 578 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 34 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 34 0; -#X connect 31 0 34 0; -#X connect 32 0 31 0; -#X connect 34 0 17 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION loads in an image file; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist open thread; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 578 8 pd META; +#X text 14 202 The image can be either drawn directly using [pix_draw] (VERY slow) or applied as a texture onto a Geo ([pix_texture]), f 68; +#X obj 569 257 _gemwin; +#X connect 11 0 30 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 30 0; +#X connect 27 0 30 0; +#X connect 28 0 27 0; +#X connect 30 0 14 0; diff --git a/help/pix_imageInPlace-help.pd b/help/pix_imageInPlace-help.pd index e2d72fa8d..d56ba89e5 100644 --- a/help/pix_imageInPlace-help.pd +++ b/help/pix_imageInPlace-help.pd @@ -1,85 +1,54 @@ #N canvas 6 61 629 507 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 335 cnv 15 430 160 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 335 cnv 15 430 160 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 341 Inlets:; #X text 38 465 Outlets:; -#X obj 8 300 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 300 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 299 Arguments:; -#X obj 7 76 cnv 15 430 220 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 128 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 128 cnv 15 160 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 16 478 Outlet 1: gemlist; #X text 23 355 Inlet 1: gemlist; #X text 71 31 Class: pix source; #X obj 451 256 square; -#X floatatom 544 203 3 0 5 0 image# - -; +#X floatatom 544 203 3 0 5 0 image$ - - 0; #X text 29 76 Description: loads in multiple image files; #X text 63 311 (with wildcard *) for images to load; #X text 23 448 Inlet 2: : select image (starting at 0); #X obj 451 226 pix_imageInPlace; #X text 456 376 see also:; #X obj 522 376 pix_multiimage; -#X text 25 158 This is potentially slow if you are trying to change -between a lot of images \, but it doesn't use a lot of texture ram. -; -#X text 25 199 [pix_imageInPlace] sends all of the image data to texture -RAM when the preload message is received. This means that you cannot -process any of the pixel data \, but it is extremely quick to change -between the various images.; -#X text 20 257 Additionally \, you do not need a [pix_texture] object. -; -#X text 34 277 [pix_imageInPlace] loads TIFF \, JPEG and PNG images. -; +#X text 25 158 This is potentially slow if you are trying to change between a lot of images \, but it doesn't use a lot of texture ram.; +#X text 25 199 [pix_imageInPlace] sends all of the image data to texture RAM when the preload message is received. This means that you cannot process any of the pixel data \, but it is extremely quick to change between the various images.; +#X text 20 257 Additionally \, you do not need a [pix_texture] object.; +#X text 34 277 [pix_imageInPlace] loads TIFF \, JPEG and PNG images.; #X text 50 12 Synopsis: [pix_imageInPlace]; #X msg 474 161 download; #X msg 475 188 purge; #X msg 460 135 preload myFiles*.tif 5; -#X text 23 368 Inlet 1: preload <#> : open images (the wildcard -in the filename is expanded with integer 0..#); -#X text 23 397 Inlet 1: download : load the "preload"ed images into -texture-RAM; +#X text 23 368 Inlet 1: preload <#> : open images (the wildcard in the filename is expanded with integer 0..#); +#X text 23 397 Inlet 1: download : load the "preload"ed images into texture-RAM; #X text 24 427 Inlet 1: purge: delete images from texture-RAM; -#X text 24 100 [pix_imageInPlace] is slightly different than [pix_multiimage]. -When you select an image to display with [pix_multiimage] \, it copies -over the image data to the pix-buffer \, which is then used by [pix_texture]. -; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 23 0; -#X connect 19 0 23 1; -#X connect 23 0 18 0; -#X connect 31 0 23 0; -#X connect 32 0 23 0; -#X connect 33 0 23 0; +#X text 24 100 [pix_imageInPlace] is slightly different than [pix_multiimage]. When you select an image to display with [pix_multiimage] \, it copies over the image data to the pix-buffer \, which is then used by [pix_texture].; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION loads in multiple image files; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist preload download purge; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 260 _gemwin; +#X connect 11 0 20 0; +#X connect 16 0 20 1; +#X connect 20 0 15 0; +#X connect 28 0 20 0; +#X connect 29 0 20 0; +#X connect 30 0 20 0; diff --git a/help/pix_info-help.pd b/help/pix_info-help.pd index 4b56532ce..f18278d3e 100644 --- a/help/pix_info-help.pd +++ b/help/pix_info-help.pd @@ -9,27 +9,6 @@ #X obj 449 77 cnv 15 170 520 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 514 530 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 569 pd gemwin; -#X msg 519 550 create; -#X text 515 529 Create window:; #X obj 451 158 cnv 15 160 330 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; @@ -47,10 +26,8 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 503 pix_texture; #X text 57 393 Outlet 1: gemlist; #X text 63 332 Inlet 1: gemlist; -#X obj 451 525 square 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X floatatom 461 240 4 0 0 1 width - - 0; @@ -66,7 +43,22 @@ #X text 57 490 Outlet 8: pointer: image-data; #X text 57 459 Outlet 6: list: ; #X text 57 476 Outlet 7: list: ; -#X obj 518 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION get information about the current image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist symbolic; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 int; +#X text 20 145 OUTLET_2 int; +#X text 20 165 OUTLET_3 int; +#X text 20 185 OUTLET_4 int; +#X text 20 205 OUTLET_5 list; +#X text 20 225 OUTLET_6 list; +#X text 20 245 OUTLET_7 pointer; +#X text 10 265 AUTHOR IOhannes m zmölnig; +#X text 10 285 LICENSE GPL v2; +#X restore 518 8 pd META; #X obj 451 265 pix_info -m, f 25; #X obj 451 162 pix_info, f 20; #X obj 461 314 unpack; @@ -93,29 +85,28 @@ #X obj 461 291 route dimen bytes/pixel format; #X obj 460 421 route dimen bytes/pixel format; #X obj 544 444 symbol; -#X connect 9 0 10 0; -#X connect 10 0 9 0; -#X connect 13 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 38 0; -#X connect 17 0 20 0; -#X connect 37 0 49 0; -#X connect 37 1 60 0; -#X connect 38 0 37 0; -#X connect 38 1 23 0; -#X connect 38 2 24 0; -#X connect 38 3 25 0; -#X connect 38 4 26 0; -#X connect 39 0 40 0; -#X connect 39 1 41 0; -#X connect 45 0 46 0; -#X connect 45 1 47 0; -#X connect 49 0 17 0; -#X connect 49 1 61 0; -#X connect 60 0 39 0; -#X connect 60 1 42 0; -#X connect 60 2 43 0; -#X connect 61 0 45 0; -#X connect 61 1 48 0; -#X connect 61 2 62 0; -#X connect 62 0 50 0; +#X obj 520 538 _gemwin; +#X obj 451 496 _pix2rectangle 3; +#X connect 10 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 33 0; +#X connect 32 0 44 0; +#X connect 32 1 55 0; +#X connect 33 0 32 0; +#X connect 33 1 18 0; +#X connect 33 2 19 0; +#X connect 33 3 20 0; +#X connect 33 4 21 0; +#X connect 34 0 35 0; +#X connect 34 1 36 0; +#X connect 40 0 41 0; +#X connect 40 1 42 0; +#X connect 44 0 59 0; +#X connect 44 1 56 0; +#X connect 55 0 34 0; +#X connect 55 1 37 0; +#X connect 55 2 38 0; +#X connect 56 0 40 0; +#X connect 56 1 43 0; +#X connect 56 2 57 0; +#X connect 57 0 45 0; diff --git a/help/pix_invert-help.pd b/help/pix_invert-help.pd index 04ecb0748..b1931daf6 100644 --- a/help/pix_invert-help.pd +++ b/help/pix_invert-help.pd @@ -1,79 +1,40 @@ #N canvas 6 61 626 337 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; +#X obj 451 233 _pix2rectangle 3; +#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; #X text 63 275 Inlet 1: 1|0 : apply/don't apply (default:1); #X obj 451 186 pix_invert; #X text 29 76 Description: invert an image; -#X text 16 126 [pix_invert] will invert your image. Thus all black -pixels will become white and vice-versa.; +#X text 16 126 [pix_invert] will invert your image. Thus all black pixels will become white and vice-versa.; #X text 50 12 Synopsis: [pix_invert]; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 26 0; -#X connect 24 0 26 0; -#X connect 26 0 21 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION invert an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 258 _gemwin; +#X obj 451 113 pix_test; +#X connect 11 0 25 0; +#X connect 17 0 19 0; +#X connect 19 0 16 0; +#X connect 25 0 19 0; diff --git a/help/pix_kaleidoscope-help.pd b/help/pix_kaleidoscope-help.pd index c38d193b3..0edd8964c 100644 --- a/help/pix_kaleidoscope-help.pd +++ b/help/pix_kaleidoscope-help.pd @@ -1,140 +1,90 @@ #N canvas 102 92 647 538 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 7 206 cnv 15 430 280 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 206 cnv 15 430 280 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 208 Inlets:; #X text 11 458 Outlets:; -#X obj 8 166 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 166 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 168 Arguments:; -#X obj 8 56 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 447 85 cnv 15 190 400 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 447 85 cnv 15 190 400 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 451 68 Example:; -#X obj 531 420 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 536 459 pd gemwin; -#X msg 536 440 create; -#X text 532 419 Create window:; -#X obj 456 146 cnv 15 175 215 empty empty empty 20 12 0 14 -106138 --66577 0; +#X obj 531 420 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 456 146 cnv 15 175 215 empty empty empty 20 12 0 14 #64e864 #404040 0; #X text 71 31 Class: pix object; #X text 63 179 ; #X text 29 471 Outlet 1: gemlist; #X text 22 226 Inlet 1: gemlist; #X text 50 12 Synopsis: [pix_kaleidoscope]; #X text 28 56 Description: kaleidoscope effect; -#X text 13 72 This effect is similar to a traditional kaleidoscope -\, and allows you to reflect a part of the image multiple times around -a centre point. You can set how many segments you want the image reflected -as \, how the mirrors are rotated \, where the center of the output -images is \, and what part of the source image is used as the source. -; -#X obj 446 364 cnv 15 120 25 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X text 13 72 This effect is similar to a traditional kaleidoscope \, and allows you to reflect a part of the image multiple times around a centre point. You can set how many segments you want the image reflected as \, how the mirrors are rotated \, where the center of the output images is \, and what part of the source image is used as the source.; +#X obj 446 364 cnv 15 120 25 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 449 92 gemhead; -#X obj 508 93 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 181 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 449 121 pd image; -#X obj 449 391 pix_texture; -#X obj 449 413 square 3; -#X floatatom 464 149 5 0 64 1 segments - -; -#X floatatom 479 169 5 0 0 1 sourceAngle - -; -#X text 514 113 open an image; -#X text 507 126 (JPEG \, TIFF \, ..); +#X floatatom 464 149 5 0 64 1 segments - - 0; +#X floatatom 479 169 5 0 0 1 sourceAngle - - 0; #X obj 449 369 pix_kaleidoscope; -#X floatatom 510 245 5 0 0 1 outputAngle - -; -#X floatatom 556 341 5 0.1 10 1 sap - -; -#X floatatom 540 325 5 0 1 1 rlp - -; +#X floatatom 510 245 5 0 0 1 outputAngle - - 0; +#X floatatom 556 341 5 0.1 10 1 sap - - 0; +#X floatatom 540 325 5 0 1 1 rlp - - 0; #X obj 525 304 pack; #X obj 579 304 t b f; -#X floatatom 525 265 4 0 100 0 - - -; -#X floatatom 577 265 4 0 100 0 - - -; -#X text 22 243 Inlet 2: float: number of segments (0..64 \, default: -7); -#X text 22 260 Inlet 3: float: rotation of the input-segment (in degree) -; -#X text 22 277 Inlet 4: list : normalized center-position of -the of the segment of the input image. (0..1 \, default 0.5); -#X text 22 307 Inlet 5: float: rotation of the output-segment (in degree) -; -#X text 22 325 Inlet 6: list : normalized center-position of -the of the segments in the output image. (0..1 \, default 0.5); -#X text 22 353 Inlet 7: float: reflection line proportion \, controls -the relative sizes of each pair of adjacent segments in the output -image (0..1 \, default 0.5); -#X text 22 400 Inlet 8: float: source angle proportion \, sets the -angular size of the source segment \, relative to the size of the output -segment \; altering this value will squash or expand (0.1..10 \, default: -1); -#X obj 71 498 cnv 15 370 20 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 80 501 (ported from "pete's_plugins" \, www.petewarden.com) -; +#X floatatom 525 265 4 0 100 0 - - - 0; +#X floatatom 577 265 4 0 100 0 - - - 0; +#X text 22 243 Inlet 2: float: number of segments (0..64 \, default: 7); +#X text 22 260 Inlet 3: float: rotation of the input-segment (in degree); +#X text 22 277 Inlet 4: list : normalized center-position of the of the segment of the input image. (0..1 \, default 0.5); +#X text 22 307 Inlet 5: float: rotation of the output-segment (in degree); +#X text 22 325 Inlet 6: list : normalized center-position of the of the segments in the output image. (0..1 \, default 0.5); +#X text 22 353 Inlet 7: float: reflection line proportion \, controls the relative sizes of each pair of adjacent segments in the output image (0..1 \, default 0.5); +#X text 22 400 Inlet 8: float: source angle proportion \, sets the angular size of the source segment \, relative to the size of the output segment \; altering this value will squash or expand (0.1..10 \, default: 1); +#X obj 71 498 cnv 15 370 20 empty empty empty 20 12 0 14 #fcac44 #404040 0; +#X text 80 501 (ported from "pete's_plugins" \, www.petewarden.com); #X obj 525 284 * 0.01; #X obj 577 284 * 0.01; #X obj 495 226 pack; #X obj 549 226 t b f; -#X floatatom 495 187 4 0 100 0 - - -; -#X floatatom 547 187 4 0 100 0 - - -; +#X floatatom 495 187 4 0 100 0 - - - 0; +#X floatatom 547 187 4 0 100 0 - - - 0; #X obj 495 206 * 0.01; #X obj 547 206 * 0.01; -#X obj 538 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 22 0 24 0; -#X connect 23 0 24 1; -#X connect 24 0 31 0; -#X connect 25 0 26 0; -#X connect 27 0 31 1; -#X connect 28 0 31 2; -#X connect 31 0 25 0; -#X connect 32 0 31 4; -#X connect 33 0 31 7; -#X connect 34 0 31 6; -#X connect 35 0 31 5; -#X connect 36 0 35 0; -#X connect 36 1 35 1; -#X connect 37 0 48 0; -#X connect 38 0 49 0; -#X connect 48 0 35 0; -#X connect 49 0 36 0; -#X connect 50 0 31 3; -#X connect 51 0 50 0; -#X connect 51 1 50 1; -#X connect 52 0 54 0; -#X connect 53 0 55 0; -#X connect 54 0 50 0; -#X connect 55 0 51 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION kaleidoscope effect; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 list; +#X text 20 165 INLET_4 float; +#X text 20 185 INLET_5 list; +#X text 20 205 INLET_6 float; +#X text 20 225 INLET_7 float; +#X text 20 245 OUTLET_0 gemlist; +#X text 10 265 AUTHOR IOhannes m zmölnig; +#X text 10 285 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 540 425 _gemwin; +#X obj 449 121 pix_test; +#X obj 449 391 _pix2rectangle 3; +#X connect 19 0 49 0; +#X connect 20 0 22 1; +#X connect 21 0 22 2; +#X connect 22 0 50 0; +#X connect 23 0 22 4; +#X connect 24 0 22 7; +#X connect 25 0 22 6; +#X connect 26 0 22 5; +#X connect 27 0 26 0; +#X connect 27 1 26 1; +#X connect 28 0 39 0; +#X connect 29 0 40 0; +#X connect 39 0 26 0; +#X connect 40 0 27 0; +#X connect 41 0 22 3; +#X connect 42 0 41 0; +#X connect 42 1 41 1; +#X connect 43 0 45 0; +#X connect 44 0 46 0; +#X connect 45 0 41 0; +#X connect 46 0 42 0; +#X connect 49 0 22 0; diff --git a/help/pix_levels-help.pd b/help/pix_levels-help.pd index d4b297122..bd51bf183 100644 --- a/help/pix_levels-help.pd +++ b/help/pix_levels-help.pd @@ -10,27 +10,6 @@ #X obj 449 77 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 514 314 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 353 pd gemwin; -#X msg 519 334 create; -#X text 515 313 Create window:; #X obj 450 138 cnv 15 160 150 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; @@ -54,11 +33,9 @@ #X connect 7 0 6 0; #X connect 8 0 7 0; #X restore 451 113 pd image; -#X obj 451 293 pix_texture; #X text 63 186 ; #X text 51 497 Outlet 1: gemlist; #X text 33 232 Inlet 1: gemlist; -#X obj 451 315 square 3; #X text 50 12 Synopsis: [pix_levels]; #X floatatom 543 250 5 0 100 1 low - - 0; #X floatatom 543 268 5 0 100 1 high - - 0; @@ -85,22 +62,35 @@ #X msg 536 193 0 0.1 1 0.5; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X obj 523 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 32 0; -#X connect 18 0 22 0; -#X connect 24 0 32 5; -#X connect 25 0 32 6; -#X connect 26 0 32 0; -#X connect 27 0 26 0; -#X connect 28 0 34 0; -#X connect 29 0 30 0; -#X connect 30 0 32 0; -#X connect 31 0 32 1; -#X connect 32 0 18 0; -#X connect 33 0 32 3; -#X connect 34 0 32 0; -#X connect 46 0 32 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION level adjustment; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist auto uni inv; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 INLET_3 list; +#X text 20 165 INLET_4 list; +#X text 20 185 INLET_5 float; +#X text 20 205 INLET_6 float; +#X text 20 225 OUTLET_0 gemlist; +#X text 10 245 AUTHOR IOhannes m zmölnig; +#X text 10 265 LICENSE GPL v2; +#X restore 523 8 pd META; +#X obj 522 318 _gemwin; +#X obj 451 293 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 27 0; +#X connect 19 0 27 5; +#X connect 20 0 27 6; +#X connect 21 0 27 0; +#X connect 22 0 21 0; +#X connect 23 0 29 0; +#X connect 24 0 25 0; +#X connect 25 0 27 0; +#X connect 26 0 27 1; +#X connect 27 0 46 0; +#X connect 28 0 27 3; +#X connect 29 0 27 0; +#X connect 41 0 27 2; diff --git a/help/pix_lumaoffset-help.pd b/help/pix_lumaoffset-help.pd index 2d1dabef7..05bd07f7f 100644 --- a/help/pix_lumaoffset-help.pd +++ b/help/pix_lumaoffset-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 629 393 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 451 138 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 138 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,46 +27,46 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 57 323 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 451 255 square 3; #X obj 451 207 pix_lumaoffset; -#X text 29 77 Description: offset pixels depending on the luminance -; -#X floatatom 497 152 5 0 0 2 offset - -; -#X floatatom 544 152 5 0 0 2 gap - -; +#X text 29 77 Description: offset pixels depending on the luminance; +#X floatatom 497 152 5 0 0 2 offset - - 0; +#X floatatom 544 152 5 0 0 2 gap - - 0; #X text 63 275 Inlet 2: float: offset-factor; #X text 64 288 Inlet 3: float: spacing between lines; -#X obj 533 169 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 533 169 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 533 187 smooth \$1; #X msg 465 186 fill \$1; -#X obj 465 168 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 465 168 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 63 259 Inlet 1: message: smooth [0|1] : do smooth fill; #X text 63 245 Inlet 1: message: fill [0|1] : draw filled lines; -#X text 13 91 [pix_lumaoffset] will offset each pixel in the y-direction -according to its luminance value. The amount of offsetting can be specified -as well as a gap between the offsetted lines. The gap can be filled -or left black \, if filled \, the transition can be smoothed.; +#X text 13 91 [pix_lumaoffset] will offset each pixel in the y-direction according to its luminance value. The amount of offsetting can be specified as well as a gap between the offsetted lines. The gap can be filled or left black \, if filled \, the transition can be smoothed.; #X text 50 12 Synopsis: [pix_lumaoffset]; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X text 13 357 NOTE: specifying too high offsets might cause crashes!!! -; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 23 0; -#X connect 18 0 22 0; -#X connect 23 0 18 0; -#X connect 25 0 23 1; -#X connect 26 0 23 2; -#X connect 29 0 30 0; -#X connect 30 0 23 0; -#X connect 31 0 23 0; -#X connect 32 0 31 0; +#X text 13 357 NOTE: specifying too high offsets might cause crashes!!!; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION offset pixels depending on the luminance; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist fill smooth; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 260 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 18 0; +#X connect 18 0 37 0; +#X connect 20 0 18 1; +#X connect 21 0 18 2; +#X connect 24 0 25 0; +#X connect 25 0 18 0; +#X connect 26 0 18 0; +#X connect 27 0 26 0; diff --git a/help/pix_mask-help.pd b/help/pix_mask-help.pd index 7b06f7044..f77a66431 100644 --- a/help/pix_mask-help.pd +++ b/help/pix_mask-help.pd @@ -1,46 +1,17 @@ #N canvas 71 263 665 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 33 229 Inlets:; #X text 33 285 Outlets:; -#X obj 8 191 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 191 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 190 Arguments:; -#X obj 8 56 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 56 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 56 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 39 Example:; -#X obj 514 269 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 92 create \, 1 \, color 0.5 0.5 0.5; -#X msg 198 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 308 pd gemwin; -#X msg 519 289 create; -#X text 515 268 Create window:; -#X obj 451 166 cnv 15 160 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 451 166 cnv 15 160 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 108 gemhead; -#X obj 496 91 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 91 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -54,11 +25,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 128 pd image; -#X obj 451 242 pix_texture; #X text 63 201 ; #X text 41 299 Outlet 1: gemlist; #X text 47 243 Inlet 1: gemlist; -#X obj 451 264 square 3; #X text 503 67 (JPEG \, TIFF \, ..); #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; @@ -73,34 +42,38 @@ #X connect 4 0 3 0; #X connect 5 0 1 0; #X restore 531 128 pd image; -#X obj 576 89 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 576 89 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 47 272 Inlet 2: gemlist; #X text 449 56 open two different images; #X text 71 31 Class: pix mix object; #X text 50 12 Synopsis: [pix_mask]; #X obj 451 177 pix_mask; #X text 29 57 Description: mask out a pix; -#X text 16 75 [pix_mask] uses one pix as a mask against another. Where -ever the mask has a black pixel \, the alpha component of the other -image will be set to 0 (transparent).; -#X text 19 115 Basically \, the luminance-value of the right pix will -become the alpha-value of the left pix.; +#X text 16 75 [pix_mask] uses one pix as a mask against another. Where ever the mask has a black pixel \, the alpha component of the other image will be set to 0 (transparent).; +#X text 19 115 Basically \, the luminance-value of the right pix will become the alpha-value of the left pix.; #X text 12 152 The 2 images have to be of the same size.; #X text 11 168 The left pix has to be in RGBA-space; #X obj 451 218 alpha; #X obj 531 108 gemhead 1; #X text 17 340 see also:; #X obj 82 342 pix_takealpha; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 29 0; -#X connect 17 0 21 0; -#X connect 23 0 29 1; -#X connect 24 0 23 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION mask out a pix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 491 267 _gemwin \; 0 \; 0 \; color 0.5 0.5 0.5; +#X obj 450 242 _pix2rectangle 3; +#X connect 10 0 12 0; +#X connect 11 0 12 1; +#X connect 12 0 23 0; +#X connect 17 0 23 1; +#X connect 18 0 17 1; +#X connect 23 0 29 0; #X connect 29 0 35 0; -#X connect 35 0 17 0; -#X connect 36 0 23 0; +#X connect 30 0 17 0; diff --git a/help/pix_mean_color-help.pd b/help/pix_mean_color-help.pd index 7a4119c83..330d56fc3 100644 --- a/help/pix_mean_color-help.pd +++ b/help/pix_mean_color-help.pd @@ -1,47 +1,19 @@ #N canvas 473 61 654 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 185 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 185 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 19 183 Inlets:; #X text 18 210 Outlets:; -#X obj 8 146 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 146 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 145 Arguments:; -#X obj 7 76 cnv 15 430 55 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 55 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 454 294 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 459 333 pd gemwin; -#X msg 459 314 create; -#X text 455 293 Create window:; -#X obj 450 141 cnv 15 160 65 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 454 294 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 141 cnv 15 160 65 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -66,41 +38,44 @@ #X text 43 197 Inlet 1: gemlist; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X obj 451 233 pix_texture; #X obj 451 146 pix_mean_color; #X text 50 12 Synopsis: [pix_mean_color]; -#X text 15 77 Description: get the mean color of the current image -; -#X text 22 93 Calculates the average color of the current image and -outputs it as RGBA values.; +#X text 15 77 Description: get the mean color of the current image; +#X text 22 93 Calculates the average color of the current image and outputs it as RGBA values.; #X obj 476 166 t l l; #X obj 514 166 unpack 0 0 0 0; #X obj 550 269 square 1; -#X obj 451 256 square 1; #X obj 550 231 gemhead; #X obj 550 250 color; -#X floatatom 514 186 3 0 0 0 - - -; -#X floatatom 537 186 3 0 0 0 - - -; -#X floatatom 560 186 3 0 0 0 - - -; -#X floatatom 583 186 3 0 0 0 - - -; +#X floatatom 514 186 3 0 0 0 - - - 0; +#X floatatom 537 186 3 0 0 0 - - - 0; +#X floatatom 560 186 3 0 0 0 - - - 0; +#X floatatom 583 186 3 0 0 0 - - - 0; #X obj 451 208 translateXYZ 0 2 0; -#X text 36 239 Outlet 2: : the -mean color of the image; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 23 0 31 0; -#X connect 24 0 38 0; -#X connect 24 1 28 0; -#X connect 28 0 33 1; -#X connect 28 1 29 0; -#X connect 29 0 34 0; -#X connect 29 1 35 0; -#X connect 29 2 36 0; -#X connect 29 3 37 0; -#X connect 32 0 33 0; -#X connect 33 0 30 0; -#X connect 38 0 23 0; +#X text 36 239 Outlet 2: : the mean color of the image; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION get the mean color of the current image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 ; #X text 43 412 Outlet 1: gemlist; #X text 50 322 Inlet 1: gemlist; -#X obj 451 253 pix_draw; +#X obj 451 253 _pix2rectangle 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X text 50 335 Inlet 1: 1|0 : apply/don't apply (default:1), f 45 -; +#X text 50 335 Inlet 1: 1|0 : apply/don't apply (default:1), f 45; #X obj 451 226 pix_metaimage; -#X floatatom 537 159 3 0 1 1 size - -; -#X obj 457 178 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X floatatom 537 159 3 0 1 1 size - - 0; +#X obj 457 178 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 457 196 cheap \$1; -#X obj 521 178 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 521 178 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 521 196 distance \$1; #X text 29 76 Description: display a pix by itself; #X text 49 12 Synopsis: [pix_metaimage]; -#X text 22 103 The output image is composed of many smaller versions -of the input image \, altered to match the colors of the area they -cover in the original image., f 67; -#X text 50 350 Inlet 1: cheap 1|0 : use cheap and nasty algorithm (default:0) -, f 62; -#X text 50 364 Inlet 1: distance 1|0 : use distance-based algorithm -(default:0), f 64; -#X obj 35 447 cnv 15 375 20 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 44 450 (ported from "pete's plugins" \, www.petewarden.com) -; +#X text 22 103 The output image is composed of many smaller versions of the input image \, altered to match the colors of the area they cover in the original image., f 67; +#X text 50 350 Inlet 1: cheap 1|0 : use cheap and nasty algorithm (default:0), f 62; +#X text 50 364 Inlet 1: distance 1|0 : use distance-based algorithm (default:0), f 64; +#X obj 35 447 cnv 15 375 20 empty empty empty 20 12 0 14 #fcac44 #404040 0; +#X text 44 450 (ported from "pete's plugins" \, www.petewarden.com); #X text 49 381 Inlet 2: : size; -#X text 22 148 Part of the scaling down process on the images involves -properly smoothing them \; turning the "cheap" parameter ON skips that -step \, giving a more jagged output but speeding up the processing. -, f 67; -#X text 22 205 The "distance" parameter controls how the size of the -images is changed by the 'size' message. If turned on \, then the size -doesn't scale linearly \, but is used as if the images were on a plane -in 3D space \, and controls the distance from the plane., f 67; -#X obj 518 9 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 25 0; -#X connect 25 0 21 0; -#X connect 26 0 25 1; -#X connect 27 0 28 0; -#X connect 28 0 25 0; -#X connect 29 0 30 0; -#X connect 30 0 25 0; +#X text 22 148 Part of the scaling down process on the images involves properly smoothing them \; turning the "cheap" parameter ON skips that step \, giving a more jagged output but speeding up the processing., f 67; +#X text 22 205 The "distance" parameter controls how the size of the images is changed by the 'size' message. If turned on \, then the size doesn't scale linearly \, but is used as if the images were on a plane in 3D space \, and controls the distance from the plane., f 67; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION display a pix by itself; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool cheap distance; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 9 pd META; +#X obj 491 302 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 22 0; +#X connect 22 0 18 0; +#X connect 23 0 22 1; +#X connect 24 0 25 0; +#X connect 25 0 22 0; +#X connect 26 0 27 0; +#X connect 27 0 22 0; diff --git a/help/pix_mix-help.pd b/help/pix_mix-help.pd index 0eca9f8aa..90527a18f 100644 --- a/help/pix_mix-help.pd +++ b/help/pix_mix-help.pd @@ -1,47 +1,19 @@ #N canvas 6 124 683 381 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 196 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 196 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 198 Inlets:; #X text 39 281 Outlets:; -#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 66 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; -#X obj 451 161 cnv 15 160 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 161 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 119 gemhead; #X text 71 31 Class: pix object; -#X obj 496 103 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 103 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,10 +27,8 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 138 pd image; -#X obj 451 267 pix_texture; #X text 17 295 Outlet 1: gemlist; #X text 23 212 Inlet 1: gemlist; -#X obj 451 289 square 3; #X text 503 88 (JPEG \, TIFF \, ..); #X obj 541 122 gemhead; #N canvas 0 0 587 366 image 0; @@ -71,9 +41,7 @@ #X obj 77 281 pix_buf; #X msg 103 257 auto 1; #X obj 103 236 loadbang; -#X text 156 263 [pix_buf] with auto 1 is important if we want to recalculate -our pix-effect each frame but don't want to reload the image all the -time.; +#X text 156 263 [pix_buf] with auto 1 is important if we want to recalculate our pix-effect each frame but don't want to reload the image all the time.; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 3 0 5 0; @@ -83,36 +51,39 @@ time.; #X connect 7 0 6 0; #X connect 8 0 7 0; #X restore 541 141 pd image; -#X obj 586 104 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 586 104 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 23 227 Inlet 2: gemlist; #X text 449 77 open two different images; #X text 50 12 Synopsis: [pix_mix]; -#X obj 476 177 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 6300 1; -#X floatatom 473 202 5 0 0 0 - - -; +#X obj 476 177 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 #fcfcfc #000000 #000000 6300 1; +#X floatatom 473 202 5 0 0 0 - - - 0; #X msg 530 201 0.7 0.7; #X text 29 67 Description: mix 2 images based on mixing factors; #X text 23 241 Inlet 3: list: weights for left/right image; #X text 63 166 list: [leftGain [rightGain]] (defaults: 0.5 0.5); #X obj 451 229 pix_mix 0; -#X text 14 81 [pix_mix] will mix 2 images just like a video-mixer. -You can supply mixing factors A and B \, and the result will be out=in1*A+in2*B. -If you supply only one factor A \, the result will be out=in1*(1-A)+in2*A. -; -#X text 22 255 Inlet 3: float: weight for left image. right weight -will be the reciprocal value (for crossfading); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 35 0; -#X connect 18 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 35 1; -#X connect 25 0 24 1; -#X connect 29 0 30 0; -#X connect 30 0 35 2; -#X connect 31 0 35 2; -#X connect 35 0 18 0; +#X text 14 81 [pix_mix] will mix 2 images just like a video-mixer. You can supply mixing factors A and B \, and the result will be out=in1*A+in2*B. If you supply only one factor A \, the result will be out=in1*(1-A)+in2*A.; +#X text 22 255 Inlet 3: float: weight for left image. right weight will be the reciprocal value (for crossfading); +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION mix 2 images based on mixing factors; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 INLET_2 list float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 296 _gemwin; +#X obj 451 267 _pix2rectangle 3; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 30 0; +#X connect 18 0 19 0; +#X connect 19 0 30 1; +#X connect 20 0 19 1; +#X connect 24 0 25 0; +#X connect 25 0 30 2; +#X connect 26 0 30 2; +#X connect 30 0 35 0; diff --git a/help/pix_motionblur-help.pd b/help/pix_motionblur-help.pd index 5bcc5c802..3fcd2f6ea 100644 --- a/help/pix_motionblur-help.pd +++ b/help/pix_motionblur-help.pd @@ -1,53 +1,23 @@ #N canvas 230 61 638 376 10; #X declare -lib Gem; #X text 442 8 GEM object; -#X obj 9 225 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 225 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 227 Inlets:; #X text 40 289 Outlets:; -#X obj 9 185 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 185 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 184 Arguments:; -#X obj 8 56 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; -#X obj 451 199 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 199 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 18 303 Outlet 1: gemlist; #X text 24 241 Inlet 1: gemlist; -#X obj 451 292 square 3; -#X obj 451 270 pix_texture; #X text 71 31 Class: pix object (timebased effect); #X obj 451 162 pix_film; #X obj 515 162 t f; -#X obj 464 105 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 105 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -61,7 +31,7 @@ #X connect 4 0 1 0; #X connect 5 0 4 0; #X restore 464 134 pd open; -#X floatatom 544 202 5 0 100 0 blur - -; +#X floatatom 544 202 5 0 100 0 blur - - 0; #X text 505 77 open a supported; #X text 506 88 movie-clip; #X text 505 109 macOS: quicktime; @@ -69,29 +39,29 @@ #X text 505 119 linux: depends...; #X obj 451 238 pix_motionblur; #X text 50 12 Synopsis: [pix_motionblur]; -#X text 29 57 Description: apply motionbluring on a series of images -; +#X text 29 57 Description: apply motionbluring on a series of images; #X obj 544 219 / 100; #X text 64 195 ; -#X text 24 254 Inlet 2: float: blur-factor (0..no blurring \, 1..only -blurring); -#X text 14 73 [pix_motionblur] applies a very simple and fast motion -blur to an image stream. the method used involves blending the current -image with a 'history' image and saving the result back to the 'history'. -the blending is the same as pix_mix output = (stream * gain) + (history -* 1 - gain) applying a higher blur factor will mix in more of the history -image and thus more of the history will be saved resulting in heavier -blurring.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 30 0; -#X connect 20 2 21 0; -#X connect 21 0 20 1; -#X connect 22 0 23 0; -#X connect 23 0 20 0; -#X connect 24 0 33 0; -#X connect 30 0 18 0; -#X connect 33 0 30 1; +#X text 24 254 Inlet 2: float: blur-factor (0..no blurring \, 1..only blurring); +#X text 14 73 [pix_motionblur] applies a very simple and fast motion blur to an image stream. the method used involves blending the current image with a 'history' image and saving the result back to the 'history'. the blending is the same as pix_mix output = (stream * gain) + (history * 1 - gain) applying a higher blur factor will mix in more of the history image and thus more of the history will be saved resulting in heavier blurring.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply motionbluring on a series of images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 518 295 _gemwin; +#X obj 451 267 _pix2rectangle 3; +#X connect 11 0 15 0; +#X connect 15 0 25 0; +#X connect 15 2 16 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 19 0 28 0; +#X connect 25 0 34 0; +#X connect 28 0 25 1; diff --git a/help/pix_movement-help.pd b/help/pix_movement-help.pd index 5f142fbd6..db37eac36 100644 --- a/help/pix_movement-help.pd +++ b/help/pix_movement-help.pd @@ -1,53 +1,23 @@ #N canvas 6 198 683 405 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 267 Inlets:; #X text 39 332 Outlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 549 329 pd gemwin; -#X msg 549 310 create; -#X text 545 289 Create window:; -#X obj 451 173 cnv 15 155 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 534 261 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 173 cnv 15 155 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 346 Outlet 1: gemlist; #X text 24 281 Inlet 1: gemlist; -#X obj 451 322 square 3; -#X obj 451 300 pix_texture; #X text 71 31 Class: pix object (timebased effect); #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -67,40 +37,41 @@ #X text 516 104 MS Windows: *.AVI; #X text 523 124 linux: depends...; #X text 29 57 Description: timebased IIR-filter; -#X floatatom 527 191 3 0 100 2 threshold - -; +#X floatatom 527 191 3 0 100 2 threshold - - 0; #X obj 451 232 pix_movement 0.5; #X obj 526 207 / 100; #X obj 451 279 alpha; -#X obj 481 258 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X text 17 125 since image-noise can disturb this processing \, changes -between two corresponding pixels that are smaller than -are ignored.; -#X text 19 163 For a movement detector you might get the center-of-movement -with a [pix_blob] that listens to the Alpha-channel afterwards.; -#X text 15 78 [pix_movement] detects movement between two subsequent -frames and stores it into the alpha-channel for RGBA-images and into -the luminance-channels for YUV-&Grayscale-images.; +#X obj 481 258 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; +#X text 17 125 since image-noise can disturb this processing \, changes between two corresponding pixels that are smaller than are ignored.; +#X text 19 163 For a movement detector you might get the center-of-movement with a [pix_blob] that listens to the Alpha-channel afterwards.; +#X text 15 78 [pix_movement] detects movement between two subsequent frames and stores it into the alpha-channel for RGBA-images and into the luminance-channels for YUV-&Grayscale-images.; #X text 64 237 float: (0..1); -#X text 24 303 Inlet 2: float: changes in the image that -are smaller then are ignored; +#X text 24 303 Inlet 2: float: changes in the image that are smaller then are ignored; #X text 50 12 Synopsis: [pix_movement]; #X obj 451 172 pix_rgba; #X text 457 370 see also:; #X obj 519 370 pix_movement2; -#X obj 548 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 41 0; -#X connect 20 2 21 0; -#X connect 21 0 20 1; -#X connect 22 0 23 0; -#X connect 23 0 20 0; -#X connect 30 0 32 0; -#X connect 31 0 33 0; -#X connect 32 0 31 1; -#X connect 33 0 18 0; -#X connect 34 0 33 0; -#X connect 41 0 31 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION timebased IIR-filter; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 451 330 _pix2rectangle 3; +#X obj 541 267 _gemwin; +#X connect 11 0 15 0; +#X connect 15 0 36 0; +#X connect 15 2 16 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 25 0 27 0; +#X connect 26 0 28 0; +#X connect 27 0 26 1; +#X connect 28 0 40 0; +#X connect 29 0 28 0; +#X connect 36 0 26 0; diff --git a/help/pix_movement2-help.pd b/help/pix_movement2-help.pd index 4cc225565..ade880fd5 100644 --- a/help/pix_movement2-help.pd +++ b/help/pix_movement2-help.pd @@ -1,53 +1,23 @@ #N canvas 315 171 666 422 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 270 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 270 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 277 Inlets:; #X text 39 369 Outlets:; -#X obj 9 227 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 549 329 pd gemwin; -#X msg 549 310 create; -#X text 545 289 Create window:; -#X obj 451 173 cnv 15 155 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 173 cnv 15 155 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 383 Outlet 1: gemlist; #X text 24 291 Inlet 1: gemlist; -#X obj 451 322 square 3; -#X obj 451 300 pix_texture; #X text 71 31 Class: pix object (timebased effect); #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -66,45 +36,45 @@ #X text 523 114 macOS: quicktime; #X text 516 104 MS Windows: *.AVI; #X text 523 124 linux: depends...; -#X floatatom 495 190 3 0 100 2 lo_threshold - -; +#X floatatom 495 190 3 0 100 2 lo_threshold - - 0; #X obj 494 206 / 100; #X text 50 12 Synopsis: [pix_movement2]; #X obj 451 232 pix_movement2; -#X floatatom 549 211 3 0 100 2 threshold - -; +#X floatatom 549 211 3 0 100 2 threshold - - 0; #X obj 548 227 / 100; #X msg 456 194 bang; -#X text 29 57 Description: timebase IIR-filter for motion detection -; -#X text 14 130 since image-noise can disturb this processing \, changes -between two corresponding pixels that are smaller than "threshold" -are ignored. The "threshold" is initially set to and adjusts -itself dynamically downwards towards (which is the absolute -minimum); +#X text 29 57 Description: timebase IIR-filter for motion detection; +#X text 14 130 since image-noise can disturb this processing \, changes between two corresponding pixels that are smaller than "threshold" are ignored. The "threshold" is initially set to and adjusts itself dynamically downwards towards (which is the absolute minimum); #X text 64 237 float: (0..1); #X text 66 252 float: (0..1); -#X text 24 306 Inlet 1: bang: set the current frame as "background" -; -#X text 24 323 Inlet 2: float: changes in the image -that are smaller then are ignored; +#X text 24 306 Inlet 1: bang: set the current frame as "background"; +#X text 24 323 Inlet 2: float: changes in the image that are smaller then are ignored; #X text 24 348 Inlet 3: float: ; #X text 457 368 see also:; #X obj 521 370 pix_movement; -#X text 15 78 [pix_movement2] detects movement in a frame with respect -to the 2 previous frames and a "background"-image and stores it as -a b/w-image (greyscale).; -#X obj 548 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 32 0; -#X connect 20 2 21 0; -#X connect 21 0 20 1; -#X connect 22 0 23 0; -#X connect 23 0 20 0; -#X connect 29 0 30 0; -#X connect 30 0 32 1; -#X connect 32 0 18 0; -#X connect 33 0 34 0; -#X connect 34 0 32 2; -#X connect 35 0 32 0; +#X text 15 78 [pix_movement2] detects movement in a frame with respect to the 2 previous frames and a "background"-image and stores it as a b/w-image (greyscale).; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION timebase IIR-filter for motion detection; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bang; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 451 261 _pix2rectangle 3; +#X obj 550 296 _gemwin; +#X connect 11 0 15 0; +#X connect 15 0 27 0; +#X connect 15 2 16 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 24 0 25 0; +#X connect 25 0 27 1; +#X connect 27 0 42 0; +#X connect 28 0 29 0; +#X connect 29 0 27 2; +#X connect 30 0 27 0; diff --git a/help/pix_movie-help.pd b/help/pix_movie-help.pd index 21d856b27..89b3d6485 100644 --- a/help/pix_movie-help.pd +++ b/help/pix_movie-help.pd @@ -1,88 +1,52 @@ #N canvas 469 90 719 552 10; #X declare -lib Gem; #X text 502 8 GEM object; -#X obj 8 315 cnv 15 430 220 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 315 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 327 Inlets:; #X text 9 397 Outlets:; -#X obj 8 282 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 282 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 281 Arguments:; -#X obj 8 56 cnv 15 430 180 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 57 cnv 15 250 450 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 57 cnv 15 250 450 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 40 Example:; -#X obj 594 440 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 599 479 pd gemwin; -#X msg 599 460 create; -#X text 595 439 Create window:; -#X obj 451 88 cnv 15 155 200 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 594 440 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 88 cnv 15 155 200 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 63 gemhead; #X text 17 411 Outlet 1: gemlist; #X text 23 341 Inlet 1: gemlist; -#X obj 462 93 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 462 93 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X text 505 57 open a supported; #X text 506 68 movie-clip; #X obj 471 377 unpack 0 0 0 0; -#X floatatom 466 400 5 0 0 3 length - -; -#X floatatom 515 400 5 0 0 3 width - -; -#X floatatom 565 400 5 0 0 3 height - -; -#X obj 530 358 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144 --1 -1; +#X floatatom 466 400 5 0 0 3 length - - 0; +#X floatatom 515 400 5 0 0 3 width - - 0; +#X floatatom 565 400 5 0 0 3 height - - 0; +#X obj 530 358 bng 15 250 50 0 empty empty end_reached 20 7 0 10 #fcfcfc #000000 #000000; #X text 71 31 Class: pix object (pix source); #X text 29 57 Description: load in a movie-file; #X obj 462 122 openpanel; #X msg 462 142 open \$1; #X obj 451 482 rectangle 4 3; -#X text 15 78 [pix_movie] loads in a preproduced digital-video to be -used as a texture \, bitblit or something else.; +#X text 15 78 [pix_movie] loads in a preproduced digital-video to be used as a texture \, bitblit or something else.; #X text 63 292 symbol: file to load initially; #X msg 490 199 auto \$1; -#X obj 490 181 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 490 181 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 501 223 colorspace Grey; -#X obj 8 239 cnv 15 430 40 empty empty empty 20 12 0 14 -260818 -66577 -0; +#X obj 8 239 cnv 15 430 40 empty empty empty 20 12 0 14 #fcac44 #404040 0; #X obj 451 341 pix_movie; #X text 459 515 see also:; #X obj 536 515 pix_film; #X text 50 12 Synopsis: [pix_movie]; -#X obj 513 247 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 505 300 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; -#X floatatom 502 320 5 0 0 1 frame_number - -; +#X obj 513 247 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 505 300 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 #fcfcfc #000000 #000000 0 1; +#X floatatom 502 320 5 0 0 1 frame_number - - 0; #N canvas 830 50 450 300 demo 0; #X obj 23 26 inlet; #X text 126 127 win32:; #X text 116 190 linux \, OSX:; #X obj 79 257 outlet; -#X obj 20 50 bng 17 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 38 51 cnv 15 81 15 empty empty demo_movie 4 8 0 10 -262144 -1 -0; +#X obj 20 50 bng 17 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; +#X obj 38 51 cnv 15 81 15 empty empty demo_movie 4 8 0 10 #fcfcfc #000000 0; #X msg 29 102 open examples/data/alea.mpg; #X msg 151 147 open examples/data/homer.avi; #X msg 144 210 open examples/data/anim-1.mov; @@ -93,42 +57,47 @@ used as a texture \, bitblit or something else.; #X connect 8 0 3 0; #X coords 0 -1 1 1 100 17 1 20 50; #X restore 474 162 pd demo movie; -#X text 22 373 Inlet 2: float: sets the frame to output -; +#X text 22 373 Inlet 2: float: sets the frame to output; #X obj 616 515 pix_texture; -#X text 14 241 You don't need [pix_texture] to texture the image. [pix_movie] -is a combination of [pix_film] and [pix_texture]; -#X text 17 470 Outlet 4: list: the texture id \, same as Outlet 2 of -[pix_texture]; +#X text 14 241 You don't need [pix_texture] to texture the image. [pix_movie] is a combination of [pix_film] and [pix_texture]; +#X text 17 470 Outlet 4: list: the texture id \, same as Outlet 2 of [pix_texture]; #X msg 513 266 rectangle \$1; -#X floatatom 615 400 5 0 0 3 fps - -; -#X text 17 117 This object accepts the same set of messages as [pix_film]. -In addition \, it will immediately download the frames to the gfx-card -and make them available as a texture.; +#X floatatom 615 400 5 0 0 3 fps - - 0; +#X text 17 117 This object accepts the same set of messages as [pix_film]. In addition \, it will immediately download the frames to the gfx-card and make them available as a texture.; #X text 23 356 Inlet 1: see [pix_film]; #X text 17 427 Outlet 2: see [pix_film]; #X text 17 450 Outlet 3: see [pix_film]; -#X text 21 161 Think of this object as a hybrid between [pix_film] -and [pix_texture]...; -#X obj 578 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 36 0; -#X connect 17 0 27 0; -#X connect 20 0 21 0; -#X connect 20 1 22 0; -#X connect 20 2 23 0; -#X connect 20 3 49 0; -#X connect 27 0 28 0; -#X connect 28 0 36 0; -#X connect 32 0 36 0; -#X connect 33 0 32 0; -#X connect 34 0 36 0; -#X connect 36 0 29 0; -#X connect 36 1 20 0; -#X connect 36 2 24 0; -#X connect 40 0 48 0; -#X connect 41 0 42 0; -#X connect 42 0 36 1; -#X connect 43 0 36 0; -#X connect 48 0 36 0; +#X text 21 161 Think of this object as a hybrid between [pix_film] and [pix_texture]...; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION load in a movie-file; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist see; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 20 145 OUTLET_1 see; +#X text 20 165 OUTLET_2 see; +#X text 20 185 OUTLET_3 list; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 599 447 _gemwin; +#X connect 11 0 33 0; +#X connect 14 0 24 0; +#X connect 17 0 18 0; +#X connect 17 1 19 0; +#X connect 17 2 20 0; +#X connect 17 3 46 0; +#X connect 24 0 25 0; +#X connect 25 0 33 0; +#X connect 29 0 33 0; +#X connect 30 0 29 0; +#X connect 31 0 33 0; +#X connect 33 0 26 0; +#X connect 33 1 17 0; +#X connect 33 2 21 0; +#X connect 37 0 45 0; +#X connect 38 0 39 0; +#X connect 39 0 33 1; +#X connect 40 0 33 0; +#X connect 45 0 33 0; diff --git a/help/pix_multiblob-help.pd b/help/pix_multiblob-help.pd index a7b40c24d..00be60bdb 100644 --- a/help/pix_multiblob-help.pd +++ b/help/pix_multiblob-help.pd @@ -1,66 +1,33 @@ #N canvas 93 136 663 540 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 323 cnv 15 430 145 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 323 cnv 15 430 145 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 325 Inlets:; #X text 39 410 Outlets:; -#X obj 9 286 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 286 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 284 Arguments:; #X text 453 39 Example:; #X text 17 424 Outlet 1: gemlist; #X text 24 339 Inlet 1: gemlist; #X text 71 31 Class: pix object (analysis); -#X text 24 354 Inlet 1: threshold : minimum luminance of a pixel -to be considered part of a blob. (default:0.04); -#X text 24 383 Inlet 1: blobSize : minimum relative size of -a blob. (default:0.1); +#X text 24 354 Inlet 1: threshold : minimum luminance of a pixel to be considered part of a blob. (default:0.04); +#X text 24 383 Inlet 1: blobSize : minimum relative size of a blob. (default:0.1); #X text 50 12 Synopsis: [pix_multiblob]; #X text 64 295 int: max number N of blobs to detect; #X text 20 484 for motion-tracking you will also need; #X obj 304 484 pix_movement; -#X obj 9 56 cnv 15 430 223 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 56 cnv 15 430 223 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 31 53 Description: blob detector (for multiple blobs); -#X text 17 68 [pix_multiblob] is able to detect multiple blobs within -an image.; -#X text 18 98 a "blob" is a number of adjacent(!) pixels with a luminance -that is bigger than the value defined by "threshold". you can set the -minimum size of a blob that is needed to be detected.; -#X obj 452 57 cnv 15 200 450 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 453 356 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 461 395 pd gemwin; -#X msg 461 376 create; -#X text 457 355 Create window:; -#X obj 453 152 cnv 15 185 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X text 17 68 [pix_multiblob] is able to detect multiple blobs within an image.; +#X text 18 98 a "blob" is a number of adjacent(!) pixels with a luminance that is bigger than the value defined by "threshold". you can set the minimum size of a blob that is needed to be detected.; +#X obj 452 57 cnv 15 200 450 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 453 356 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 453 152 cnv 15 185 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 457 62 gemhead; #X obj 457 279 pix_texture; #X obj 457 130 pix_film; #X obj 521 130 t f; -#X obj 470 82 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 470 82 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -79,21 +46,21 @@ minimum size of a blob that is needed to be detected.; #X text 529 93 macOS: quicktime; #X text 522 83 MS Windows: *.AVI; #X text 529 103 linux: depends...; -#X floatatom 469 169 3 0 100 2 threshold - -; +#X floatatom 469 169 3 0 100 2 threshold - - 0; #X obj 469 186 / 100; #X obj 457 301 square 4; #X msg 469 207 threshold \$1; -#X floatatom 559 169 3 0 100 2 blobsize - -; +#X floatatom 559 169 3 0 100 2 blobsize - - 0; #X obj 559 186 / 100; #X msg 559 207 blobSize \$1; -#X floatatom 569 305 5 0 0 1 x - -; -#X floatatom 570 321 5 0 0 1 y - -; -#X floatatom 570 337 5 0 0 1 size - -; -#X floatatom 571 353 5 0 0 1 minX - -; -#X floatatom 571 369 5 0 0 1 minY - -; -#X floatatom 572 385 5 0 0 1 maxX - -; -#X floatatom 572 401 5 0 0 1 maxY - -; -#X floatatom 573 417 5 0 0 1 area - -; +#X floatatom 569 305 5 0 0 1 x - - 0; +#X floatatom 570 321 5 0 0 1 y - - 0; +#X floatatom 570 337 5 0 0 1 size - - 0; +#X floatatom 571 353 5 0 0 1 minX - - 0; +#X floatatom 571 369 5 0 0 1 minY - - 0; +#X floatatom 572 385 5 0 0 1 maxX - - 0; +#X floatatom 572 401 5 0 0 1 maxY - - 0; +#X floatatom 573 417 5 0 0 1 area - - 0; #N canvas 279 450 687 354 showblob 0; #X obj 67 86 inlet blobinformation; #X obj 67 167 outlet weightedX; @@ -170,47 +137,46 @@ minimum size of a blob that is needed to be detected.; #X connect 16 8 17 0; #X restore 547 280 pd showblob 1; #X msg 549 131 auto \$1; -#X obj 604 133 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 604 133 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X obj 457 241 pix_multiblob 6; -#X floatatom 573 433 5 0 0 1 angle* - -; -#X text 17 439 Outlet 2: (k \, 9) matrix: describing k detected blobs -(with 0<=k (with wildcard *) for images to load; -#X text 23 335 Inlet 1: open <#> : open images (the wildcard -in the filename is expanded with integer 0..#); +#X text 23 335 Inlet 1: open <#> : open images (the wildcard in the filename is expanded with integer 0..#); #X text 23 365 Inlet 2: : select image (starting at 0); -#X text 14 221 The image can be either drawn directly using [pix_draw] -(VERY slow) or applied as a texture onto a Geo ([pix_texture]); #X text 456 336 see also:; #X obj 465 359 pix_buffer; #X obj 465 379 pix_image; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 19 0; -#X connect 20 0 18 0; -#X connect 21 0 20 0; -#X connect 22 0 20 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION loads in multiple image files; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist open; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X text 14 221 The image can be either drawn directly using [pix_draw] (VERY slow) or applied as a texture onto a Geo ([pix_texture]), f 67; +#X obj 451 233 _pix2rectangle 3; +#X obj 521 260 _gemwin; +#X connect 11 0 15 0; +#X connect 15 0 31 0; +#X connect 16 0 15 0; +#X connect 17 0 15 1; diff --git a/help/pix_multiply-help.pd b/help/pix_multiply-help.pd index 4c0e0d17f..00112c3cd 100644 --- a/help/pix_multiply-help.pd +++ b/help/pix_multiply-help.pd @@ -10,27 +10,6 @@ #X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; #X obj 451 168 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 126 gemhead; #X obj 496 109 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; @@ -47,11 +26,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 145 pd image; -#X obj 451 263 pix_texture; #X text 63 196 ; #X text 47 318 Outlet 1: gemlist; #X text 53 262 Inlet 1: gemlist; -#X obj 451 285 square 3; #X text 503 88 (JPEG \, TIFF \, ..); #X obj 541 129 gemhead; #N canvas 0 22 587 366 image 0; @@ -76,14 +53,22 @@ #X text 29 67 Description: multiply 2 images; #X obj 451 198 pix_multiply; #X text 29 91 [pix_multiply] simply multiplies two pixes together. E.g: where either of the pixels is black \, the resulting image will be black too. Thus it is simple to get black images.; -#X obj 508 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 32 0; -#X connect 17 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 32 1; -#X connect 25 0 24 1; -#X connect 32 0 17 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION multiply 2 images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 508 8 pd META; +#X obj 524 296 _gemwin; +#X obj 451 253 _pix2rectangle 3; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 27 0; +#X connect 18 0 19 0; +#X connect 19 0 27 1; +#X connect 20 0 19 1; +#X connect 27 0 31 0; diff --git a/help/pix_multitexture-help.pd b/help/pix_multitexture-help.pd index b4dd12793..cacd8459d 100644 --- a/help/pix_multitexture-help.pd +++ b/help/pix_multitexture-help.pd @@ -7,27 +7,18 @@ #X connect 0 0 1 0; #X connect 1 0 2 0; #X restore 524 560 pd Gem.init; -#X obj 8 52 cnv 15 430 285 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 52 cnv 15 430 285 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 71 27 Class: pix object; #X text 50 8 Synopsis: [pix_multitexture]; -#X text 29 53 Description: apply multiple texture mappings to the current -network; -#X text 13 86 [pix_multitexture] uses different texture information -\, and attaches them to the current chain. This is most useful when -working with shaders.; -#X obj 8 388 cnv 15 430 235 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 348 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X text 29 53 Description: apply multiple texture mappings to the current network; +#X text 13 86 [pix_multitexture] uses different texture information \, and attaches them to the current chain. This is most useful when working with shaders.; +#X obj 8 388 cnv 15 430 235 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 348 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 347 Arguments:; -#X obj 449 73 cnv 15 170 450 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 515 558 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 449 73 cnv 15 170 450 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 515 558 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 514 536 Create window:; -#X obj 455 442 cnv 15 160 50 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 455 442 cnv 15 160 50 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 452 9 GEM object; #X text 453 56 Example:; #X obj 463 88 gemhead; @@ -46,8 +37,7 @@ working with shaders.; #X obj 520 311 gemhead 11; #N canvas 190 611 450 300 pix_image 0; #X obj 78 124 openpanel; -#X obj 78 103 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 78 103 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X msg 78 147 set open \$1 \, bang; #X msg 64 171 open img3.jpg; #X obj 47 54 inlet; @@ -62,8 +52,7 @@ working with shaders.; #X restore 520 330 pd pix_image; #N canvas 1 105 450 300 pix_image 0; #X obj 78 124 openpanel; -#X obj 78 103 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 78 103 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X msg 78 147 set open \$1 \, bang; #X msg 64 171 open img3.jpg; #X obj 47 54 inlet; @@ -78,8 +67,7 @@ working with shaders.; #X restore 489 227 pd pix_image; #N canvas 569 166 450 300 pix_image 0; #X obj 78 124 openpanel; -#X obj 78 103 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 78 103 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X msg 78 147 set open \$1 \, bang; #X obj 48 54 inlet; #X obj 48 233 outlet; @@ -99,48 +87,16 @@ working with shaders.; #X text 50 474 Outlet 1: gemlist; #X text 33 404 Inlet 1: gemlist; #X text 33 424 Inlet 2..n : texture Id; -#N canvas 340 107 682 322 gemwin 0; -#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144 --1 -1 0 1; -#X obj 102 161 r \$0-gemstart; -#X obj 102 182 select 1 0; -#X msg 102 214 create \, 1; -#X msg 177 215 destroy; -#X obj 102 239 t a; -#X obj 318 54 inlet; -#X obj 318 255 gemwin; -#X obj 318 100 t a a; -#X obj 318 287 outlet; -#X obj 350 128 route create destroy; -#X obj 350 150 t b; -#X msg 350 172 1; -#X obj 390 150 t b; -#X msg 390 172 0; -#X obj 350 195 t f; -#X msg 350 219 set \$1; -#X text 118 122 rendering; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 6 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X coords 0 -1 1 1 85 40 1 100 100; -#X restore 522 576 pd gemwin; -#X obj 518 8 declare -lib Gem; -#X connect 0 0 39 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply multiple texture mappings to the current network; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 564 _gemwin; #X connect 15 0 19 0; #X connect 16 0 30 0; #X connect 17 0 22 0; diff --git a/help/pix_noise-help.pd b/help/pix_noise-help.pd index 3e7870683..8175f67c7 100644 --- a/help/pix_noise-help.pd +++ b/help/pix_noise-help.pd @@ -1,103 +1,61 @@ #N canvas 509 61 641 529 10; #X declare -lib Gem; #X text 442 10 GEM object; -#X obj 18 324 cnv 15 430 190 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 18 291 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 18 324 cnv 15 430 190 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 18 291 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 27 290 Arguments:; -#X obj 17 68 cnv 15 430 220 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 453 68 cnv 15 170 350 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 17 68 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 453 68 cnv 15 170 350 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 457 51 Example:; -#X obj 523 453 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy \, reset; -#X msg 132 94 create \, 1 \, color 0.5 0.5 0.5; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 528 492 pd gemwin; -#X msg 528 473 create; -#X text 524 452 Create window:; -#X obj 454 105 cnv 15 160 200 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 454 105 cnv 15 160 200 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 455 75 gemhead; #X text 81 43 Class: pix object; -#X obj 455 364 pix_texture; #X msg 545 247 RGBA; #X msg 480 247 GREY; #X msg 515 247 RGB; #X text 43 303 ; -#X obj 473 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 455 386 square 4; -#X msg 467 341 quality \$1; -#X obj 466 323 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 473 112 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X text 24 70 Description: generate a noise image; #X text 60 24 Synopsis: [pix_noise]; #X msg 474 160 auto \$1; -#X obj 474 138 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 474 138 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 28 327 Inlet 1:; #X text 42 343 gemlist; #X text 42 382 bang : generate new image; -#X text 42 402 auto 1|0 : generate new image for each frame on/off -(default:0), f 64; +#X text 42 402 auto 1|0 : generate new image for each frame on/off (default:0), f 64; #X text 28 482 Outlet 1:; #X text 44 495 gemlist; -#X text 42 360 RGBA|RGB|GREY : set format of input-data (default : -RGBA); -#X text 41 251 You might want to deactivate the interpolation of the -texture by sending [quality 0( to pix_texture.; +#X text 42 360 RGBA|RGB|GREY : set format of input-data (default : RGBA); +#X text 41 251 You might want to deactivate the interpolation of the texture by sending [quality 0( to pix_texture.; #X text 494 111 new noise; #X text 492 137 new noise each frame; #X text 474 181 change size of image; -#X text 42 206 You can set the number of channels of the generated -noise using message : RGBA / RGB / GREY. The output image will still -be in RGBA-color-space.; +#X text 42 206 You can set the number of channels of the generated noise using message : RGBA / RGB / GREY. The output image will still be in RGBA-color-space.; #X text 478 228 change colorspace; #X obj 455 285 pix_noise 50 50; #X msg 475 199 set 250 250; -#X text 40 89 [pix_noise] will allow you to generate a uniform noise -image.; -#X text 41 119 The size of the image can be set with creation-arguments. -It defaults to 64*64. It can be dynamically changed by the set message. -; -#X text 41 163 Each time you send a bang \, a new noise is generated. -You can send an [auto 1( message to generate a noise for each render -frame.; -#X text 42 447 seed : change the initialization of the random -function, f 62; -#X text 42 425 set : change size of the image (default -: 64*64), f 66; -#X obj 518 8 declare -lib Gem; -#X connect 8 0 9 0; -#X connect 9 0 8 0; -#X connect 12 0 40 0; -#X connect 14 0 20 0; -#X connect 15 0 40 0; -#X connect 16 0 40 0; -#X connect 17 0 40 0; -#X connect 19 0 40 0; -#X connect 21 0 14 0; -#X connect 22 0 21 0; -#X connect 25 0 40 0; -#X connect 26 0 25 0; -#X connect 40 0 14 0; -#X connect 41 0 40 0; +#X text 40 89 [pix_noise] will allow you to generate a uniform noise image.; +#X text 41 119 The size of the image can be set with creation-arguments. It defaults to 64*64. It can be dynamically changed by the set message.; +#X text 41 163 Each time you send a bang \, a new noise is generated. You can send an [auto 1( message to generate a noise for each render frame.; +#X text 42 447 seed : change the initialization of the random function, f 62; +#X text 42 425 set : change size of the image (default : 64*64), f 66; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION generate a noise image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 10 85 AUTHOR IOhannes m zmölnig; +#X text 10 105 LICENSE GPL v2; +#X restore 518 8 pd META; +#X text 457 474 see also:; +#X obj 525 473 pix_test; +#X obj 529 360 _gemwin \; 0 \; 0 \;; +#X obj 455 314 _pix2rectangle 4 \; quality 0; +#X connect 8 0 32 0; +#X connect 10 0 32 0; +#X connect 11 0 32 0; +#X connect 12 0 32 0; +#X connect 14 0 32 0; +#X connect 17 0 32 0; +#X connect 18 0 17 0; +#X connect 32 0 43 0; +#X connect 33 0 32 0; diff --git a/help/pix_normalize-help.pd b/help/pix_normalize-help.pd index 946af5edb..405288e7e 100644 --- a/help/pix_normalize-help.pd +++ b/help/pix_normalize-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 654 335 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -52,8 +24,7 @@ #X obj 102 225 loadbang; #X obj 77 274 pix_gain; #X msg 102 249 0.5; -#X text 145 257 we do this \, to make "normalize" do something more... -; +#X text 145 257 we do this \, to make "normalize" do something more...; #X connect 0 0 2 0; #X connect 2 0 7 0; #X connect 3 0 5 0; @@ -66,22 +37,27 @@ #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; +#X obj 451 233 _pix2rectangle 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; +#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; #X text 63 275 Inlet 1: 1|0 : apply/don't apply (default:1); #X obj 451 186 pix_normalize; #X text 29 76 Description: normalize an image; -#X text 29 123 [pix_normalize] will normalize your image \, so that -contrasts will appear sharper.; +#X text 29 123 [pix_normalize] will normalize your image \, so that contrasts will appear sharper.; #X text 50 12 Synopsis: [pix_normalize]; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 26 0; -#X connect 24 0 26 0; -#X connect 26 0 21 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION normalize an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 261 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 23 0; +#X connect 21 0 23 0; +#X connect 23 0 18 0; diff --git a/help/pix_offset-help.pd b/help/pix_offset-help.pd index b9980ab28..295f2810d 100644 --- a/help/pix_offset-help.pd +++ b/help/pix_offset-help.pd @@ -1,86 +1,54 @@ -#N canvas 6 61 654 375 10; +#N canvas 515 95 654 375 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 335 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 348 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); +#X obj 451 233 _pix2rectangle 3; #X text 63 275 Inlet 1: 1|0 : apply/don't apply (default:1); -#X obj 451 196 pix_offset; -#X floatatom 483 171 5 0 1 0 - - -; -#X msg 531 166 0.5 -0.5 0; -#X msg 534 193 0.2 1 0 1; +#X obj 451 170 pix_offset; +#X floatatom 483 145 5 0 1 0 - - - 0; +#X msg 531 140 0.5 -0.5 0; +#X msg 534 167 0.2 1 0 1; #X text 50 12 Synopsis: [pix_offset]; #X text 29 76 Description: add an offset to the color; -#X text 15 113 When adding an offset to each color-channel \, no clipping -is done. Thus you can wrap around the color-space.; -#X text 19 157 (adding "1 0 0" to "0.5 1 1" will result in "0.5 1 1" -instead of "1 1 1"); -#X text 63 295 Inlet 2: : offset for all channels; -#X text 63 311 Inlet 3: list : offset for each channels; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 25 0; -#X connect 25 0 21 0; -#X connect 26 0 25 1; -#X connect 27 0 25 2; -#X connect 28 0 25 2; +#X text 19 157 (adding "1 0 0" to "0.5 1 1" will result in "0.5 1 1" instead of "1 1 1"), f 68; +#X text 63 305 Inlet 2: : offset for all channels; +#X text 63 321 Inlet 3: list : offset for each channels; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION add an offset to the color; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool saturate; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 262 _gemwin; +#X obj 451 113 pix_test; +#X msg 466 197 saturate \$1; +#X obj 544 197 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X text 15 113 When "saturate" is off (0) \, no clipping is applied when adding an offset to each color-channel. Thus you can wrap around the color-space., f 69; +#X text 63 288 Inlet 1: saturate 1|0; +#X connect 11 0 29 0; +#X connect 18 0 16 0; +#X connect 19 0 18 1; +#X connect 20 0 18 2; +#X connect 21 0 18 2; +#X connect 29 0 18 0; +#X connect 30 0 18 0; +#X connect 31 0 30 0; diff --git a/help/pix_pix2sig~-help.pd b/help/pix_pix2sig~-help.pd index 5fc5fb86d..a61e10bdd 100644 --- a/help/pix_pix2sig~-help.pd +++ b/help/pix_pix2sig~-help.pd @@ -1,4 +1,4 @@ -#N canvas 420 190 689 457 10; +#N canvas 420 190 689 458 10; #X declare -lib Gem; #X text 452 8 GEM object; #X obj 8 295 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; @@ -10,49 +10,12 @@ #X obj 449 85 cnv 15 200 360 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 68 Example:; #X obj 534 342 cnv 15 100 100 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 539 381 pd gemwin; -#X msg 539 362 create; -#X text 535 341 Create window:; #X obj 450 242 cnv 15 180 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 92 gemhead; #X text 71 31 Class: pix object; -#X obj 510 118 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; -#N canvas 0 22 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 141 pd image; #X text 63 266 ; #X text 56 357 Outlet 1: gemlist; #X text 63 312 Inlet 1: gemlist; -#X text 516 133 open an image; -#X text 509 146 (JPEG \, TIFF \, ..); #X text 23 92 [pix_sig2pix~] will write the data it gets from images as signals for each color-channel.; #X text 56 373 Outlet 2: signal~ : red-channel (or Yuv- \, or grey-); #X text 56 403 Outlet 3: signal~ : blue-channel (or yuV- \, or 0); @@ -65,15 +28,24 @@ #X floatatom 533 301 3 0 0 3 b - - 0; #X floatatom 502 301 3 0 0 3 g - - 0; #X floatatom 471 301 3 0 0 3 r - - 0; -#X msg 547 408 \; pd dsp 1; +#X msg 567 348 \; pd dsp 1; #X obj 471 278 env~ 65536; #X obj 564 278 env~ 65536; #X obj 533 278 env~ 65536; #X obj 502 278 env~ 65536; -#X obj 528 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert images to signals; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist mode; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 signal~; +#X text 20 145 OUTLET_2 signal~; +#X text 20 165 OUTLET_3 signal~; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 528 8 pd META; #X text 25 124 In 'clear' mode (the default) \, each audio block will start reading at the beginning of the current image (so if you want to read the entire image \, you need large blocksizes). In 'fill' mode \, the object will remember where we stopped reading \, and continue there (so you can incrementally read the image). In 'line' mode only a single line is read (consecutively \, so the entire image is scanned) \, with zero-padding or data truncating as required. The similar 'waterfall' mode \, reads the same line for each signal block.; -#X obj 451 351 pix_texture; -#X obj 451 374 square 3; #X obj 576 92 block~ 4096; #N canvas 265 521 450 300 scope 0; #N canvas 0 50 450 250 (subpatch) 0; @@ -98,26 +70,25 @@ #X msg 494 216 mode waterfall \$1; #X floatatom 606 217 5 -256 256 0 - - - 0; #X text 63 325 Inlet 1: mode clear|fill|line|waterfall []; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 30 0; -#X connect 30 0 42 0; -#X connect 30 1 36 0; -#X connect 30 1 45 0; -#X connect 30 2 39 0; -#X connect 30 3 38 0; -#X connect 30 4 37 0; -#X connect 36 0 34 0; -#X connect 37 0 31 0; -#X connect 38 0 32 0; -#X connect 39 0 33 0; -#X connect 42 0 43 0; -#X connect 46 0 50 0; -#X connect 47 0 50 0; -#X connect 48 0 50 0; -#X connect 49 0 50 0; -#X connect 50 0 30 0; -#X connect 51 0 50 0; -#X connect 52 0 51 0; +#X obj 542 390 _gemwin; +#X obj 451 341 _pix2rectangle 3; +#X obj 451 121 pix_test; +#X connect 11 0 47 0; +#X connect 23 0 46 0; +#X connect 23 1 29 0; +#X connect 23 1 36 0; +#X connect 23 2 32 0; +#X connect 23 3 31 0; +#X connect 23 4 30 0; +#X connect 29 0 27 0; +#X connect 30 0 24 0; +#X connect 31 0 25 0; +#X connect 32 0 26 0; +#X connect 37 0 41 0; +#X connect 38 0 41 0; +#X connect 39 0 41 0; +#X connect 40 0 41 0; +#X connect 41 0 23 0; +#X connect 42 0 41 0; +#X connect 43 0 42 0; +#X connect 47 0 23 0; diff --git a/help/pix_posterize-help.pd b/help/pix_posterize-help.pd index a82ddc691..0e1587874 100644 --- a/help/pix_posterize-help.pd +++ b/help/pix_posterize-help.pd @@ -1,47 +1,19 @@ #N canvas 6 254 651 350 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 280 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 143 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 143 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -50,8 +22,7 @@ #X msg 223 123 open \$1; #X obj 223 100 openpanel; #X obj 77 245 pix_yuv; -#X text 133 234 pix_posterize doesn't like RGBA. For now we do a rgba2yuv -conversion. LATER make pix_posterize eat RGBA too...; +#X text 133 234 pix_posterize doesn't like RGBA. For now we do a rgba2yuv conversion. LATER make pix_posterize eat RGBA too...; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 3 0 5 0; @@ -59,34 +30,38 @@ conversion. LATER make pix_posterize eat RGBA too...; #X connect 5 0 4 0; #X connect 6 0 1 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 57 293 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 451 255 square 3; #X text 50 12 Synopsis: [pix_posterize]; #X obj 451 196 pix_posterize; -#X floatatom 473 160 5 0 255 2 factor - -; -#X obj 527 179 hradio 15 1 0 5 empty empty limit 0 -6 0 8 -262144 -1 --1 0; +#X floatatom 473 160 5 0 255 2 factor - - 0; +#X obj 527 179 hradio 15 1 0 5 empty empty limit 0 -6 0 8 #fcfcfc #000000 #000000 0; #X obj 473 176 / 255; #X text 63 245 Inlet 2: float: posterization factor; #X text 64 258 Inlet 3: int: limit-mode; #X text 29 77 Description: posterization effect; -#X text 13 91 [pix_posterize] will produce a posterization effect. -; +#X text 13 91 [pix_posterize] will produce a posterization effect.; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X text 20 121 currently only YUV images are supported. use [pix_yuv] -to make sure that you are in the correct colorspace.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 18 0 22 0; -#X connect 24 0 18 0; -#X connect 25 0 27 0; -#X connect 26 0 24 2; -#X connect 27 0 24 1; +#X text 20 121 currently only YUV images are supported. use [pix_yuv] to make sure that you are in the correct colorspace.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION posterization effect; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 int; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 233 _pix2rectangle 3; +#X obj 517 258 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 19 0; +#X connect 19 0 31 0; +#X connect 20 0 22 0; +#X connect 21 0 19 2; +#X connect 22 0 19 1; diff --git a/help/pix_puzzle-help.pd b/help/pix_puzzle-help.pd index ade7a6177..7d73f7b86 100644 --- a/help/pix_puzzle-help.pd +++ b/help/pix_puzzle-help.pd @@ -1,47 +1,19 @@ #N canvas 18 198 626 548 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 345 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 345 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 348 Inlets:; #X text 38 465 Outlets:; -#X obj 8 306 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 306 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 305 Arguments:; -#X obj 7 76 cnv 15 430 225 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 225 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 138 cnv 15 160 110 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 504 294 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 110 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,38 +30,32 @@ #X text 63 316 ; #X text 56 478 Outlet 1: gemlist; #X text 63 362 Inlet 1: gemlist; -#X obj 451 263 pix_draw; +#X obj 451 263 _pix2rectangle 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X text 63 375 Inlet 1: 1|0 : apply/don't apply (default:1); #X msg 463 146 bang; #X text 50 12 Synopsis: [pix_puzzle]; #X text 63 77 Description: shuffle an image; -#X text 16 97 [pix_puzzle] is an effect that will cut your image into -rectangular pieces and shuffle these.; -#X text 17 128 You can change the number of pieces per row/column with -the "size" message. "bang" triggers a re-shuffling of the pieces.; -#X obj 29 505 cnv 15 423 30 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 34 505 acknowledgment: this effect is based on effecTV by Kentarou -Fukuchi (http://effectv.sourceforge.net); +#X text 16 97 [pix_puzzle] is an effect that will cut your image into rectangular pieces and shuffle these.; +#X text 17 128 You can change the number of pieces per row/column with the "size" message. "bang" triggers a re-shuffling of the pieces.; +#X obj 29 505 cnv 15 423 30 empty empty empty 20 12 0 14 #fcac44 #404040 0; +#X text 34 505 acknowledgment: this effect is based on effecTV by Kentarou Fukuchi (http://effectv.sourceforge.net); #X obj 451 223 pix_puzzle; #X text 64 390 Inlet 1: bang: reshuffle; #X msg 509 145 size 4 3; #X msg 551 212 move \$1; -#X floatatom 551 193 5 0 0 0 - - -; +#X floatatom 551 193 5 0 0 0 - - - 0; #X text 63 433 Inlet 1: move : move the empty field; #X text 192 238 8; #X text 175 253 4; #X text 209 254 6; #X text 192 271 2; #X text 44 204 "move 5" will en/disable an empty field; -#X text 16 171 There is a little game hidden in the [pix_puzzle]. Go -and find it:; +#X text 16 171 There is a little game hidden in the [pix_puzzle]. Go and find it:; #X text 46 221 Moving can be done according to the number-pad; #X msg 551 171 5; -#X text 63 405 Inlet 1: size : number of elements in x/y -(default: 8 8); +#X text 63 405 Inlet 1: size : number of elements in x/y (default: 8 8); #N canvas 0 0 243 214 numkeys 0; #X obj 63 16 key; #X obj 63 181 outlet; @@ -112,16 +78,23 @@ and find it:; #X connect 7 0 1 0; #X restore 475 176 pd numkeys; #X text 12 285 (i admit this is not very intuitive...); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 32 0; -#X connect 25 0 32 0; -#X connect 32 0 21 0; -#X connect 34 0 32 0; -#X connect 35 0 32 0; -#X connect 36 0 35 0; -#X connect 45 0 36 0; -#X connect 47 0 36 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shuffle an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool bang size move; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 510 298 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 29 0; +#X connect 22 0 29 0; +#X connect 29 0 18 0; +#X connect 31 0 29 0; +#X connect 32 0 29 0; +#X connect 33 0 32 0; +#X connect 42 0 33 0; +#X connect 44 0 33 0; diff --git a/help/pix_rds-help.pd b/help/pix_rds-help.pd index a271f1240..74f7c2d36 100644 --- a/help/pix_rds-help.pd +++ b/help/pix_rds-help.pd @@ -1,51 +1,19 @@ #N canvas 22 61 638 358 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 234 221 dimen 500 500; -#X msg 279 189 dimen 1024 768; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 136 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 136 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -61,33 +29,35 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 57 323 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 460 158 tgl 15 0 empty empty mode 20 8 0 8 -262144 -1 -1 0 1 -; +#X obj 460 158 tgl 15 0 empty empty mode 20 8 0 8 #fcfcfc #000000 #000000 0 1; #X text 29 77 Description: random dot stereogram for luminance; -#X obj 451 255 square 3; -#X text 34 96 [pix_rds] produces b/w random dot stereograms (aka: the -magic eye (tm)) for either cross-eyed and wall-eyed viewers. Wall-eyed -is basically an invertation (front becomes back) of cross-eyed.; +#X text 34 96 [pix_rds] produces b/w random dot stereograms (aka: the magic eye (tm)) for either cross-eyed and wall-eyed viewers. Wall-eyed is basically an invertation (front becomes back) of cross-eyed.; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_rds]; #X msg 460 177 method \$1; #X obj 451 196 pix_rds; -#X floatatom 495 139 5 10 100 1 stride - -; +#X floatatom 495 139 5 10 100 1 stride - - 0; #X text 63 245 Inlet 1: method [0|1] (crosseyed|walleyed); #X text 63 259 Inlet 1: stride distance (default:40); -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 30 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION random dot stereogram for luminance; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist method stride; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 223 _pix2rectangle 3; +#X obj 519 261 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 25 0; #X connect 18 0 24 0; -#X connect 22 0 29 0; -#X connect 29 0 30 0; -#X connect 30 0 18 0; -#X connect 31 0 30 1; +#X connect 24 0 25 0; +#X connect 25 0 30 0; +#X connect 26 0 25 1; diff --git a/help/pix_record-help.pd b/help/pix_record-help.pd index 0861e733d..cadce6851 100644 --- a/help/pix_record-help.pd +++ b/help/pix_record-help.pd @@ -1,87 +1,29 @@ -#N canvas 435 61 682 509 10; +#N canvas 475 510 682 509 10; #X declare -lib Gem; #X text 433 9 GEM object; -#X obj 9 375 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X text 18 374 Arguments:; -#X obj 8 56 cnv 15 430 310 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 53 cnv 15 170 410 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 9 415 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 18 414 Arguments:; +#X obj 8 56 cnv 15 430 350 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 53 cnv 15 170 410 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 36 Example:; -#X obj 479 429 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 484 468 pd gemwin; -#X msg 484 449 create; -#X text 480 428 Create window:; -#X obj 451 194 cnv 15 167 230 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 479 419 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 166 cnv 15 167 250 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 59 gemhead; -#X obj 451 128 pix_film; -#X obj 515 128 t f; -#X obj 464 81 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#N canvas 0 0 450 300 open 0; -#X obj 85 49 inlet; -#X obj 85 237 outlet; -#X obj 85 145 openpanel; -#X msg 85 179 open \$1; -#X msg 259 213 auto 1; -#X obj 268 179 loadbang; -#X connect 0 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 4 0 1 0; -#X connect 5 0 4 0; -#X restore 464 100 pd open; -#X text 485 74 open a supported; -#X text 486 85 movie-clip; -#X text 64 385 ; +#X text 64 425 ; #X text 50 12 Synopsis: [pix_record]; #X text 71 31 Class: pix object (output); -#X text 29 57 Description: write a sequence of pixes to a movie file -; -#X obj 451 403 pix_record; -#X obj 451 167 pix_draw; -#X obj 451 148 pix_invert; -#X text 18 104 You can choose the codec you want to use either via -a graphical dialog or by directly sending a "codec" with either the -name or the enumeration number of the codec. Use "codeclist" to query -the available codecs \, their names and their number.; -#X obj 470 343 cnv 15 145 25 empty empty empty 20 12 0 14 -225271 -66577 -0; -#X msg 480 347 bang; -#X msg 552 347 auto \$1; -#X obj 533 348 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 470 199 cnv 15 145 65 empty empty empty 20 12 0 14 -225271 -66577 -0; -#X msg 476 224 codeclist; -#X msg 472 203 dialog; -#X obj 472 244 t a; -#X obj 460 271 cnv 15 155 65 empty empty empty 20 12 0 14 -225271 -66577 -0; -#X msg 463 292 file /tmp/mymovie.mov; -#X obj 464 273 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 --1; +#X obj 451 363 pix_record; +#X text 18 114 You can choose the codec you want to use either via a graphical dialog or by directly sending a "codec" with either the name or the enumeration number of the codec. Use "codeclist" to query the available codecs \, their names and their number., f 69; +#X obj 470 315 cnv 15 145 25 empty empty empty 20 12 0 14 #d8fcd8 #404040 0; +#X msg 480 319 bang; +#X msg 552 319 auto \$1; +#X obj 533 320 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 470 171 cnv 15 145 65 empty empty empty 20 12 0 14 #d8fcd8 #404040 0; +#X msg 476 196 codeclist; +#X msg 472 175 dialog; +#X obj 460 243 cnv 15 155 65 empty empty empty 20 12 0 14 #d8fcd8 #404040 0; +#X msg 463 264 file /tmp/mymovie.mov; +#X obj 464 245 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fc2828 #000000 #000000; #N canvas 0 0 450 300 savepanel 0; #X obj 114 62 inlet; #X obj 114 254 outlet; @@ -93,63 +35,38 @@ the available codecs \, their names and their number.; #X connect 2 1 1 0; #X connect 3 0 4 0; #X connect 4 0 2 0; -#X restore 484 272 pd savepanel; -#X msg 520 315 record \$1; -#X obj 500 317 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 463 315 t a; -#X text 14 73 [pix_write] writes a series of pixes into a movie file. -You can set the file to write to via the "file" message.; -#X text 18 174 When file and codec are specified \, you can open the -writing connection with the message "record 1".; -#X text 18 202 To actually do record a frame into the file \, send -the object a "bang" message. If you want to record a consecutive number -of frames \, use the "auto" message. This allows you to have full control -on which frames are to be recorded.; -#X text 17 269 The recording is finished and the file flushed to disk -\, after a "record 0" message is received. You might not be able to -access the file for reading before recording has finished.; -#X text 526 150 (do something); -#X text 515 168 (monitoring); -#X text 22 339 NOTE: currently only quicktime MOVies can be recorded. -This might change in the future (watch the console!); -#X obj 8 414 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X restore 484 244 pd savepanel; +#X msg 540 287 record \$1; +#X obj 520 289 tgl 15 0 empty \$0-record empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X text 18 174 When file and codec are specified \, you can open the writing connection with the message "record 1"., f 69; +#X text 18 212 To actually do record a frame into the file \, send the object a "bang" message. If you want to record a consecutive number of frames \, use the "auto" message. This allows you to have full control on which frames are to be recorded., f 69; +#X text 525 125 (monitoring); +#X obj 8 454 cnv 15 430 30 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #N canvas 6 49 459 361 MESSAGES 0; -#X obj 9 15 cnv 15 430 340 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 15 cnv 15 430 340 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 34 17 Inlets:; #X text 34 293 Outlets:; #X text 12 307 Outlet 1: gemlist; #X text 18 31 Inlet 1: gemlist; -#X text 18 50 Inlet 1: file : specify the file for writing -; -#X text 18 62 Inlet 1: record <0|1>: start recording (no actual grabbing -is done!) or stop recording (flush movie to disk); +#X text 18 50 Inlet 1: file : specify the file for writing; +#X text 18 62 Inlet 1: record <0|1>: start recording (no actual grabbing is done!) or stop recording (flush movie to disk); #X text 18 91 Inlet 1: bang: grab the next incoming pix.; -#X text 18 103 Inlet 1: auto <0|1>: start/stop grabbing all incoming -pixes; +#X text 18 103 Inlet 1: auto <0|1>: start/stop grabbing all incoming pixes; #X text 12 321 Outlet 2: number of frames written; #X text 12 335 Outlet 3: info on available codecs/properties; -#X text 18 148 Inlet 1: codeclist: enumerate a list of available codecs -to the outlet#3; -#X text 18 178 Inlet 1: codec : select codec # from the codec-list -(and enumerate codec-properties to outlet#3); -#X text 18 203 Inlet 1: codec : select codec by short name -(and enumerate codec-properties to outlet#3); -#X text 18 233 Inlet 1: set : set a property named - to the value . properties are persistent across codec-changes. -properties unknown to the currently selected coded are ignored.; -#X text 18 123 Inlet 1: dialog: popup a dialog to select the codec -(if available); -#X restore 83 420 pd MESSAGES; -#X floatatom 527 405 3 0 0 0 - - -; -#X msg 532 244 codec mjpa; -#X msg 552 225 codec 3; +#X text 18 148 Inlet 1: codeclist: enumerate a list of available codecs to the outlet#3; +#X text 18 178 Inlet 1: codec : select codec # from the codec-list (and enumerate codec-properties to outlet#3); +#X text 18 203 Inlet 1: codec : select codec by short name (and enumerate codec-properties to outlet#3); +#X text 18 233 Inlet 1: set : set a property named to the value . properties are persistent across codec-changes. properties unknown to the currently selected coded are ignored.; +#X text 18 123 Inlet 1: dialog: popup a dialog to select the codec (if available); +#X restore 83 460 pd MESSAGES; +#X floatatom 479 387 3 0 0 0 - - - 0; +#X msg 532 216 codec mjpa; +#X msg 552 197 codec 3; #N canvas 129 512 599 344 PROPERTIES 0; #N canvas 607 622 561 319 PropertyLogic 0; #X obj 54 6 inlet; -#X obj 293 70 r \$0-nfo; +#X obj 293 70 r \$0-info; #X obj 54 45 route codeclist codec; #X obj 126 67 f; #N canvas 82 113 577 363 codecs 0; @@ -364,7 +281,7 @@ properties unknown to the currently selected coded are ignored.; #X obj 100 181 t f; #X msg 126 117 0; #X obj 126 139 t f; -#X obj 293 156 s \$0-nfoprint; +#X obj 293 156 s \$0-infoprint; #N canvas 4 49 450 300 reset 0; #X obj 99 217 s \$0-numcodecs; #X obj 99 195 t a a; @@ -407,76 +324,88 @@ properties unknown to the currently selected coded are ignored.; #X connect 14 0 15 0; #X connect 15 0 8 1; #X connect 18 0 17 0; -#X restore 68 269 pd PropertyLogic; +#X restore 68 299 pd PropertyLogic; #X msg 68 25 codeclist; #X text 142 25 INIT: query all available codecs; -#X text 86 51 select an available codec (and query available properties) -; -#X msg 96 245 set framerate \$1; -#X floatatom 96 227 3 0 100 0 - - -; -#X obj 82 71 cnv 15 100 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 87 80 hradio 15 1 0 1 empty \$0-numcodecs empty 0 -8 0 10 -262144 --1 -1 0; -#X msg 87 100 codec \$1; -#X obj 82 152 cnv 15 200 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 87 160 hradio 15 1 0 1 \$0-selprop \$0-numproperties empty 0 --8 0 10 -262144 -1 -1 0; -#X msg 87 202; -#X floatatom 87 182 0 0 0 0 - #0-propvalue -; -#X obj 297 185 r \$0-makeprop; -#X text 87 138 set a codec-property; -#X text 121 227 override the framerate (default: Gem's framerate); +#X msg 96 275 set framerate \$1; +#X floatatom 96 257 3 0 100 0 - - - 0; +#X obj 82 71 cnv 15 100 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 87 88 hradio 15 1 0 1 empty \$0-numcodecs empty 0 -8 0 10 #fcfcfc #000000 #000000 0; +#X msg 87 108 codec \$1; +#X obj 82 152 cnv 15 200 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 87 181 hradio 15 1 0 1 \$0-selprop \$0-numproperties empty 0 -8 0 10 #fcfcfc #000000 #000000 0; +#X msg 87 217; +#X floatatom 87 197 0 0 0 0 - \$0-propvalue - 0; +#X obj 297 199 r \$0-makeprop; +#X text 121 257 override the framerate (default: Gem's framerate); +#X text 82 149 set a codec-property:; +#X text 86 51 select an available codec (and query available properties):; #X connect 1 0 0 0; -#X connect 4 0 0 0; -#X connect 5 0 4 0; -#X connect 7 0 8 0; -#X connect 8 0 0 0; -#X connect 11 0 0 0; -#X connect 12 0 11 0; -#X connect 13 0 11 0; -#X restore 243 420 pd PROPERTIES; -#X obj 553 386 r \$0-ctl; -#X obj 621 261 s \$0-ctl; -#X obj 620 332 s \$0-ctl; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 0 0; +#X connect 10 0 0 0; +#X connect 11 0 10 0; +#X connect 12 0 10 0; +#X restore 243 460 pd PROPERTIES; +#X obj 553 345 r \$0-ctl; #N canvas 6 49 515 369 print 0; #X obj 102 176 inlet; -#X obj 102 198 s \$0-nfo; -#X obj 102 220 r \$0-nfoprint; +#X obj 102 198 s \$0-info; +#X obj 102 220 r \$0-infoprint; #X obj 102 242 print INFO; -#X text 62 90 actually you can just hook a [print] to the 3rd outlet. -; -#X text 64 115 here it's a bit more complicated \, as we want to filter -out the messages generated from the [pd PROPERTIES] window.; +#X text 62 90 actually you can just hook a [print] to the 3rd outlet.; +#X text 64 115 here it's a bit more complicated \, as we want to filter out the messages generated from the [pd PROPERTIES] window.; +#X obj 272 179 r \$0-ctl; +#X obj 272 202 route record; +#X obj 272 225 route float; +#X msg 272 248 set \$1; +#X obj 272 271 s \$0-record; #X connect 0 0 1 0; #X connect 2 0 3 0; -#X restore 553 403 pd print; -#X obj 518 8 declare -lib Gem; +#X connect 6 0 7 0; #X connect 7 0 8 0; -#X connect 8 0 7 0; -#X connect 11 0 12 0; -#X connect 12 0 24 0; -#X connect 12 2 13 0; -#X connect 13 0 12 1; -#X connect 14 0 15 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X restore 508 386 pd print; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION output sequences of pixes; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist file record bang auto dialog codeclist codec set; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 number; +#X text 20 145 OUTLET_2 info; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X text 29 57 Description: output sequences of pixes; +#X text 13 73 [pix_record] outputs a series of pixes \, e.g. into a movie file. You can set the file to write to via the "file" message., f 70; +#X text 14 331 [pix_record] has a number of output methods \, like movies \, pipes or videodevices. Not all may be available on your system. Check here which backends you can use:, f 70; +#X text 17 273 The recording is finished and the file flushed to disk after a "record 0" message is received. You might not be able to access the file for reading before recording has finished., f 69; +#X obj 197 366 _backendinfo \$0 record; +#X obj 451 87 pix_test 720 468; +#X obj 451 140 _pix2rectangle 3; +#X text 515 72 (some input); +#X obj 484 425 _gemwin; +#X obj 472 216 s \$0-ctl; +#X obj 463 287 s \$0-ctl; +#X connect 8 0 44 0; +#X connect 12 1 32 0; +#X connect 12 2 37 0; #X connect 15 0 12 0; -#X connect 22 1 50 0; -#X connect 22 2 57 0; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 27 0 22 0; -#X connect 28 0 22 0; -#X connect 29 0 28 0; -#X connect 31 0 33 0; -#X connect 32 0 33 0; -#X connect 33 0 55 0; -#X connect 35 0 40 0; -#X connect 36 0 37 0; -#X connect 37 0 35 0; -#X connect 38 0 40 0; -#X connect 39 0 38 0; -#X connect 40 0 56 0; -#X connect 51 0 33 0; -#X connect 52 0 33 0; -#X connect 54 0 22 0; +#X connect 16 0 12 0; +#X connect 17 0 16 0; +#X connect 19 0 48 0; +#X connect 20 0 48 0; +#X connect 22 0 49 0; +#X connect 23 0 24 0; +#X connect 24 0 22 0; +#X connect 25 0 49 0; +#X connect 26 0 25 0; +#X connect 33 0 48 0; +#X connect 34 0 48 0; +#X connect 36 0 12 0; +#X connect 44 0 45 0; +#X connect 45 0 12 0; diff --git a/help/pix_rectangle-help.pd b/help/pix_rectangle-help.pd index 494127e0a..c351ca352 100644 --- a/help/pix_rectangle-help.pd +++ b/help/pix_rectangle-help.pd @@ -1,85 +1,45 @@ #N canvas 6 61 624 377 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 335 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 148 cnv 15 160 70 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 148 cnv 15 160 70 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 8 348 Outlet 1: gemlist; #X text 13 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); +#X obj 451 233 _pix2rectangle 3; #X text 50 12 Synopsis: [pix_rectangle]; #X text 28 76 Description: draw a rectangle into a pix; #X msg 537 175 1 0 0; #X obj 451 197 pix_rectangle; -#X text 13 275 Inlet 2: list : 4 floats defining the 4 corners of the -rectangle: ; +#X text 13 275 Inlet 2: list : 4 floats defining the 4 corners of the rectangle: ; #X msg 494 151 40 10 100 200; -#X text 13 305 Inlet 3: list : 3(RGB) or 4(RGBA) float-values defining -the color of the rectangle (default: 1 1 1 1); -#X text 21 111 pix_rectangle renders a rectangle onto a pix-buffer. -This means that you have to have an image already loaded to render -into. Set the position and size with the two corners of the rectangle. -; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 27 0; -#X connect 26 0 27 2; -#X connect 27 0 21 0; -#X connect 29 0 27 1; +#X text 13 305 Inlet 3: list : 3(RGB) or 4(RGBA) float-values defining the color of the rectangle (default: 1 1 1 1); +#X text 21 111 pix_rectangle renders a rectangle onto a pix-buffer. This means that you have to have an image already loaded to render into. Set the position and size with the two corners of the rectangle.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION draw a rectangle into a pix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 259 _gemwin; +#X obj 451 113 pix_noise; +#X connect 11 0 27 0; +#X connect 19 0 20 2; +#X connect 20 0 16 0; +#X connect 22 0 20 1; +#X connect 27 0 20 0; diff --git a/help/pix_refraction-help.pd b/help/pix_refraction-help.pd index ca55e1571..af864a8e6 100644 --- a/help/pix_refraction-help.pd +++ b/help/pix_refraction-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 625 531 10; #X declare -lib Gem; #X text 447 8 GEM object; -#X obj 8 335 cnv 15 430 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 335 cnv 15 430 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 338 Inlets:; #X text 38 435 Outlets:; -#X obj 8 297 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 297 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 296 Arguments:; -#X obj 7 56 cnv 15 430 235 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 56 cnv 15 430 235 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 135 cnv 15 160 115 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 484 284 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 135 cnv 15 160 115 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -58,56 +30,55 @@ #X text 63 307 ; #X text 56 448 Outlet 1: gemlist; #X text 63 352 Inlet 1: gemlist; -#X obj 451 253 pix_draw; +#X obj 451 253 _pix2rectangle 3; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X text 63 365 Inlet 1: 1|0 : apply/don't apply (default:1); -#X floatatom 464 177 3 0.01 16 1 - - -; -#X obj 35 477 cnv 15 375 20 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 44 480 (ported from "pete's plugins" \, www.petewarden.com) -; +#X floatatom 464 177 3 0.01 16 1 - - - 0; +#X obj 35 477 cnv 15 375 20 empty empty empty 20 12 0 14 #fcac44 #404040 0; +#X text 44 480 (ported from "pete's plugins" \, www.petewarden.com); #X msg 464 195 refract \$1; #X msg 544 195 mag \$1; -#X floatatom 464 137 3 0 0 1 - - -; -#X floatatom 544 137 3 0 0 1 - - -; +#X floatatom 464 137 3 0 0 1 - - - 0; +#X floatatom 544 137 3 0 0 1 - - - 0; #X msg 464 155 width \$1; #X msg 544 155 height \$1; #X obj 451 226 pix_refraction; -#X obj 544 176 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 544 176 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 29 56 Description: display a pix through glass bricks; #X text 80 158 range = 0.01 to 16 \, default = 2; #X text 79 198 range = 1 to 255 \, default = 16; #X text 80 230 range = 1 to 255 \, default = 16; #X text 80 273 range = 0 or 1 \, default = 1; -#X text 28 77 The input image is broken up into rectangular cells \, -and scaled up or down within them. The effect is like looking through -a wall of glass bricks \, each acting as a magnifying or shrinking -lens for its part of the image; -#X text 37 138 How much to shrink or expand the input image within -each cell; +#X text 28 77 The input image is broken up into rectangular cells \, and scaled up or down within them. The effect is like looking through a wall of glass bricks \, each acting as a magnifying or shrinking lens for its part of the image; +#X text 37 138 How much to shrink or expand the input image within each cell; #X text 37 182 Width of each cell \, where 1 is the image width; #X text 37 214 Height of each cell \, where 1 is the image height; -#X text 28 244 Turning this off prevents the image from being expanded -to larger than it's original size (within each cell); +#X text 28 244 Turning this off prevents the image from being expanded to larger than it's original size (within each cell); #X text 63 380 Inlet 1: width ; #X text 63 406 Inlet 1: mag 1|0; #X text 63 421 Inlet 1: refract ; #X text 63 392 Inlet 1: height ; #X text 49 12 Synopsis: [pix_refraction]; -#X obj 519 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 34 0; -#X connect 25 0 28 0; -#X connect 28 0 34 0; -#X connect 29 0 34 0; -#X connect 30 0 32 0; -#X connect 31 0 33 0; -#X connect 32 0 34 0; -#X connect 33 0 34 0; -#X connect 34 0 21 0; -#X connect 35 0 29 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION display a pix through glass bricks; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool width height mag refract; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 519 8 pd META; +#X obj 489 288 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 31 0; +#X connect 22 0 25 0; +#X connect 25 0 31 0; +#X connect 26 0 31 0; +#X connect 27 0 29 0; +#X connect 28 0 30 0; +#X connect 29 0 31 0; +#X connect 30 0 31 0; +#X connect 31 0 18 0; +#X connect 32 0 26 0; diff --git a/help/pix_resize-help.pd b/help/pix_resize-help.pd index aea015b7c..dc8270a9a 100644 --- a/help/pix_resize-help.pd +++ b/help/pix_resize-help.pd @@ -1,83 +1,44 @@ #N canvas 6 61 634 347 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 85 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 85 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 267 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 61 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 61 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 146 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 262 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 146 cnv 15 160 70 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 57 280 Outlet 1: gemlist; #X text 63 232 Inlet 1: gemlist; -#X obj 451 255 square 3; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 451 196 pix_resize; #X text 50 12 Synopsis: [pix_resize]; #X text 29 62 Description: resize an image; #X text 63 186 ; #X text 63 245 Inlet 1: dimen ; -#X msg 473 172 dimen 32 9; -#X text 12 76 [pix_resize]: resizes the image \; if you don't specify -any dimensions \, the image will be automatically resized to the next -power of 2 (eg. 320x240 will be resized to 512x256). You can change -the re-size with the "dimen"-message \; a value of "0" defaults to -the next power-of-2 of the original image; -#X obj 519 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 18 0 21 0; -#X connect 24 0 18 0; -#X connect 29 0 24 0; +#X msg 463 152 dimen 32 9; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION resize an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist dimen; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 519 8 pd META; +#X text 12 79 if you don't specify any dimensions \, the image will be automatically resized to the next power of 2 (eg. 320x240 will be resized to 512x256). You can change the re-size with the "dimen"-message \; a value of "0" defaults to the next power-of-2 of the original image; +#X obj 522 268 _gemwin; +#X obj 451 186 pix_resize; +#X msg 539 180 dimen 0 0; +#X obj 450 113 pix_test 240 320; +#X obj 451 223 pix_texture \; quality 0; +#X obj 451 259 square 3; +#X connect 11 0 25 0; +#X connect 19 0 23 0; +#X connect 23 0 26 0; +#X connect 24 0 23 0; +#X connect 25 0 23 0; +#X connect 26 0 27 0; diff --git a/help/pix_rgb2hsv-help.pd b/help/pix_rgb2hsv-help.pd index bc829c003..d1a940a09 100644 --- a/help/pix_rgb2hsv-help.pd +++ b/help/pix_rgb2hsv-help.pd @@ -1,85 +1,44 @@ #N canvas 6 61 633 364 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; +#X obj 451 233 _pix2rectangle 3; +#X obj 468 165 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; #X text 63 275 Inlet 1: 1|0 : apply/don't apply (default:1); #X text 94 340 see also:; #X obj 186 338 pix_hsv2rgb; #X text 50 12 Synopsis: [pix_rgb2hsv]; #X text 29 76 Description: convert RGB into HSV; -#X text 25 96 [pix_rgb2hsv] will (virtually) transform an RGB(red \, -green \, blue)-Image into the HSV (hue \, saturation \, value) color-space. -; +#X text 25 96 [pix_rgb2hsv] will (virtually) transform an RGB(red \, green \, blue)-Image into the HSV (hue \, saturation \, value) color-space.; #X text 30 140 This might enable simpler colour-detection...; -#X text 29 162 On the technical (internal) side \, the image still -stays RGBA. The Red-channel is filled with Hue-values....; +#X text 29 162 On the technical (internal) side \, the image still stays RGBA. The Red-channel is filled with Hue-values....; #X obj 451 186 pix_rgb2hsv; -#X obj 521 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 33 0; -#X connect 24 0 33 0; -#X connect 33 0 21 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert RGB into HSV; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 521 8 pd META; +#X obj 520 261 _gemwin; +#X obj 451 113 pix_test; +#X connect 11 0 29 0; +#X connect 17 0 26 0; +#X connect 26 0 16 0; +#X connect 29 0 26 0; diff --git a/help/pix_rgba-help.pd b/help/pix_rgba-help.pd index 7cd17a01f..f29148991 100644 --- a/help/pix_rgba-help.pd +++ b/help/pix_rgba-help.pd @@ -1,90 +1,46 @@ #N canvas 6 61 631 372 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 22 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X obj 451 233 pix_draw; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X text 22 93 Images can be stored in various formats/color-spaces. -; -#X obj 468 166 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; +#X obj 451 233 _pix2rectangle 3; +#X text 22 93 Images can be stored in various formats/color-spaces.; +#X obj 468 166 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; #X text 63 275 Inlet 1: 1|0: turn conversion on/off (default:1); #X text 62 339 see also:; #X obj 155 338 pix_yuv; #X obj 451 196 pix_rgba; #X text 50 12 Synopsis: [pix_rgba]; #X obj 205 338 pix_grey; -#X text 15 77 Description: convert the colorspace of an image to RGBA -; -#X text 22 107 GREY-scale images have no color-component \, while YUV -is missing the Alpha-channel.; -#X text 19 159 You can use [pix_rgba] to convert images of any format -into RGBA-space. If your image already is in RGBA-space \, this will -do nothing.; -#X text 19 133 Traditionally \, RGBA is the native colour-space of -Gem \, although it is quite CPU-consumptive.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 29 0; -#X connect 25 0 29 0; -#X connect 29 0 21 0; +#X text 15 77 Description: convert the colorspace of an image to RGBA; +#X text 22 107 GREY-scale images have no color-component \, while YUV is missing the Alpha-channel.; +#X text 19 159 You can use [pix_rgba] to convert images of any format into RGBA-space. If your image already is in RGBA-space \, this will do nothing.; +#X text 19 133 Traditionally \, RGBA is the native colour-space of Gem \, although it is quite CPU-consumptive.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert the colorspace of an image to RGBA; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 113 pix_test; +#X obj 520 257 _gemwin; +#X connect 11 0 30 0; +#X connect 18 0 22 0; +#X connect 22 0 16 0; +#X connect 30 0 22 0; diff --git a/help/pix_roi-help.pd b/help/pix_roi-help.pd index ad331b7c1..5e97ce93a 100644 --- a/help/pix_roi-help.pd +++ b/help/pix_roi-help.pd @@ -8,27 +8,6 @@ #X obj 7 56 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 459 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 463 60 Example:; -#X obj 524 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 1 98 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy \, reset; -#X msg 132 94 create \, 1 \, color 0.5 0.5 0.5; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 529 293 pd gemwin; -#X msg 529 274 create; #X obj 460 114 cnv 15 170 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 71 31 Class: pix object; #X text 53 342 Inlet 1: gemlist; @@ -37,7 +16,6 @@ #X text 53 355 Inlet 1: roi : set roi; #X text 38 372 Outlets:; #X text 46 385 Outlet 1: gemlist; -#X text 525 253 Create window:; #X msg 461 86 gem_list; #X msg 461 238 gemlist; #X obj 461 186 pix_roi 0.25 0.25 0.75 0.75; @@ -47,10 +25,16 @@ #X text 21 79 [pix_roi] will allow you to set the region of interest of the current image-data.; #X text 22 139 other pix-objects should then apply whatever they are doing on the so-specified sub-image.; #X text 22 170 (currently only [pix_set] supports ROI \, more will hopefully follow); -#X obj 528 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION set the region-of-interest of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist roi; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 528 8 pd META; #X text 442 358 see example/04.pix/27.bitmap_font.pd, f 32; -#X connect 9 0 10 0; -#X connect 10 0 9 0; -#X connect 20 0 22 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; +#X connect 16 0 18 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; diff --git a/help/pix_roll-help.pd b/help/pix_roll-help.pd index 5e9c53b35..80bf36947 100644 --- a/help/pix_roll-help.pd +++ b/help/pix_roll-help.pd @@ -1,90 +1,47 @@ #N canvas 6 61 651 355 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 140 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 140 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X connect 0 0 5 0; -#X connect 2 0 4 0; -#X connect 3 0 5 0; -#X connect 4 0 3 0; -#X connect 5 0 1 0; -#X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 57 323 Outlet 1: gemlist; #X text 33 232 Inlet 1: gemlist; -#X obj 451 255 square 3; -#X floatatom 530 175 5 0 0 2 roll - -; +#X floatatom 530 175 5 0 0 2 roll - - 0; #X obj 451 196 pix_roll; #X msg 459 168 axis \$1; -#X obj 459 147 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 459 147 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 50 12 Synopsis: [pix_roll]; -#X text 12 90 [pix_roll] will roll/scroll an image (wrap around the -left/right vs. upper/lower edge); +#X text 12 90 [pix_roll] will roll/scroll an image (wrap around the left/right vs. upper/lower edge); #X text 33 278 Inlet 2: int: (sc)roll number of pixels; #X text 29 77 Description: (sc)roll through an image; -#X text 33 245 Inlet 1: message: axis [0|1] scroll(0=default) or roll(1) -; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X text 13 116 [pix_roll] gives an effect similar to vertical and horizontal -hold on a television. the offset is user defined and can be incremented -using a counter object for a looping roll effect.; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; +#X text 33 245 Inlet 1: message: axis [0|1] scroll(0=default) or roll(1); +#X text 13 116 [pix_roll] gives an effect similar to vertical and horizontal hold on a television. the offset is user defined and can be incremented using a counter object for a looping roll effect.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION (sc)roll through an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist axis; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 260 _gemwin; +#X obj 451 233 _pix2rectangle 3; +#X obj 451 113 pix_test; +#X connect 11 0 29 0; #X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 18 0 22 0; -#X connect 23 0 24 1; -#X connect 24 0 18 0; -#X connect 25 0 24 0; -#X connect 26 0 25 0; +#X connect 17 0 28 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 29 0 17 0; diff --git a/help/pix_rtx-help.pd b/help/pix_rtx-help.pd index eb300e185..111246fa3 100644 --- a/help/pix_rtx-help.pd +++ b/help/pix_rtx-help.pd @@ -1,53 +1,23 @@ #N canvas 20 122 661 405 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 267 Inlets:; #X text 39 362 Outlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 231 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 549 329 pd gemwin; -#X msg 549 310 create; -#X text 545 289 Create window:; -#X obj 451 173 cnv 15 155 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 544 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 173 cnv 15 155 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 376 Outlet 1: gemlist; #X text 24 281 Inlet 1: gemlist; -#X obj 451 322 square 3; -#X obj 451 300 pix_texture; #X text 71 31 Class: pix object (timebased effect); #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -68,37 +38,35 @@ #X text 523 124 linux: depends...; #X obj 451 232 pix_rtx; #X text 50 12 Synopsis: [pix_rtx]; -#X text 21 86 [pix_rtx] does something similar to tx-transform. The -main differences are: 1) it is done in realtime \; 2) it is released -under the GnuGPL and hopes to stay free forever.; -#X text 23 142 basically the time-axis (now->later) and the x-axis -(left->right) are swapped. for more information see http://umlaeute.mur.at/rtx -; -#X text 25 183 beware: [pix_rtx] needs a lot of memory:: mem=(width^2)*height*4 -bytes (for a 320x240 movie \, this would be more than 70MByte that -have to stay in RAM); +#X text 21 86 [pix_rtx] does something similar to tx-transform. The main differences are: 1) it is done in realtime \; 2) it is released under the GnuGPL and hopes to stay free forever.; +#X text 23 142 basically the time-axis (now->later) and the x-axis (left->right) are swapped. for more information see http://umlaeute.mur.at/rtx; +#X text 25 183 beware: [pix_rtx] needs a lot of memory:: mem=(width^2)*height*4 bytes (for a 320x240 movie \, this would be more than 70MByte that have to stay in RAM); #X text 29 55 Description: RealTime vs. X transformation; #X text 29 68 Description: Relative Time-X transformation; #X msg 551 205 set; #X msg 468 205 mode \$1; -#X obj 468 185 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 468 185 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 87 240 ; -#X text 23 299 Inlet 1: set : sets the whole internal buffer to the -next incoming frame; -#X text 23 329 Inlet 1: mode 1|0 : clamp the discontinuity to the edge -or not. (default:1); -#X obj 538 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 29 0; -#X connect 20 2 21 0; -#X connect 21 0 20 1; -#X connect 22 0 23 0; -#X connect 23 0 20 0; -#X connect 29 0 18 0; -#X connect 36 0 29 0; -#X connect 37 0 29 0; -#X connect 38 0 37 0; +#X text 23 299 Inlet 1: set : sets the whole internal buffer to the next incoming frame; +#X text 23 329 Inlet 1: mode 1|0 : clamp the discontinuity to the edge or not. (default:1); +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION RealTime vs. X transformation; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set mode; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 538 8 pd META; +#X obj 554 296 _gemwin; +#X obj 451 270 _pix2rectangle 3; +#X connect 11 0 15 0; +#X connect 15 0 24 0; +#X connect 15 2 16 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 24 0 39 0; +#X connect 31 0 24 0; +#X connect 32 0 24 0; +#X connect 33 0 32 0; diff --git a/help/pix_scanline-help.pd b/help/pix_scanline-help.pd index df617d020..bbfa5a2d2 100644 --- a/help/pix_scanline-help.pd +++ b/help/pix_scanline-help.pd @@ -1,47 +1,19 @@ #N canvas 6 61 628 355 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 310 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 136 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 136 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -55,35 +27,36 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 113 pd image; -#X obj 451 233 pix_texture; #X text 63 186 ; #X text 17 323 Outlet 1: gemlist; #X text 23 232 Inlet 1: gemlist; -#X obj 451 255 square 3; -#X floatatom 530 175 5 0 0 2 interlace - -; +#X floatatom 530 175 5 0 0 2 interlace - - 0; #X obj 451 196 pix_scanline; -#X obj 465 140 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 465 140 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 465 159 mode \$1; #X text 50 12 Synopsis: [pix_scanline]; #X text 29 77 Description: scan lines of an image; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X text 16 103 [pix_scanline] manipulates each row of an image by either -removing or duplicating them. this can be used an image resolution -decimator in mode 0 or as an interlacer in mode 1; -#X text 23 245 Inlet 1: message: mode [0|1] (duplicate(=default) or -draw only); -#X text 23 278 Inlet 2: int: the number of lines to duplicate or the -to skip between drawing; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 24 0; -#X connect 18 0 22 0; -#X connect 23 0 24 1; -#X connect 24 0 18 0; -#X connect 25 0 26 0; -#X connect 26 0 24 0; +#X text 16 103 [pix_scanline] manipulates each row of an image by either removing or duplicating them. this can be used an image resolution decimator in mode 0 or as an interlacer in mode 1; +#X text 23 245 Inlet 1: message: mode [0|1] (duplicate(=default) or draw only); +#X text 23 278 Inlet 2: int: the number of lines to duplicate or the to skip between drawing; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION scan lines of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist mode; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 223 _pix2rectangle 3; +#X obj 519 258 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 19 0; +#X connect 18 0 19 1; +#X connect 19 0 30 0; +#X connect 20 0 21 0; +#X connect 21 0 19 0; diff --git a/help/pix_set-help.pd b/help/pix_set-help.pd index a58eaebaa..1ff67156e 100644 --- a/help/pix_set-help.pd +++ b/help/pix_set-help.pd @@ -1,105 +1,71 @@ #N canvas 285 331 650 585 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 326 cnv 15 430 240 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 326 cnv 15 430 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 328 Inlets:; #X text 38 462 Outlets:; -#X obj 8 286 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 286 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 285 Arguments:; -#X obj 7 56 cnv 15 430 220 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 300 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 56 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 354 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 1 98 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy \, reset; -#X msg 132 94 create \, 1 \, color 0.5 0.5 0.5; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 393 pd gemwin; -#X msg 519 374 create; -#X text 515 353 Create window:; -#X obj 450 114 cnv 15 160 150 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 114 cnv 15 160 150 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; #X text 46 475 Outlet 1: gemlist; #X text 53 342 Inlet 1: gemlist; #X text 50 12 Synopsis: [pix_set]; -#X obj 451 323 pix_texture; -#X obj 450 345 square; #X msg 459 160 RGBA; #X msg 458 119 GREY; #X msg 460 140 RGB; #X text 63 296 ; -#X text 21 79 [pix_set] will allow you to set the image-data of a pixel -with one long list of (m*n) pixel-tuples.; -#X text 22 109 The size of the image can be set with creation-arguments. -It defaults to 64*64.; -#X text 22 143 How the list is interpreted depends on the mode \, [pix_set] -is set to. When in RGBA-Mode (default) you should pass a float-list -of the form "R1 G1 B1 A1 R2 G2 B2 A2 ...". In RGB-Mode the float-list -will be of the form "R1 G1 B1 R2 G2 B2 ...". In GREY-Mode the float-list -is simply "V1 V2 ..."; -#X text 18 220 If the list does not contain enough data \, the rest -of the image will be set to 0 (black).; +#X text 21 79 [pix_set] will allow you to set the image-data of a pixel with one long list of (m*n) pixel-tuples.; +#X text 22 109 The size of the image can be set with creation-arguments. It defaults to 64*64.; +#X text 22 143 How the list is interpreted depends on the mode \, [pix_set] is set to. When in RGBA-Mode (default) you should pass a float-list of the form "R1 G1 B1 A1 R2 G2 B2 A2 ...". In RGB-Mode the float-list will be of the form "R1 G1 B1 R2 G2 B2 ...". In GREY-Mode the float-list is simply "V1 V2 ..."; +#X text 18 220 If the list does not contain enough data \, the rest of the image will be set to 0 (black).; #X text 16 257 The image will always be in RGBA-color-space !; #X text 53 355 Inlet 1: RGBA|RGB|GREY : set format of input-data; -#X text 52 436 Inlet 2: list : interleaved image-data (R1 G1 B1 A1 -R2 B2...) or (R1 B1 G1 R2 B2...) or (L1 L2 L3...); +#X text 52 436 Inlet 2: list : interleaved image-data (R1 G1 B1 A1 R2 B2...) or (R1 B1 G1 R2 B2...) or (L1 L2 L3...); #X text 29 56 Description: set the pixel-data of an image; #X text 460 476 see also; #X obj 530 477 pix_dump; -#X msg 536 323 quality 0; #X obj 451 236 pix_set 4 4; -#X obj 536 303 loadbang; #X msg 512 166 1 0.25 0.5 0.75 1 0 0 0 1 1 1 0 1 0 1 0 1 1, f 12; -#X text 53 370 Inlet 1: bang send image (to update texture for example) -; -#X text 53 385 Inlet 1: fill : set the whole image with value (value -could be G \, RGB or RGBA); +#X text 53 370 Inlet 1: bang send image (to update texture for example); +#X text 53 385 Inlet 1: fill : set the whole image with value (value could be G \, RGB or RGBA); #X text 53 411 Inlet 1: set : set the size of the image; #X obj 502 142 r pix_set_in; #X text 447 511 and example/04.pix/27.bitmap_font.pd, f 32; -#X obj 518 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION set the pixel-data of an image; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist RGBA RGB GREY bang fill set; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; #N canvas 447 128 725 362 advanced 0; #X msg 26 210 set 16 16; #X msg 57 238 set 4 4; #X msg 24 93 fill \$1 \, bang; -#X floatatom 24 76 5 0 1 0 - - -; +#X floatatom 24 76 5 0 1 0 - - - 0; #X msg 186 114 fill \$1 \$2 \$3 \$4 \, bang; #X obj 186 92 pack 0 0 0 0; -#X floatatom 186 47 5 0 1 0 - - -; -#X floatatom 226 47 5 0 1 0 - - -; -#X floatatom 266 47 5 0 1 0 - - -; -#X floatatom 312 48 5 0 1 0 - - -; +#X floatatom 186 47 5 0 1 0 - - - 0; +#X floatatom 226 47 5 0 1 0 - - - 0; +#X floatatom 266 47 5 0 1 0 - - - 0; +#X floatatom 312 48 5 0 1 0 - - - 0; #X obj 24 177 s pix_set_in; -#X text 33 30 fill message fill the whole image with the given values -; +#X text 33 30 fill message fill the whole image with the given values; #X text 174 133 in RGBA mode you can set each channel; #X obj 312 64 t b f; #X obj 266 64 t b f; #X obj 226 64 t b f; -#X floatatom 446 47 5 0 1 0 - - -; -#X floatatom 486 47 5 0 1 0 - - -; -#X floatatom 526 47 5 0 1 0 - - -; +#X floatatom 446 47 5 0 1 0 - - - 0; +#X floatatom 486 47 5 0 1 0 - - - 0; +#X floatatom 526 47 5 0 1 0 - - - 0; #X obj 526 64 t b f; #X obj 486 64 t b f; #X text 457 135 in RGB mode you can set each channel; @@ -107,8 +73,7 @@ could be G \, RGB or RGBA); #X obj 446 92 pack 0 0 0; #X obj 26 315 s pix_set_in; #X text 105 210 set the size of the image; -#X obj 154 272 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 154 272 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X text 176 273 send the image; #X connect 0 0 24 0; #X connect 1 0 24 0; @@ -137,15 +102,12 @@ could be G \, RGB or RGBA); #X connect 23 0 22 0; #X connect 26 0 24 0; #X restore 503 121 pd advanced; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 36 0; -#X connect 19 0 20 0; -#X connect 21 0 36 0; -#X connect 22 0 36 0; -#X connect 23 0 36 0; -#X connect 35 0 19 0; -#X connect 36 0 19 0; -#X connect 37 0 35 0; -#X connect 38 0 36 1; -#X connect 42 0 36 0; +#X obj 472 310 _gemwin \; 0 \; 0 \; color 0.5 0.5 0.5; +#X obj 451 274 _pix2rectangle 3 \; quality 0; +#X connect 10 0 29 0; +#X connect 15 0 29 0; +#X connect 16 0 29 0; +#X connect 17 0 29 0; +#X connect 29 0 39 0; +#X connect 30 0 29 1; +#X connect 34 0 29 0; diff --git a/help/pix_share_read-help.pd b/help/pix_share_read-help.pd index ca796fef3..f115fae9f 100644 --- a/help/pix_share_read-help.pd +++ b/help/pix_share_read-help.pd @@ -1,62 +1,25 @@ #N canvas 246 139 904 368 10; #X declare -lib Gem; #X text 701 8 GEM object; -#X obj 8 270 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 270 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 271 Inlets:; #X text 34 306 Outlets:; -#X obj 8 231 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 231 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 230 Arguments:; -#X obj 7 56 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 57 cnv 15 440 220 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 56 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 57 cnv 15 440 220 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 40 Example:; -#X obj 484 204 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 489 243 pd gemwin; -#X msg 489 224 create; -#X text 485 203 Create window:; -#X obj 450 84 cnv 15 400 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 484 204 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 84 cnv 15 400 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 64 gemhead; #X text 71 31 Class: pix object; #X text 63 283 Inlet 1: gemlist; #X text 63 241 ; #X text 446 284 see also:; -#X text 18 127 [pix_share_write] and [pix_share_read] need not be in -the same instance of Pd. However all objects need to have access to -the same memory (they probably need to run on the same computer); -#X obj 451 154 pix_texture; -#X obj 451 175 square; -#X text 15 181 [pix_share_read] needs to know the image-dimensions -(and color-space) in advance. The color-space can be given as a symbol -("RGBA" \, "YUV" \, "Grey") or as pixel-width (4 \, 2 \, 1); -#X text 18 72 [pix_share_read] will create (if needed) a portion of -shared memory - identified by a given ID - where it can read pix-data -from. This data needs to be written by a [pix_share_write] object (referencing -to the same ID).; -#X text 29 56 Description: read pixels from a shared memory region -; +#X text 18 127 [pix_share_write] and [pix_share_read] need not be in the same instance of Pd. However all objects need to have access to the same memory (they probably need to run on the same computer); +#X text 15 181 [pix_share_read] needs to know the image-dimensions (and color-space) in advance. The color-space can be given as a symbol ("RGBA" \, "YUV" \, "Grey") or as pixel-width (4 \, 2 \, 1); +#X text 18 72 [pix_share_read] will create (if needed) a portion of shared memory - identified by a given ID - where it can read pix-data from. This data needs to be written by a [pix_share_write] object (referencing to the same ID).; +#X text 29 56 Description: read pixels from a shared memory region; #X text 50 12 Synopsis: [pix_share_read]; #X text 446 313 Run the [pix_share_write] help-patch; #X text 446 327 in a different Pd instance on your; @@ -75,17 +38,25 @@ to the same ID).; #X text 543 121 arguments are optional; #X msg 666 103 set memory_name 256 256 RGBA; #X text 669 86 also work with symbol :; -#X obj 778 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 39 0; -#X connect 20 0 21 0; -#X connect 31 0 39 0; -#X connect 32 0 33 0; -#X connect 32 1 34 0; -#X connect 33 0 36 0; -#X connect 34 0 36 0; -#X connect 35 0 32 0; -#X connect 39 0 20 0; -#X connect 39 1 35 0; -#X connect 41 0 39 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION read pixels from a shared memory region; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 error; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 778 8 pd META; +#X obj 451 154 _pix2rectangle; +#X obj 490 211 _gemwin; +#X connect 11 0 34 0; +#X connect 26 0 34 0; +#X connect 27 0 28 0; +#X connect 27 1 29 0; +#X connect 28 0 31 0; +#X connect 29 0 31 0; +#X connect 30 0 27 0; +#X connect 34 0 39 0; +#X connect 34 1 30 0; +#X connect 36 0 34 0; diff --git a/help/pix_share_write-help.pd b/help/pix_share_write-help.pd index fa42b7500..d51f8e529 100644 --- a/help/pix_share_write-help.pd +++ b/help/pix_share_write-help.pd @@ -1,4 +1,4 @@ -#N canvas 547 473 901 407 10; +#N canvas 262 307 901 407 10; #X declare -lib Gem; #X text 701 8 GEM object; #X obj 8 270 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; @@ -10,52 +10,11 @@ #X obj 449 77 cnv 15 440 200 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; #X obj 484 204 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 489 243 pd gemwin; -#X msg 489 224 create; -#X text 485 203 Create window:; #X obj 450 140 cnv 15 370 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; -#N canvas 0 50 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X obj 77 279 pix_rgba; -#X obj 77 307 pix_resize 256 256; -#X connect 0 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X connect 6 0 7 0; -#X connect 7 0 1 0; -#X restore 451 113 pd image; #X text 56 324 Outlet 1: gemlist; #X text 63 283 Inlet 1: gemlist; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_share_write]; #X text 29 56 Description: write pixels to a shared memory region; #X text 63 241 ; @@ -79,17 +38,25 @@ #X text 548 175 arguments are optional; #X msg 626 148 set memory_name 256 256 RGBA; #X text 643 128 also work with symbol :; -#X obj 778 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 41 0; -#X connect 34 0 41 0; -#X connect 35 0 36 0; -#X connect 35 1 37 0; -#X connect 36 0 39 0; -#X connect 37 0 39 0; -#X connect 38 0 35 0; -#X connect 41 1 38 0; -#X connect 43 0 41 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION write pixels to a shared memory region; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 error; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 778 8 pd META; +#X obj 490 212 _gemwin; +#X obj 451 113 pix_test; +#X connect 11 0 40 0; +#X connect 27 0 34 0; +#X connect 28 0 29 0; +#X connect 28 1 30 0; +#X connect 29 0 32 0; +#X connect 30 0 32 0; +#X connect 31 0 28 0; +#X connect 34 1 31 0; +#X connect 36 0 34 0; +#X connect 40 0 34 0; diff --git a/help/pix_sig2pix~-help.pd b/help/pix_sig2pix~-help.pd index db6d1314a..ac8edfa5c 100644 --- a/help/pix_sig2pix~-help.pd +++ b/help/pix_sig2pix~-help.pd @@ -10,34 +10,10 @@ #X obj 452 81 cnv 15 170 465 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 459 64 Example:; #X obj 516 480 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create+DSP; -#X obj 67 41 route create+DSP; -#X msg 102 163 \; pd dsp 1; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 0 8 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 521 519 pd gemwin; -#X msg 521 500 create+DSP; -#X text 517 479 Create window:; -#X obj 457 120 cnv 15 160 190 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 457 120 cnv 15 160 320 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 457 94 gemhead; #X text 23 527 Outlet 1: gemlist; #X text 29 406 Inlet 1: gemlist; -#X obj 457 479 square 3; #X text 69 369 list: [ ]; #X obj 532 94 block~ 4096; #X obj 465 210 osc~ 1; @@ -58,7 +34,18 @@ #X text 29 497 Inlet 4: signal: alpha channel; #X text 29 419 Inlet 1: message: dimen ; #X obj 457 413 pix_sig2pix~ 64 64; -#X obj 524 13 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert signals to images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist dimen type mode signal; +#X text 20 105 INLET_1 signal; +#X text 20 125 INLET_2 signal; +#X text 20 145 INLET_3 signal; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 524 13 pd META; #X text 29 431 Inlet 1: message: type BYTE|FLOAT|DOUBLE; #X obj 457 168 t a; #X msg 492 147 type BYTE; @@ -72,27 +59,33 @@ #X msg 475 374 mode waterfall; #X text 18 79 [pix_sig2pix~] will interpret the 4 incoming audio-streams as values for the red \, green \, blue and alpha channel of an image. The default image-size is calculated from the blocksize (eg: 64samples -> 8x8 & 128samples -> 16x8) \, but you can set it either with arguments or the [dimen( message. If your imagesize is bigger than the blocksize \, the rest will be zeroed out. For legacy reasons \, images are upside-down. You can flip them with the 'upsidedown' message., f 69; #X msg 480 285 upsidedown 0; -#X obj 457 445 pix_texture \; quality 0; #X text 29 444 Inlet 1: message: mode clear|fill|line|waterfall; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 40 0; -#X connect 20 0 22 0; -#X connect 21 0 37 0; -#X connect 22 0 21 0; -#X connect 23 0 26 0; -#X connect 24 0 27 0; -#X connect 25 0 26 1; -#X connect 26 0 37 1; -#X connect 27 0 37 2; -#X connect 28 0 20 0; -#X connect 37 0 52 0; -#X connect 40 0 37 0; -#X connect 41 0 40 0; -#X connect 44 0 37 0; -#X connect 45 0 37 0; -#X connect 46 0 37 0; -#X connect 47 0 40 0; -#X connect 49 0 37 0; -#X connect 51 0 37 0; -#X connect 52 0 17 0; +#X obj 524 487 _gemwin; +#N canvas 735 418 450 300 dsp 0; +#X obj 59 45 inlet; +#X obj 59 68 select 1; +#X msg 59 91 \; pd dsp 1; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 524 542 pd dsp; +#X obj 457 445 _pix2rectangle 3 \; quality 0; +#X connect 11 0 36 0; +#X connect 16 0 18 0; +#X connect 17 0 33 0; +#X connect 18 0 17 0; +#X connect 19 0 22 0; +#X connect 20 0 23 0; +#X connect 21 0 22 1; +#X connect 22 0 33 1; +#X connect 23 0 33 2; +#X connect 24 0 16 0; +#X connect 33 0 51 0; +#X connect 36 0 33 0; +#X connect 37 0 36 0; +#X connect 40 0 33 0; +#X connect 41 0 33 0; +#X connect 42 0 33 0; +#X connect 43 0 36 0; +#X connect 45 0 33 0; +#X connect 47 0 33 0; +#X connect 49 0 50 0; diff --git a/help/pix_snap-help.pd b/help/pix_snap-help.pd index 891c6dd47..da1b83475 100644 --- a/help/pix_snap-help.pd +++ b/help/pix_snap-help.pd @@ -10,33 +10,11 @@ #X obj 449 67 cnv 15 380 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 50 Example:; #X obj 594 303 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 16 419 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 268 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 599 342 pd gemwin; -#X msg 599 323 create; -#X text 595 302 Create window:; #X obj 452 137 cnv 15 240 140 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 71 31 Class: pix object; #X text 27 423 Outlet 1: gemlist; #X text 33 289 Inlet 1: gemlist; -#X obj 451 335 square 3; -#X obj 706 193 sphere; +#X obj 706 196 sphere; #X obj 451 74 gemhead 50; #X obj 706 75 gemhead 49; #X obj 482 207 spigot; @@ -48,7 +26,7 @@ #X text 63 246 list: [offsetX offsetY [dimX dimY]]; #X floatatom 527 75 5 0 0 0 - - - 0; #X obj 451 114 rotate 0 1 0 0; -#X obj 706 143 translate -1 0 1 0; +#X obj 706 146 translate -1 0 1 0; #X obj 451 94 translate 1 0 1 0; #X obj 451 187 t a b; #X obj 706 124 rotate 0 1 1 1; @@ -73,15 +51,24 @@ #X text 29 67 Description: take a screenshot and convert it to a Pix; #X text 13 91 When banged [pix_snap] will take a snapshot of the current frame buffer which can then be used as a pix. When a snap message (or a bang) is sent to [pix_snap] \, that is the moment that something is captured from the current frame buffer., f 69; #X obj 451 281 pix_invert; -#X obj 451 303 pix_texture; #X text 33 344 Inlet 1: snap: do grab!; #X obj 706 97 t a b; -#X obj 706 165 color 1 0 0; +#X obj 706 168 color 1 0 0; #X obj 482 227 t b b; #X msg 518 227 0; #X obj 451 256 pix_snap 0 0 500 500; #X msg 570 209 100 100; -#X obj 598 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION take a screenshot and convert it to a Pix; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bang dimen offset snap type; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 598 8 pd META; #X text 33 376 Inlet 2: list: offsetX offsetY (in pixels. default: 0 0), f 63; #X text 33 391 Inlet 3: list: dimenX dimenY (in pixels. default: window-size), f 63; #X text 33 357 Inlet 1: type BYTE|FLOAT|DOUBLE; @@ -89,29 +76,28 @@ #X text 33 318 Inlet 1: dimen ; #X text 33 330 Inlet 1: offset ; #X msg 518 177 type FLOAT; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 19 0 31 0; -#X connect 20 0 44 0; -#X connect 21 0 46 0; -#X connect 22 0 21 1; -#X connect 23 0 48 2; -#X connect 28 0 29 1; -#X connect 29 0 32 0; -#X connect 30 0 45 0; -#X connect 31 0 29 0; -#X connect 32 0 48 0; -#X connect 32 1 21 0; -#X connect 33 0 30 0; -#X connect 34 0 33 1; -#X connect 41 0 42 0; -#X connect 42 0 17 0; -#X connect 44 0 33 0; -#X connect 44 1 34 0; -#X connect 45 0 18 0; -#X connect 46 0 48 0; -#X connect 46 1 47 0; -#X connect 47 0 22 0; -#X connect 48 0 41 0; -#X connect 49 0 48 1; -#X connect 57 0 48 0; +#X obj 601 307 _gemwin; +#X obj 451 303 _pix2rectangle 3; +#X connect 15 0 27 0; +#X connect 16 0 39 0; +#X connect 17 0 41 0; +#X connect 18 0 17 1; +#X connect 19 0 43 2; +#X connect 24 0 25 1; +#X connect 25 0 28 0; +#X connect 26 0 40 0; +#X connect 27 0 25 0; +#X connect 28 0 43 0; +#X connect 28 1 17 0; +#X connect 29 0 26 0; +#X connect 30 0 29 1; +#X connect 37 0 54 0; +#X connect 39 0 29 0; +#X connect 39 1 30 0; +#X connect 40 0 14 0; +#X connect 41 0 43 0; +#X connect 41 1 42 0; +#X connect 42 0 18 0; +#X connect 43 0 37 0; +#X connect 44 0 43 1; +#X connect 52 0 43 0; diff --git a/help/pix_snap2tex-help.pd b/help/pix_snap2tex-help.pd index d9d290527..d72a5389e 100644 --- a/help/pix_snap2tex-help.pd +++ b/help/pix_snap2tex-help.pd @@ -1,43 +1,16 @@ #N canvas 16 226 710 395 10; #X declare -lib Gem; #X text 518 8 GEM object; -#X obj 8 216 cnv 15 430 160 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 160 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 39 347 Outlets:; -#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 66 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 67 cnv 15 250 300 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 67 cnv 15 250 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 50 Example:; -#X obj 514 303 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 15 422 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 268 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 342 pd gemwin; -#X msg 519 323 create; -#X text 515 302 Create window:; -#X obj 452 157 cnv 15 240 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 303 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 452 157 cnv 15 240 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 71 31 Class: pix object; #X text 27 360 Outlet 1: gemlist; #X text 33 232 Inlet 1: gemlist; @@ -46,32 +19,23 @@ #X obj 568 133 sphere; #X obj 451 74 gemhead 50; #X obj 568 75 gemhead 49; -#X obj 571 256 tgl 15 1 empty empty texture_on/off 20 7 0 8 -262144 --1 -1 1 1; +#X obj 571 256 tgl 15 1 empty empty texture_on/off 20 7 0 8 #fcfcfc #000000 #000000 1 1; #X obj 482 217 spigot; #X obj 528 217 t b f; -#X obj 514 198 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 514 198 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 570 209 0 0; #X msg 570 233 256 256; #X text 50 12 Synopsis: [pix_snap2tex]; #X text 29 67 Description: take a screenshot and texture it; -#X text 13 81 When banged [pix_snap2tex] will take a snapshot of the -current render buffer and immediately texture it to any geometric object -attached. You can specify the close-up you want to be grabbed via offset/dimension-pairs. -; -#X text 12 135 When grabbing \, be sure that something is in the rendering-buffer -\, else you will get a black texture.; +#X text 13 81 When banged [pix_snap2tex] will take a snapshot of the current render buffer and immediately texture it to any geometric object attached. You can specify the close-up you want to be grabbed via offset/dimension-pairs.; +#X text 12 135 When grabbing \, be sure that something is in the rendering-buffer \, else you will get a black texture.; #X text 33 245 Inlet 1: bang: do grab!; #X text 33 257 Inlet 1: [1|0]: turn texturing on/off (default:1); -#X text 33 269 Inlet 1: message: quality [0|1]: turn texture-resampling -on(default)/off; -#X text 33 295 Inlet 2: list: offsetX offsetY (in pixels \; default: -0 0); -#X text 33 321 Inlet 3: list: dimenX dimenY (in pixels \; default: -window-size); +#X text 33 269 Inlet 1: message: quality [0|1]: turn texture-resampling on(default)/off; +#X text 33 295 Inlet 2: list: offsetX offsetY (in pixels \; default: 0 0); +#X text 33 321 Inlet 3: list: dimenX dimenY (in pixels \; default: window-size); #X text 63 186 list: [offsetX offsetY [dimX dimY]]; -#X floatatom 527 75 5 0 0 0 - - -; +#X floatatom 527 75 5 0 0 0 - - - 0; #X obj 451 114 rotate 0 1 0 0; #X obj 568 113 translate -1 0 1 0; #X obj 451 94 translate 1 0 1 0; @@ -95,30 +59,38 @@ window-size); #X text 624 233 dimension; #X text 598 211 offset; #X text 506 171 drawn but before the square; -#X obj 474 164 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 474 164 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X text 504 158 SNAP! after the sphere is; -#X obj 588 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 18 0 43 0; -#X connect 20 0 41 0; -#X connect 21 0 44 0; -#X connect 21 0 45 0; -#X connect 22 0 18 0; -#X connect 23 0 24 0; -#X connect 24 0 18 0; -#X connect 24 1 25 0; -#X connect 25 0 23 1; -#X connect 26 0 18 1; -#X connect 27 0 18 2; -#X connect 38 0 39 1; -#X connect 39 0 42 0; -#X connect 40 0 19 0; -#X connect 41 0 39 0; -#X connect 42 0 18 0; -#X connect 42 1 23 0; -#X connect 43 0 17 0; -#X connect 44 0 40 0; -#X connect 45 0 44 1; -#X connect 49 0 25 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION take a screenshot and texture it; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bang bool quality; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 519 309 _gemwin; +#X connect 15 0 40 0; +#X connect 17 0 38 0; +#X connect 18 0 41 0; +#X connect 18 0 42 0; +#X connect 19 0 15 0; +#X connect 20 0 21 0; +#X connect 21 0 15 0; +#X connect 21 1 22 0; +#X connect 22 0 20 1; +#X connect 23 0 15 1; +#X connect 24 0 15 2; +#X connect 35 0 36 1; +#X connect 36 0 39 0; +#X connect 37 0 16 0; +#X connect 38 0 36 0; +#X connect 39 0 15 0; +#X connect 39 1 20 0; +#X connect 40 0 14 0; +#X connect 41 0 37 0; +#X connect 42 0 41 1; +#X connect 46 0 22 0; diff --git a/help/pix_subtract-help.pd b/help/pix_subtract-help.pd index 7d6ef4572..b06a2c385 100644 --- a/help/pix_subtract-help.pd +++ b/help/pix_subtract-help.pd @@ -1,46 +1,18 @@ #N canvas 103 127 664 397 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 39 304 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; -#X obj 451 173 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 173 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 126 gemhead; -#X obj 496 109 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 109 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -53,12 +25,10 @@ #X connect 3 0 5 0; #X connect 4 0 2 0; #X connect 5 0 4 0; -#X restore 451 145 pd image; -#X obj 451 268 pix_texture; +#X restore 451 147 pd image; #X text 63 196 ; #X text 47 318 Outlet 1: gemlist; #X text 53 262 Inlet 1: gemlist; -#X obj 451 290 square 3; #X text 503 88 (JPEG \, TIFF \, ..); #X obj 541 129 gemhead; #N canvas 0 22 587 366 image 0; @@ -73,9 +43,8 @@ #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 1 0; -#X restore 541 148 pd image; -#X obj 586 110 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X restore 541 150 pd image; +#X obj 586 110 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 53 291 Inlet 2: gemlist; #X text 449 77 open two different images; #X text 71 31 Class: pix mix object; @@ -83,20 +52,26 @@ #X obj 451 203 pix_subtract; #X text 50 12 Synopsis: [pix_subtract]; #X text 29 67 Description: subtract 2 images; -#X text 19 89 [pix_subtract] simply subtracts two pixes from each other. -It clamps the resultant image so that no pixel values go below zero -(In other words \, it is easy to get a black out).; +#X text 19 89 [pix_subtract] simply subtracts two pixes from each other. It clamps the resultant image so that no pixel values go below zero (In other words \, it is easy to get a black out).; #X text 39 366 see also:; #X obj 101 368 pix_diff; #X obj 164 368 pix_compare; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 30 0; -#X connect 17 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 30 1; -#X connect 25 0 24 1; -#X connect 30 0 17 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION subtract 2 images; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 268 _pix2rectangle 3; +#X obj 520 296 _gemwin; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 25 0; +#X connect 18 0 19 0; +#X connect 19 0 25 1; +#X connect 20 0 19 1; +#X connect 25 0 33 0; diff --git a/help/pix_tIIR-help.pd b/help/pix_tIIR-help.pd index c8a6c75e5..3d33d84cf 100644 --- a/help/pix_tIIR-help.pd +++ b/help/pix_tIIR-help.pd @@ -1,53 +1,23 @@ #N canvas 118 61 683 405 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 9 265 cnv 15 430 135 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 40 267 Inlets:; #X text 39 372 Outlets:; -#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 227 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 226 Arguments:; -#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 210 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 56 cnv 15 430 165 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 210 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 519 329 pd gemwin; -#X msg 519 310 create; -#X text 515 289 Create window:; -#X obj 451 179 cnv 15 155 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 290 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 451 179 cnv 15 155 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 83 gemhead; #X text 17 386 Outlet 1: gemlist; #X text 24 281 Inlet 1: gemlist; -#X obj 451 292 square 3; -#X obj 451 270 pix_texture; #X text 71 31 Class: pix object (timebased effect); #X obj 451 151 pix_film; #X obj 515 151 t f; -#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 464 103 bng 25 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 85 49 inlet; #X obj 85 237 outlet; @@ -69,12 +39,12 @@ #X text 50 12 Synopsis: [pix_tIIR]; #X text 29 57 Description: timebased IIR-filter; #X text 64 237 list: ; -#X floatatom 464 218 3 0 1 2 fb0 - -; -#X floatatom 491 218 3 0 1 2 fb1 - -; -#X floatatom 517 218 3 0 1 2 fb2 - -; -#X floatatom 554 218 3 0 1 2 ff0 - -; +#X floatatom 464 218 3 0 1 2 fb0 - - 0; +#X floatatom 491 218 3 0 1 2 fb1 - - 0; +#X floatatom 517 218 3 0 1 2 fb2 - - 0; +#X floatatom 554 218 3 0 1 2 ff0 - - 0; #X obj 451 238 pix_tIIR 2 1; -#X floatatom 581 218 3 0 1 2 ff1 - -; +#X floatatom 581 218 3 0 1 2 ff1 - - 0; #N canvas 0 0 450 300 init 0; #X msg 175 214 0.3; #X msg 247 215 0.6; @@ -113,47 +83,45 @@ #X connect 14 0 3 0; #X connect 15 0 4 0; #X restore 610 201 pd init; -#X obj 610 184 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 610 184 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 477 182 set; -#X text 24 294 Inlet 1: message: set: overwrites the filter-buffers -with the next incoming image.; -#X text 24 323 Inlet 1: message: set 0: blanks the filter-buffers. -; +#X text 24 294 Inlet 1: message: set: overwrites the filter-buffers with the next incoming image.; +#X text 24 323 Inlet 1: message: set 0: blanks the filter-buffers.; #X text 24 343 Inlet 2..(M+2): float: mth feedback-coefficient; -#X text 24 355 Inlet (M+2)..(N+M+2): float: nth feedforward-coefficient -; +#X text 24 355 Inlet (M+2)..(N+M+2): float: nth feedforward-coefficient; #X text 37 189 w(n) = fb0 * x(n) + fb1 * w(n-1) + ... + fbN(n-M); #X text 38 203 y(n) = ff1 * w(n) + ff2 * w(n-1) + ... + ffM(n-N); -#X text 11 161 The output y() will calculate from the input x() at -a time n as follows; +#X text 11 161 The output y() will calculate from the input x() at a time n as follows; #X msg 517 183 set 0; -#X text 11 79 [pix_tIIR] is a time-based filter like [pix_motionblur] -\, [pix_biquad] or Pd's [biquad~]. The filter has a feedback- and a -feedforward-section \, the length of each can be specified as arguments. -The objects will have an inlet for each feedback-coefficient and an -inlet for each feedforward-coefficient.; -#X obj 548 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 20 0; -#X connect 18 0 17 0; -#X connect 20 0 36 0; -#X connect 20 2 21 0; -#X connect 21 0 20 1; -#X connect 22 0 23 0; -#X connect 23 0 20 0; -#X connect 32 0 36 1; -#X connect 33 0 36 2; -#X connect 34 0 36 3; -#X connect 35 0 36 4; -#X connect 36 0 18 0; -#X connect 37 0 36 5; -#X connect 38 0 32 0; -#X connect 38 1 33 0; -#X connect 38 2 34 0; -#X connect 38 3 35 0; -#X connect 38 4 37 0; -#X connect 39 0 38 0; -#X connect 40 0 36 0; -#X connect 48 0 36 0; +#X text 11 79 [pix_tIIR] is a time-based filter like [pix_motionblur] \, [pix_biquad] or Pd's [biquad~]. The filter has a feedback- and a feedforward-section \, the length of each can be specified as arguments. The objects will have an inlet for each feedback-coefficient and an inlet for each feedforward-coefficient.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION timebased IIR-filter; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist set; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 451 270 _pix2rectangle 3; +#X obj 519 295 _gemwin; +#X connect 11 0 15 0; +#X connect 15 0 31 0; +#X connect 15 2 16 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 27 0 31 1; +#X connect 28 0 31 2; +#X connect 29 0 31 3; +#X connect 30 0 31 4; +#X connect 31 0 46 0; +#X connect 32 0 31 5; +#X connect 33 0 27 0; +#X connect 33 1 28 0; +#X connect 33 2 29 0; +#X connect 33 3 30 0; +#X connect 33 4 32 0; +#X connect 34 0 33 0; +#X connect 35 0 31 0; +#X connect 43 0 31 0; diff --git a/help/pix_takealpha-help.pd b/help/pix_takealpha-help.pd index 2a5aa3c19..8f1a016cb 100644 --- a/help/pix_takealpha-help.pd +++ b/help/pix_takealpha-help.pd @@ -1,46 +1,17 @@ #N canvas 6 273 640 398 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 30 233 Inlets:; #X text 30 289 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 66 cnv 15 170 280 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 66 cnv 15 170 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 49 Example:; -#X obj 514 279 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy \, reset; -#X msg 132 93 create \, 1 \, color 0.5 0.5 0.5; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 318 pd gemwin; -#X msg 519 299 create; -#X text 515 278 Create window:; -#X obj 451 187 cnv 15 160 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 451 187 cnv 15 160 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 118 gemhead; -#X obj 496 101 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 496 101 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 22 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -54,11 +25,9 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 451 137 pd image; -#X obj 451 252 pix_texture; #X text 63 196 ; #X text 38 303 Outlet 1: gemlist; #X text 44 247 Inlet 1: gemlist; -#X obj 451 274 square 3; #X text 503 77 (JPEG \, TIFF \, ..); #X obj 519 121 gemhead; #N canvas 0 22 587 366 image 0; @@ -74,8 +43,7 @@ #X connect 4 0 2 0; #X connect 5 0 4 0; #X restore 519 140 pd image; -#X obj 564 102 bng 15 250 50 0 empty empty pix_load -45 8 0 8 -262144 --1 -1; +#X obj 564 102 bng 15 250 50 0 empty empty pix_load -45 8 0 8 #fcfcfc #000000 #000000; #X text 44 276 Inlet 2: gemlist; #X text 449 66 open two different images; #X text 71 31 Class: pix mix object; @@ -84,24 +52,30 @@ #X obj 519 161 pix_coloralpha; #X obj 451 232 alpha; #X text 29 67 Description: transfer the alpha-channel; -#X text 29 84 [pix_takealpha] takes the alpha-channel of the 2nd image -and applies it on the 1st image.; +#X text 29 84 [pix_takealpha] takes the alpha-channel of the 2nd image and applies it on the 1st image.; #X text 28 117 The 1st image has the be in RGBA-colorspace; -#X text 27 130 If the 2nd image is in non-RGBA colorspace \, the luminance -value is taken instead of the Alpha-value.; +#X text 27 130 If the 2nd image is in non-RGBA colorspace \, the luminance value is taken instead of the Alpha-value.; #X text 50 12 Synopsis: [pix_takealpha]; #X text 31 356 see also:; #X obj 96 358 pix_mask; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 30 0; -#X connect 17 0 21 0; -#X connect 23 0 24 0; -#X connect 24 0 31 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION transfer the alpha-channel; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 gemlist; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 468 278 _gemwin \; 0 \; 0 \; color 0.5 0.5 0.5; +#X obj 451 252 _pix2rectangle 3; +#X connect 10 0 12 0; +#X connect 11 0 12 1; +#X connect 12 0 24 0; +#X connect 17 0 18 0; +#X connect 18 0 25 0; +#X connect 19 0 18 1; +#X connect 24 0 26 0; #X connect 25 0 24 1; -#X connect 30 0 32 0; -#X connect 31 0 30 1; -#X connect 32 0 17 0; +#X connect 26 0 36 0; diff --git a/help/pix_test-help.pd b/help/pix_test-help.pd new file mode 100644 index 000000000..ac558d2e3 --- /dev/null +++ b/help/pix_test-help.pd @@ -0,0 +1,67 @@ +#N canvas 728 323 650 585 10; +#X declare -lib Gem; +#X text 452 8 GEM object; +#X obj 9 326 cnv 15 430 240 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 39 328 Inlets:; +#X text 38 432 Outlets:; +#X obj 8 286 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 17 285 Arguments:; +#X obj 7 56 cnv 15 430 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 200 380 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X text 453 60 Example:; +#X text 71 31 Class: pix object; +#X text 46 445 Outlet 1: gemlist; +#X text 53 342 Inlet 1: gemlist; +#X text 63 296 ; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION create test pixes; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist colorspace dimen noise; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X text 50 12 Synopsis: [pix_test]; +#X text 29 56 Description: create test pixes; +#X text 22 79 [pix_test] creates a test image \, of the specified dimensions and colorspace.; +#X text 24 118 The test-image consists of the SMPTE colorbars (7 colors with decreasing luminance: white \, yellow \, cyan \, green magenta \, red \, blue) \, followed by a black-white gradient and a white-black gradient.; +#X text 24 176 The bottom of the image is filled with grey noise (but this can be turned off with the 'noise' message); +#X text 53 364 Inlet 1: colorspace RGBA|RGB|YUV/GREY : set format of input-data; +#X text 53 390 Inlet 1: dimen : set dimensions.; +#X text 53 405 Inlet 1: noise <1|0> : with noise (default) or without; +#X obj 450 114 cnv 15 160 230 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 451 84 gemhead; +#X obj 451 355 pix_info, f 25; +#X floatatom 471 379 5 0 0 0 - - - 0; +#X floatatom 505 379 5 0 0 0 - - - 0; +#X floatatom 549 379 5 0 0 0 - - - 0; +#X msg 476 136 dimen 1920 1080; +#X obj 476 263 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 476 286 noise \$1; +#X msg 476 167 colorspace RGBA; +#X obj 451 159 t a; +#X msg 476 187 colorspace RGB; +#X msg 476 207 colorspace YUV; +#X msg 476 227 colorspace grey; +#X obj 451 251 t a; +#X obj 451 316 pix_test; +#X msg 476 116 dimen 64 64; +#X obj 455 488 _gemwin \; 0 \; 0 \; color 0.5 0.5 0.5; +#X obj 451 403 _pix2rectangle 3.5; +#X connect 23 0 32 0; +#X connect 24 0 40 0; +#X connect 24 1 25 0; +#X connect 24 2 26 0; +#X connect 24 3 27 0; +#X connect 28 0 32 0; +#X connect 29 0 30 0; +#X connect 30 0 37 0; +#X connect 31 0 36 0; +#X connect 32 0 36 0; +#X connect 33 0 36 0; +#X connect 34 0 36 0; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 37 0 24 0; +#X connect 38 0 32 0; diff --git a/help/pix_texture-help.pd b/help/pix_texture-help.pd index 14e945c77..c1768d438 100644 --- a/help/pix_texture-help.pd +++ b/help/pix_texture-help.pd @@ -1,51 +1,19 @@ -#N canvas 43 61 647 715 10; +#N canvas 43 61 647 834 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 392 cnv 15 430 360 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 392 cnv 15 430 360 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 19 394 Inlets:; #X text 22 665 Outlets:; -#X obj 8 352 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 352 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 351 Arguments:; -#X obj 8 56 cnv 15 430 285 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 600 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 453 60 Example:; -#X obj 515 572 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 234 221 dimen 500 500; -#X msg 279 189 dimen 1024 768; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 0 0; -#X restore 520 611 pd gemwin; -#X msg 520 592 create; -#X text 516 571 Create window:; -#X obj 455 276 cnv 15 160 265 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 451 84 gemhead; +#X obj 8 56 cnv 15 430 285 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 448 77 cnv 15 170 600 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X text 454 60 Example:; +#X obj 514 612 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 454 276 cnv 15 160 300 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 454 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 513 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 50 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -61,119 +29,98 @@ #X connect 3 0 5 0; #X connect 4 0 2 0; #X connect 5 0 4 0; -#X restore 451 113 pd image; +#X restore 454 113 pd image; #X obj 454 547 pix_texture; #X text 63 362 ; #X text 57 682 Outlet 1: gemlist; #X text 29 408 Inlet 1: gemlist; -#X obj 452 571 square 3; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); +#X obj 454 591 square 3; +#X text 519 105 open an image; +#X text 512 118 (JPEG \, TIFF \, ..); #X text 50 12 Synopsis: [pix_texture]; #X text 29 57 Description: apply texture mapping; -#X text 16 79 enables texture mapping with the current pix. Whatever -pix values are in the network currently will be used (ie \, all processing -after the pix_texture will not have any effect).; +#X text 16 79 enables texture mapping with the current pix. Whatever pix values are in the network currently will be used (ie \, all processing after the pix_texture will not have any effect)., f 69; #X msg 461 451 quality \$1; -#X obj 461 432 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 461 432 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X text 29 423 Inlet 1: 0|1 turn texturing On/off; -#X text 29 437 Inlet 1: quality 0|1 : GL_NEAREST | GL_LINEAR(default) -; -#X text 15 122 Send a quality message to change the quality of the -texture mapping. GL_LINEAR is better than GL_NEAREST (but also more -computationally expensive). However \, on many machines (especially -SGIs) \, there is no speed difference.; -#X text 14 233 [pix_texture] is able to texture images of ANY size -(even non-power of 2); -#X obj 532 472 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X text 29 437 Inlet 1: quality 0|1 : GL_NEAREST | GL_LINEAR(default); +#X text 16 122 Send a quality message to change the quality of the texture mapping. GL_LINEAR is better than GL_NEAREST (but also more computationally expensive). However \, on many machines (especially SGIs) \, there is no speed difference., f 69; +#X text 14 233 [pix_texture] is able to texture images of ANY size (even non-power of 2), f 54; +#X obj 532 472 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 532 491 rectangle \$1; -#X obj 469 497 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 532 432 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 469 497 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 532 432 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 469 516 client_storage \$1; #X msg 532 451 repeat \$1; -#X text 29 453 Inlet 1: repeat 0|1 : CLAMP_TO_EDGE or REPEAT(default) -; -#X text 28 470 Inlet 1: rectangle 0|1 : use rectangle-texturing if -available (default:1); -#X text 28 498 Inlet 1: client_storage 0|1 : use client-storage if -available (default:1); +#X text 29 453 Inlet 1: repeat 0|1 : CLAMP_TO_EDGE or REPEAT(default); +#X text 28 470 Inlet 1: rectangle 0|1 : use rectangle-texturing if available (default:1); +#X text 28 498 Inlet 1: client_storage 0|1 : use client-storage if available (default:1); #X msg 493 407 env \$1; -#X obj 493 387 hradio 15 1 0 6 empty empty empty 0 -6 0 8 -262144 -1 --1 0; -#X obj 472 222 pack 0 0 1; -#X obj 452 243 color 0 0.5 0; -#X obj 498 196 t b f; -#X obj 499 177 nbx 3 14 0 1 0 0 empty empty green 0 -6 0 10 -262144 --1 -1 0 256; -#X obj 540 196 t b f; -#X obj 541 177 nbx 3 14 0 1 0 0 empty empty blue 0 -6 0 10 -262144 --1 -1 0 256; -#X obj 458 196 nbx 3 14 0 1 0 0 empty empty red 0 -6 0 10 -262144 -1 --1 0 256; -#X text 14 262 [pix_texture] tries to use the fastest way to get a -pix onto a texture. This implies using "rectangle"-texturing if available. -This \, in turn \, can lead to some problems with several geos. Try -using "rectangle 0" if you experience problems. Rectangle textures -cannot be REPEATed (they are always clamped-to-edge); -#X text 28 526 Inlet 1: env 0|1|2|3|4|5 : texture environment mode -; -#X text 53 541 0=GL_REPLACE \, 1=GL_DECAL \, 2=GL_BLEND \, 3=GL_ADD -\,; +#X obj 493 387 hradio 15 1 0 6 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0; +#X obj 474 222 pack 0 0 1; +#X obj 454 243 color 0 0.5 0; +#X obj 500 196 t b f; +#X obj 501 177 nbx 3 14 0 1 0 0 empty empty green 0 -6 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 542 196 t b f; +#X obj 543 177 nbx 3 14 0 1 0 0 empty empty blue 0 -6 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 460 196 nbx 3 14 0 1 0 0 empty empty red 0 -6 0 10 #fcfcfc #000000 #000000 0 256; +#X text 16 262 [pix_texture] tries to use the fastest way to get a pix onto a texture. This implies using "rectangle"-texturing if available. This \, in turn \, can lead to some problems with several geos. Try using "rectangle 0" if you experience problems. Rectangle textures cannot be REPEATed (they are always clamped-to-edge), f 69; +#X text 28 526 Inlet 1: env 0|1|2|3|4|5 : texture environment mode; +#X text 53 541 0=GL_REPLACE \, 1=GL_DECAL \, 2=GL_BLEND \, 3=GL_ADD \,; #X text 53 556 4=GL_COMBINE \, >4=GL_MODULATE (default); -#X text 16 176 - env message changes the texture environment mode. -Some modes allow mixing with fragment colors (BLEND \, ADD \, COMBINE -\, MODULATE) \, while REPLACE and DECAL ignore the current fragment/texture -color.; -#X text 457 149 set base fragment color; -#X text 57 700 Outlet 2: texture info : -; +#X text 16 176 - env message changes the texture environment mode. Some modes allow mixing with fragment colors (BLEND \, ADD \, COMBINE \, MODULATE) \, while REPLACE and DECAL ignore the current fragment/texture color., f 69; +#X text 459 149 set base fragment color; +#X text 57 700 Outlet 2: texture info : ; #X text 28 576 Inlet 1: message: texunit ; #X text 108 611 (useful only with shader); #X text 108 594 (change texunit of the texture); -#X floatatom 463 286 5 0 0 0 - - -; +#X floatatom 463 286 5 0 0 0 - - - 0; #X msg 463 305 texunit \$1; -#X obj 473 331 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 473 331 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X msg 473 351 yuv \$1; -#X text 28 646 Inlet 1: message: pbo : change pixel buffer object number -; -#X floatatom 537 332 5 0 0 0 - - -; +#X text 28 646 Inlet 1: message: pbo : change pixel buffer object number; +#X floatatom 537 332 5 0 0 0 - - - 0; #X msg 537 351 pbo \$1; -#X text 28 626 Inlet 1: message: yuv : use native YUV-mode if available -(default:1), f 69; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 46 0; -#X connect 18 0 22 0; -#X connect 28 0 18 0; -#X connect 29 0 28 0; -#X connect 34 0 35 0; -#X connect 35 0 18 0; -#X connect 36 0 38 0; -#X connect 37 0 39 0; -#X connect 38 0 18 0; -#X connect 39 0 18 0; -#X connect 43 0 18 0; -#X connect 44 0 43 0; -#X connect 45 0 46 1; -#X connect 46 0 18 0; -#X connect 47 0 45 0; -#X connect 47 1 45 1; -#X connect 48 0 47 0; -#X connect 49 0 45 0; -#X connect 49 1 45 2; -#X connect 50 0 49 0; -#X connect 51 0 45 0; -#X connect 62 0 63 0; -#X connect 63 0 18 0; +#X text 28 626 Inlet 1: message: yuv : use native YUV-mode if available (default:1), f 69; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply texture mapping; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool quality repeat rectangle client_storage env texunit yuv pbo; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 texture; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 618 _gemwin; +#X obj 257 781 _pix2rectangle; +#X text 43 760 For the sake of brevity \, most Gem-helppatches use a small wrapper abstraction around [pix_texture]+[rectangle]:, f 77; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 43 0; +#X connect 15 0 19 0; +#X connect 25 0 15 0; +#X connect 26 0 25 0; +#X connect 31 0 32 0; +#X connect 32 0 15 0; +#X connect 33 0 35 0; +#X connect 34 0 36 0; +#X connect 35 0 15 0; +#X connect 36 0 15 0; +#X connect 40 0 15 0; +#X connect 41 0 40 0; +#X connect 42 0 43 1; +#X connect 43 0 15 0; +#X connect 44 0 42 0; +#X connect 44 1 42 1; +#X connect 45 0 44 0; +#X connect 46 0 42 0; +#X connect 46 1 42 2; +#X connect 47 0 46 0; +#X connect 48 0 42 0; +#X connect 59 0 60 0; +#X connect 60 0 15 0; +#X connect 61 0 62 0; +#X connect 62 0 15 0; #X connect 64 0 65 0; -#X connect 65 0 18 0; -#X connect 67 0 68 0; -#X connect 68 0 18 0; +#X connect 65 0 15 0; diff --git a/help/pix_threshold-help.pd b/help/pix_threshold-help.pd index 92b4a8e48..0f8332df5 100644 --- a/help/pix_threshold-help.pd +++ b/help/pix_threshold-help.pd @@ -1,47 +1,19 @@ #N canvas 550 226 628 363 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 225 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 225 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 228 Inlets:; #X text 38 315 Outlets:; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 7 56 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 56 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 515 295 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 520 334 pd gemwin; -#X msg 520 315 create; -#X text 516 294 Create window:; -#X obj 450 158 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 515 295 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 5 49 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -60,24 +32,31 @@ #X text 63 242 Inlet 1: gemlist; #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); -#X floatatom 465 162 5 0 1 1 pass - -; +#X floatatom 465 162 5 0 1 1 pass - - 0; #X text 50 12 Synopsis: [pix_threshold]; #X text 29 56 Description: apply a threshold to pixes; -#X text 15 101 pix_threshold is a simply threshold filter. Any pixel -above the value is passed. Any pixel below the value is zeroed out. -; +#X text 15 101 pix_threshold is a simply threshold filter. Any pixel above the value is passed. Any pixel below the value is zeroed out.; #X text 15 155 If the float is used \, alpha is assumed to be 1; -#X obj 451 256 pix_threshold; +#X obj 451 226 pix_threshold; #X text 63 255 Inlet 2: : threshold for all channels; #X text 63 280 Inlet 3: : threshold (RGB) or (RGBA); -#X obj 451 283 pix_draw; -#X msg 496 205 0.6 0.1 0.8; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 28 0; -#X connect 23 0 28 1; -#X connect 28 0 31 0; -#X connect 32 0 28 2; +#X obj 451 265 _pix2rectangle 3; +#X msg 496 195 0.6 0.1 0.8; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply a threshold to pixes; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 301 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 25 0; +#X connect 20 0 25 1; +#X connect 25 0 28 0; +#X connect 29 0 25 2; diff --git a/help/pix_threshold_bernsen-help.pd b/help/pix_threshold_bernsen-help.pd index 14bd23b78..bd998f378 100644 --- a/help/pix_threshold_bernsen-help.pd +++ b/help/pix_threshold_bernsen-help.pd @@ -1,47 +1,19 @@ #N canvas 30 61 629 346 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 234 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 234 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 235 Inlets:; #X text 38 307 Outlets:; -#X obj 8 186 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 7 56 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 57 cnv 15 170 200 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 56 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 57 cnv 15 170 200 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 40 Example:; -#X obj 465 265 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 470 304 pd gemwin; -#X msg 470 285 create; -#X text 466 264 Create window:; -#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 465 265 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 138 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 64 gemhead; #X text 71 31 Class: pix object; -#X obj 510 65 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 65 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -61,31 +33,34 @@ #X text 53 249 Inlet 1: gemlist; #X text 516 85 open an image; #X text 509 98 (JPEG \, TIFF \, ..); -#X obj 451 225 pix_draw; +#X obj 451 225 _pix2rectangle 3; #X obj 451 191 pix_threshold_bernsen; #X text 50 12 Synopsis: [pix_threshold_bernsen]; -#X text 29 56 Description: apply dynamic thresholds to pixes for binarization -; -#X text 15 89 pix_threshold_bernsen is a dynamic tiled threshold filter. -Each tile's threshold is taken of the mean of the min and max value -of a surrounding (2*tile_size) square tile. If a pixels value is higher -than the threshold \, this pixel is set to 1 else to 0; -#X text 16 159 Currently this object only works on greyscale images. -; -#X floatatom 563 141 5 0 0 0 contrast - -; +#X text 29 56 Description: apply dynamic thresholds to pixes for binarization; +#X text 15 89 pix_threshold_bernsen is a dynamic tiled threshold filter. Each tile's threshold is taken of the mean of the min and max value of a surrounding (2*tile_size) square tile. If a pixels value is higher than the threshold \, this pixel is set to 1 else to 0; +#X text 16 159 Currently this object only works on greyscale images.; +#X floatatom 563 141 5 0 0 0 contrast - - 0; #X msg 522 170 4 4; #X text 53 264 Inlet 2: list : number of tiles; -#X text 52 278 Inlet 3: : contrast. if the (max-min): contrast. if the (max-min) : number of tiles in x- & y-direction; #X text 123 211 default: 16 16; #X text 482 169 tiles; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 23 0; -#X connect 23 0 22 0; -#X connect 28 0 23 2; -#X connect 29 0 23 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION apply dynamic thresholds to pixes for binarization; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 473 272 _gemwin; +#X connect 11 0 14 0; +#X connect 13 0 14 1; +#X connect 14 0 20 0; +#X connect 20 0 19 0; +#X connect 25 0 20 2; +#X connect 26 0 20 1; diff --git a/help/pix_video-help.pd b/help/pix_video-help.pd index de2453461..ad4748adf 100644 --- a/help/pix_video-help.pd +++ b/help/pix_video-help.pd @@ -1,66 +1,29 @@ -#N canvas 235 64 871 639 10; +#N canvas 235 64 871 645 10; #X declare -lib Gem; #X text 671 9 GEM object; -#X obj 8 46 cnv 15 540 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 559 47 cnv 15 280 500 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 46 cnv 15 540 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 559 47 cnv 15 280 500 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 71 21 Class: pix object (pix source); #X text 561 33 Example:; #X text 50 2 Synopsis: [pix_video]; #X text 29 47 Description: open a camera and get input; -#X obj 9 182 cnv 15 540 365 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 9 149 cnv 15 540 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 9 182 cnv 15 540 365 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 9 149 cnv 15 540 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 18 148 Arguments:; #X text 17 486 Outlet 1: gemlist; #X text 17 198 Inlet 1: gemlist; -#X text 16 308 Inlet 1: colorspace "RGBA|YUV|Grey": decodes the current -film into the specified colorspace \, if supported by the backend., f 62; +#X text 16 308 Inlet 1: colorspace "RGBA|YUV|Grey": decodes the current film into the specified colorspace \, if supported by the backend., f 62; #X text 64 159 none; #X text 33 184 Inlet:; #X text 33 472 Outlet:; -#X obj 717 460 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X msg 67 70 set destroy; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X msg 156 71 set create; -#X obj 67 41 route create; -#X connect 2 0 7 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 7 0 4 0; -#X connect 7 1 6 0; -#X connect 7 1 5 0; -#X restore 722 499 pd gemwin; -#X msg 722 477 create; -#X text 718 456 Create window:; -#X obj 563 86 cnv 15 230 280 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 567 526 rectangle 4 3; -#X obj 567 502 pix_texture; -#X text 17 216 Inlet 1: device : the number or file path to the -input device; -#X text 16 339 Inlet 1: dimen : set various dimensions -for the image (does not work on all capture devices); -#X text 15 371 Inlet 1: enumerate: list all devices to the console -; -#X text 17 245 Inlet 1: driver : switch between different drivers -\, e.g. v4l \, ieee1394 \, etc.; -#X text 16 276 Inlet 1: driver : switch between different drivers -\, e.g. v4l \, v4l2 \, dv...; -#X text 13 66 [pix_video] opens a wide array of cameras \, USB to FireWire -to capture cards \, as long as the camera is supported by your operating -system.; +#X obj 717 460 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 563 86 cnv 15 230 280 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X text 17 216 Inlet 1: device : the number or file path to the input device; +#X text 16 339 Inlet 1: dimen : set various dimensions for the image (does not work on all capture devices); +#X text 15 371 Inlet 1: enumerate: list all devices to the console; +#X text 17 245 Inlet 1: backend : switch between different backends \, e.g. v4l \, ieee1394 \, etc.; +#X text 16 276 Inlet 1: backend : switch between different backends \, e.g. v4l \, v4l2 \, dv...; +#X text 13 66 [pix_video] opens a wide array of cameras \, USB to FireWire to capture cards \, as long as the camera is supported by your operating system.; #X obj 567 58 gemhead; #X msg 596 124 dimen 64 64; #X msg 586 99 dimen 256 128; @@ -68,15 +31,12 @@ system.; #X msg 641 283 dialog; #X msg 604 153 colorspace RGBA; #X msg 609 211 device 0; -#X msg 642 312 driver dv; +#X msg 642 312 backend dv; #N canvas 516 113 572 565 properties 0; #X msg 41 203 enumProps; -#X obj 31 21 cnv 15 400 80 empty empty readProperties 20 12 0 14 -233017 --66577 0; -#X obj 39 47 hradio 15 1 0 1 \$0-propreadId \$0-propreadId empty 0 --8 0 10 -262144 -1 -1 0; -#X obj 40 70 cnv 15 260 20 empty \$0-propreadName 10 9 0 14 --203904 -66577 0; +#X obj 31 21 cnv 15 400 80 empty empty readProperties 20 12 0 14 #e0e0e0 #404040 0; +#X obj 39 47 hradio 15 1 0 1 \$0-propreadId \$0-propreadId empty 0 -8 0 10 #fcfcfc #000000 #000000 0; +#X obj 40 70 cnv 15 260 20 empty \$0-propreadName 10 9 0 14 #c4c4fc #404040 0; #N canvas 186 49 450 537 PropertyLogic 0; #N canvas 586 84 774 460 id2property 0; #X obj 353 106 r \$0-info; @@ -304,30 +264,21 @@ system.; #X connect 13 0 8 0; #X connect 16 0 17 0; #X restore 41 526 pd PropertyLogic; -#X obj 310 70 cnv 15 100 20 empty \$0-propreadValue -- 10 9 0 14 -261234 --66577 0; -#X obj 31 111 cnv 15 400 80 empty empty writeProperties 20 12 0 14 --233017 -66577 0; -#X obj 39 137 hradio 15 1 0 1 \$0-propwriteId \$0-propwriteId empty -0 -8 0 10 -262144 -1 -1 0; -#X obj 40 160 cnv 15 260 20 empty \$0-propwriteName 10 9 0 14 --203904 -66577 0; -#X obj 311 160 nbx 5 20 -1e+37 1e+37 0 0 \$0-propwriteValue \$0-propwriteValue -empty 0 -8 0 14 -204786 -1 -1 0 256; +#X obj 310 70 cnv 15 100 20 empty \$0-propreadValue -- 10 9 0 14 #fcc4c4 #404040 0; +#X obj 31 111 cnv 15 400 80 empty empty writeProperties 20 12 0 14 #e0e0e0 #404040 0; +#X obj 39 137 hradio 15 1 0 1 \$0-propwriteId \$0-propwriteId empty 0 -8 0 10 #fcfcfc #000000 #000000 0; +#X obj 40 160 cnv 15 260 20 empty \$0-propwriteName 10 9 0 14 #c4c4fc #404040 0; +#X obj 311 160 nbx 5 20 -1e+37 1e+37 0 0 \$0-propwriteValue \$0-propwriteValue empty 0 -8 0 14 #c4fcc4 #000000 #000000 0 256; #X msg 66 315 get bus_info; #X msg 83 392 set quality 5; #X obj 66 294 r \$0-propget; #X obj 83 372 r \$0-propset; #X msg 87 340 get Hue Saturation; #X text 208 340 you can query several properties at once; -#X text 146 295 query a (readable) property via a message "get " -; -#X text 161 372 set a (writable) property via a message "set -"; -#X text 70 224 this will return 2 lists of readable and writable properties -through the "info" outlet of [pix_video].; -#X text 72 257 NOTE that propertynames are always single symbols that -might contain spaces (and other weird characters); +#X text 146 295 query a (readable) property via a message "get "; +#X text 161 372 set a (writable) property via a message "set "; +#X text 70 224 this will return 2 lists of readable and writable properties through the "info" outlet of [pix_video].; +#X text 72 257 NOTE that propertynames are always single symbols that might contain spaces (and other weird characters); #X text 103 203 INIT: query names of all available properties; #X text 83 423 ATOMIC setting of multiple properties; #X msg 99 441 clearProps; @@ -354,10 +305,8 @@ might contain spaces (and other weird characters); #X obj 655 459 s \$0-info; #X obj 586 376 t a a; #N canvas 166 121 570 420 device 0; -#X obj 204 60 cnv 20 20 20 empty \$0-open-canvas 0 4 10 0 16 -233017 --1 0; -#X obj 60 61 hradio 18 1 0 8 empty empty empty 0 -6 0 8 -225271 -1 --1 0; +#X obj 204 60 cnv 20 20 20 empty \$0-open-canvas 0 4 10 0 16 #e0e0e0 #000000 0; +#X obj 60 61 hradio 18 1 0 8 empty empty empty 0 -6 0 8 #d8fcd8 #000000 #000000 0; #X obj 60 13 inlet; #X msg 160 254 label \$1; #X obj 160 232 makefilename %d; @@ -389,205 +338,49 @@ might contain spaces (and other weird characters); #X connect 15 0 8 0; #X coords 0 -1 1 1 165 20 1 60 60; #X restore 609 187 pd device; -#X obj 36 565 cnv 15 400 30 empty empty empty 20 12 0 14 -260097 -66577 -0; -#X text 48 565 NOTE: usually you cannot use a camera more than once -at the same time!; -#X obj 563 413 cnv 15 80 30 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 36 565 cnv 15 400 30 empty empty empty 20 12 0 14 #fc8000 #404040 0; +#X text 48 565 NOTE: usually you cannot use a camera more than once at the same time!; +#X obj 563 413 cnv 15 80 30 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 567 418 pix_video; #X obj 657 393 print videoctl; -#X obj 647 346 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X msg 665 345 driver \$1; +#X obj 647 346 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X msg 665 345 backend \$1; #X text 686 286 (if available); -#X text 16 388 Inlet 1: dialog: open a dialog to configure the input -device (depending on driver / Operating System); -#X text 18 501 Outlet 2: info (for enumerating devices \, querying -properties \, ...); -#X text 15 423 Inlet 1: enumProps \, get \, set \, clearProps \, setProps -\, applyProps: interact with driver/device properties; +#X text 16 388 Inlet 1: dialog: open a dialog to configure the input device (depending on backend / Operating System); +#X text 18 501 Outlet 2: info (for enumerating devices \, querying properties \, ...); +#X text 15 423 Inlet 1: enumProps \, get \, set \, clearProps \, setProps \, applyProps: interact with backend/device properties; #X obj 657 374 r \$0-ctl; -#X text 54 600 you can use [pix_buffer] to distribute the same pix -to different parts of your render-chain; +#X text 54 600 you can use [pix_buffer] to distribute the same pix to different parts of your render-chain; #X msg 625 235 device /dev/fw1; -#N canvas 697 49 586 667 backend 0; -#X obj 104 122 bng 15 250 50 0 \$0-backendinfo \$0-backendinfo <--show_info_on_drivers -17 8 0 10 -262144 -1 -1; -#N canvas 15 49 450 300 \$0-backendinfo 0; -#X restore 184 207 pd \$0-backendinfo; -#X obj 184 240 r \$0-backendinfo; -#X msg 223 331 clear; -#X obj 223 351 s pd-\$0-backendinfo; -#X obj 203 424 s \$0-ctl; -#X msg 203 405 driver; -#N canvas 4 49 685 300 fake 0; -#X obj 178 5 inlet bang; -#X msg 178 25 currentdriver v4l2 \, drivers 3 \, driver v4l2 analog -\, driver v4l analog \, driver dc1394 iidc \, driver unicap analog -\, driver vlc; -#X obj 178 67 outlet; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X restore 265 414 pd fake; -#X obj 265 434 s \$0-info; -#N canvas 14 49 450 300 content 0; -#X obj 123 124 route driver drivers currentdriver; -#N canvas 509 196 644 372 numdrivers 0; -#X obj 119 11 inlet; -#X obj 119 316 outlet; -#X obj 119 81 f; -#X obj 277 69 inlet reset; -#X msg 277 89 0; -#X obj 119 298 list prepend text 50; -#X msg 119 154 50 On this system you have \$1 drivers available; -#X obj 119 101 t f f; -#X obj 146 201 select 0; -#X obj 119 31 route bang float; -#X msg 191 223 90 Click on any of the patches below for information -about a specific driver:; -#X connect 0 0 9 0; -#X connect 2 0 7 0; -#X connect 3 0 4 0; -#X connect 4 0 2 1; -#X connect 5 0 1 0; -#X connect 6 0 5 0; -#X connect 7 0 6 0; -#X connect 7 1 8 0; -#X connect 8 1 10 0; -#X connect 9 0 2 0; -#X connect 9 1 2 1; -#X connect 10 0 5 0; -#X restore 190 179 pd numdrivers; -#N canvas 12 49 638 300 currentdriver 0; -#X obj 119 31 inlet; -#X obj 119 186 outlet; -#X obj 119 82 symbol ; -#X obj 325 33 inlet reset; -#X obj 325 53 symbol ; -#X obj 119 102 select ; -#X obj 119 164 list prepend text 50 65; -#X obj 119 51 route bang; -#X obj 202 54 symbol; -#X msg 224 124 You are currently using the '\$1' driver; -#X msg 119 144 Currently you are not using any specific driver...; -#X connect 0 0 7 0; -#X connect 2 0 5 0; -#X connect 3 0 4 0; -#X connect 4 0 2 1; -#X connect 5 0 10 0; -#X connect 5 1 9 0; -#X connect 6 0 1 0; -#X connect 7 0 2 0; -#X connect 7 1 8 0; -#X connect 8 0 2 1; -#X connect 9 0 6 0; -#X connect 10 0 6 0; -#X restore 280 179 pd currentdriver; -#N canvas 12 49 456 510 listdrivers 0; -#X obj 149 61 inlet; -#X obj 149 276 outlet; -#X obj 241 61 inlet reset; -#X obj 149 81 list split 1; -#X obj 149 101 symbol unknown; -#X obj 241 101 symbol unknown; -#X obj 149 121 t b s; -#X obj 149 141 i; -#X obj 149 161 + 20; -#X obj 149 181 t f f; -#X msg 149 221 \$1 \$2-videoplugin \$3; -#X msg 194 122 100; -#X obj 149 253 list prepend obj 60; -#X msg 291 143 0; -#X obj 291 163 makefilename $%d; -#X obj 149 201 pack 0 s s; -#X obj 241 81 t b b b; -#X connect 0 0 3 0; -#X connect 2 0 16 0; -#X connect 3 0 4 0; -#X connect 4 0 6 0; -#X connect 5 0 4 1; -#X connect 6 0 7 0; -#X connect 6 1 15 1; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 15 0; -#X connect 9 1 7 1; -#X connect 10 0 12 0; -#X connect 11 0 7 1; -#X connect 12 0 1 0; -#X connect 13 0 14 0; -#X connect 14 0 15 2; -#X connect 15 0 10 0; -#X connect 16 0 5 0; -#X connect 16 1 11 0; -#X connect 16 2 13 0; -#X restore 123 149 pd listdrivers; -#X obj 123 94 r \$0-info; -#X obj 190 211 t a; -#X obj 337 125 t b b b; -#X obj 337 59 inlet reset; -#X obj 190 251 s pd-\$0-backendinfo; -#X obj 190 231 list trim; -#X obj 140 25 inlet finalize; -#X connect 0 0 3 0; -#X connect 0 1 1 0; -#X connect 0 2 2 0; -#X connect 1 0 5 0; -#X connect 2 0 5 0; -#X connect 3 0 5 0; -#X connect 4 0 0 0; -#X connect 5 0 9 0; -#X connect 6 0 3 1; -#X connect 6 1 1 1; -#X connect 6 2 2 1; -#X connect 7 0 6 0; -#X connect 9 0 8 0; -#X connect 10 0 2 0; -#X connect 10 0 1 0; -#X restore 351 305 pd content; -#X obj 203 375 t b; -#X msg 265 388 bang; -#X obj 184 280 t b b; -#X obj 223 280 t b b; -#X obj 184 260 t b b b; -#X msg 184 311 loadbang \, vis 1; -#X connect 2 0 14 0; -#X connect 3 0 4 0; -#X connect 6 0 5 0; -#X connect 7 0 8 0; -#X connect 10 0 6 0; -#X connect 11 0 7 0; -#X connect 12 0 15 0; -#X connect 12 1 9 0; -#X connect 13 0 3 0; -#X connect 13 1 9 1; -#X connect 14 0 12 0; -#X connect 14 1 10 0; -#X connect 14 2 13 0; -#X connect 15 0 4 0; -#X coords 0 -1 1 1 170 40 1 100 100; -#X restore 156 103 pd backend specific information; -#X obj 738 8 declare -lib Gem; -#X connect 17 0 18 0; -#X connect 18 0 17 0; -#X connect 22 0 21 0; -#X connect 29 0 46 0; -#X connect 30 0 41 0; -#X connect 31 0 41 0; -#X connect 32 0 41 0; -#X connect 33 0 41 0; -#X connect 34 0 41 0; -#X connect 35 0 41 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION open a camera and get input; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist device backend colorspace dimen enumerate dialog enumProps get set clearProps setProps applyProps; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 info; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 738 8 pd META; +#X obj 156 103 _backendinfo \$0 video; +#X obj 724 466 _gemwin; +#X obj 567 502 _pix2rectangle 3; +#X connect 24 0 41 0; +#X connect 25 0 36 0; +#X connect 26 0 36 0; +#X connect 27 0 36 0; +#X connect 28 0 36 0; +#X connect 29 0 36 0; +#X connect 30 0 36 0; +#X connect 31 0 36 0; +#X connect 33 0 34 0; +#X connect 33 1 35 0; #X connect 36 0 41 0; -#X connect 38 0 39 0; -#X connect 38 1 40 0; -#X connect 41 0 46 0; -#X connect 41 1 47 0; -#X connect 42 0 35 0; -#X connect 46 0 22 0; -#X connect 46 1 38 0; -#X connect 48 0 49 0; -#X connect 49 0 41 0; -#X connect 54 0 41 0; -#X connect 56 0 41 0; +#X connect 36 1 42 0; +#X connect 37 0 30 0; +#X connect 41 0 55 0; +#X connect 41 1 33 0; +#X connect 43 0 44 0; +#X connect 44 0 36 0; +#X connect 49 0 36 0; +#X connect 51 0 36 0; diff --git a/help/pix_write-help.pd b/help/pix_write-help.pd index aab997134..c68708b0d 100644 --- a/help/pix_write-help.pd +++ b/help/pix_write-help.pd @@ -1,51 +1,21 @@ #N canvas 536 123 739 620 10; #X declare -lib Gem; -#X obj 17 419 cnv 15 430 190 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 17 419 cnv 15 430 190 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 28 422 Inlets:; #X text 28 579 Outlets:; -#X obj 17 384 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 17 384 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 26 383 Arguments:; -#X obj 17 69 cnv 15 430 310 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 17 69 cnv 15 430 310 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 46 592 Outlet 1: gemlist; #X text 52 436 Inlet 1: gemlist; -#X text 27 72 Description: Make a snapshot of the frame-buffer and -write it to a file; -#X text 52 522 Inlet 2: list: offsetX offsetY (in pixels \; default: -0 0); -#X text 52 548 Inlet 3: list: dimenX dimenY (in pixels \; default: -window-size); +#X text 27 72 Description: Make a snapshot of the frame-buffer and write it to a file; +#X text 52 522 Inlet 2: list: offsetX offsetY (in pixels \; default: 0 0); +#X text 52 548 Inlet 3: list: dimenX dimenY (in pixels \; default: window-size); #X text 536 6 GEM object; -#X obj 459 77 cnv 15 250 370 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 459 77 cnv 15 250 370 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 463 60 Example:; -#X obj 604 383 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 16 419 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 268 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 609 422 pd gemwin; -#X msg 609 403 create; -#X text 605 382 Create window:; -#X obj 460 106 cnv 15 240 230 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 604 383 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 460 106 cnv 15 240 230 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 584 289 256 256; #X text 638 289 dimension; #X text 637 267 offset; @@ -57,10 +27,8 @@ window-size); #X text 580 151 quality : 99; #X text 580 115 set pix_write to:; #X msg 490 215 auto \$1; -#X obj 490 196 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 491 245 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 490 196 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 491 245 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X text 510 244 WRITE! one file; #X obj 464 399 gemhead; #X obj 464 424 square; @@ -68,46 +36,37 @@ window-size); #X obj 466 560 pix_snap; #X text 464 539 See also:; #X obj 466 584 pix_writer; -#X text 26 260 BE CAREFUL with the filename \, depending on your OS -\, relative names may be different. It start from the patch in Linux -or from HD (/) in osx for example. DO NOT USE SPACES in the basefilename -; +#X text 26 260 BE CAREFUL with the filename \, depending on your OS \, relative names may be different. It start from the patch in Linux or from HD (/) in osx for example. DO NOT USE SPACES in the basefilename; #X text 81 41 Class: pix object; -#X text 27 207 With the "file" message you can specify a base-filename -and the type of image-files you want to create. The actual name of -the file will be something like: "." (like -"GEM00001.tif"); +#X text 27 207 With the "file" message you can specify a base-filename and the type of image-files you want to create. The actual name of the file will be something like: "." (like "GEM00001.tif"); #X text 60 22 Synopsis: [pix_write]; -#X text 26 319 Supported file-types are TIFF (quality=0) and JPEG (quality>0). -TIFF-writing can be slow due to the large file size of uncompressed -images! JPEG might be faster (but quality will be lower due to compression) -; +#X text 26 319 Supported file-types are TIFF (quality=0) and JPEG (quality>0). TIFF-writing can be slow due to the large file size of uncompressed images! JPEG might be faster (but quality will be lower due to compression); #X text 543 209 activate/deactivate auto snapshot, f 24; -#X text 52 473 Inlet 1: file : set type/quality (quality=0:TIFF -\, quality>0:JPG); -#X text 52 498 Inlet 1: file : set basefilename -and type/quality; -#X text 52 449 Inlet 1: file : set basefilename \, and -type=TIFF; +#X text 52 473 Inlet 1: file : set type/quality (quality=0:TIFF \, quality>0:JPG); +#X text 52 498 Inlet 1: file : set basefilename and type/quality; +#X text 52 449 Inlet 1: file : set basefilename \, and type=TIFF; #X obj 461 312 pix_write 0 0 500 500 3; #X text 71 394 list: [offsetX offsetY [dimX dimY [color_format]]]; -#X text 26 99 When banged [pix_write] will take a snapshot of the current -frame buffer and saves it to a file. When a "bang" message is sent -to [pix_write] \, that is the moment that something is captured from -the current frame buffer. When grabbing \, be sure that something is -in the rendering-buffer \, else you will get a black texture. color_mode -let you grab 1 (only red channel) \, 3 (RGB) or 4 (RGBA) byte per pixel. -RGBA mode is useful with framebuffer.; +#X text 26 99 When banged [pix_write] will take a snapshot of the current frame buffer and saves it to a file. When a "bang" message is sent to [pix_write] \, that is the moment that something is captured from the current frame buffer. When grabbing \, be sure that something is in the rendering-buffer \, else you will get a black texture. color_mode let you grab 1 (only red channel) \, 3 (RGB) or 4 (RGBA) byte per pixel. RGBA mode is useful with framebuffer.; #X msg 480 162 color_format 4; -#X obj 608 8 declare -lib Gem; -#X connect 15 0 16 0; -#X connect 16 0 15 0; -#X connect 19 0 48 2; -#X connect 22 0 48 1; -#X connect 23 0 48 0; -#X connect 24 0 48 0; -#X connect 29 0 48 0; -#X connect 30 0 29 0; -#X connect 31 0 48 0; -#X connect 33 0 34 0; -#X connect 51 0 48 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Make a snapshot of the frame-buffer and write it to a file; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist file; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 608 8 pd META; +#X obj 609 389 _gemwin; +#X connect 16 0 45 2; +#X connect 19 0 45 1; +#X connect 20 0 45 0; +#X connect 21 0 45 0; +#X connect 26 0 45 0; +#X connect 27 0 26 0; +#X connect 28 0 45 0; +#X connect 30 0 31 0; +#X connect 48 0 45 0; diff --git a/help/pix_writer-help.pd b/help/pix_writer-help.pd index 43515b2a9..5a46e0bf4 100644 --- a/help/pix_writer-help.pd +++ b/help/pix_writer-help.pd @@ -1,49 +1,20 @@ #N canvas 200 61 755 513 10; #X declare -lib Gem; -#X obj 17 340 cnv 15 430 150 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 17 340 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 28 342 Inlets:; #X text 28 451 Outlets:; -#X obj 17 304 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 17 304 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 26 303 Arguments:; -#X obj 17 69 cnv 15 430 230 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 17 69 cnv 15 430 230 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 46 464 Outlet 1: gemlist; #X text 52 356 Inlet 1: gemlist; -#X text 52 369 Inlet 1: file : set basefilename \, and -type = TIFF; -#X text 52 418 Inlet 1: file : set basefilename -and type; +#X text 52 369 Inlet 1: file : set basefilename \, and type = TIFF; +#X text 52 418 Inlet 1: file : set basefilename and type; #X text 536 17 GEM object; -#X obj 459 77 cnv 15 280 300 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 459 77 cnv 15 280 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 463 60 Example:; -#X obj 604 313 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 16 419 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 268 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 609 352 pd gemwin; -#X msg 609 333 create; -#X text 605 312 Create window:; -#X obj 460 132 cnv 15 270 170 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 604 313 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 460 132 cnv 15 270 170 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 461 84 gemhead 51; #X msg 469 139 file pix_test 99; #X text 582 161 type : jpg; @@ -51,46 +22,40 @@ and type; #X text 582 174 quality : 99; #X text 582 138 set pix_write to:; #X msg 470 191 auto \$1; -#X obj 470 172 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 471 215 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; +#X obj 470 172 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 471 215 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X text 490 214 WRITE! one file; -#X text 52 393 Inlet 1: file : set type (type=0 : TIFF \, type>0 -: JPG \, type = quality); +#X text 52 393 Inlet 1: file : set type (type=0 : TIFF \, type>0 : JPG \, type = quality); #X obj 466 450 pix_snap; #X text 464 429 See also:; -#X text 25 169 BE CAREFUL with the filename \, depending on your OS -\, relative names may be different. It start from the patch in Linux -or from HD (/) in osx for example. DO NOT USE SPACES in the basefilename -; +#X text 25 169 BE CAREFUL with the filename \, depending on your OS \, relative names may be different. It start from the patch in Linux or from HD (/) in osx for example. DO NOT USE SPACES in the basefilename; #X text 81 41 Class: pix object; -#X text 26 116 With the "file" message you can specify a base-filename -and the type of image-files you want to create. The actual name of -the file will be something like: "." (like -"GEM00001.tif"); +#X text 26 116 With the "file" message you can specify a base-filename and the type of image-files you want to create. The actual name of the file will be something like: "." (like "GEM00001.tif"); #X obj 466 474 pix_write; #X obj 461 272 pix_writer; #X text 27 72 Description: write the current texture to a file; #X text 72 314 none; -#X obj 461 106 pix_video; -#X text 26 99 When banged [pix_writer] save current pix to a file. -; +#X text 26 99 When banged [pix_writer] save current pix to a file.; #X text 60 22 Synopsis: [pix_writer]; #X msg 500 245 file /Users/username/pix_test 99; -#X text 26 239 Supported file-types are TIFF (quality=0) and JPEG (quality>0). -TIFF-writing can be slow due to the large file size of uncompressed -images! JPEG might be faster (but quality will be lower due to compression) -; +#X text 26 239 Supported file-types are TIFF (quality=0) and JPEG (quality>0). TIFF-writing can be slow due to the large file size of uncompressed images! JPEG might be faster (but quality will be lower due to compression); #X text 523 190 activate/deactivate auto snapshot; -#X obj 608 18 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION write the current texture to a file; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist file; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 608 18 pd META; #X text 571 263 OSX format; -#X connect 14 0 15 0; -#X connect 15 0 14 0; -#X connect 18 0 38 0; -#X connect 19 0 35 0; -#X connect 24 0 35 0; -#X connect 25 0 24 0; -#X connect 26 0 35 0; -#X connect 38 0 35 0; -#X connect 41 0 35 0; +#X obj 610 320 _gemwin; +#X obj 461 106 pix_test; +#X connect 15 0 43 0; +#X connect 16 0 32 0; +#X connect 21 0 32 0; +#X connect 22 0 21 0; +#X connect 23 0 32 0; +#X connect 37 0 32 0; +#X connect 43 0 32 0; diff --git a/help/pix_yuv-help.pd b/help/pix_yuv-help.pd index 7789b8d47..83adb2be5 100644 --- a/help/pix_yuv-help.pd +++ b/help/pix_yuv-help.pd @@ -1,90 +1,44 @@ #N canvas 6 61 635 372 10; #X declare -lib Gem; #X text 442 8 GEM object; -#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 245 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 248 Inlets:; #X text 38 295 Outlets:; -#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 206 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 205 Arguments:; -#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 125 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 71 31 Class: pix object; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; -#N canvas 0 0 587 366 image 0; -#X obj 77 48 inlet; -#X obj 77 344 outlet; -#X obj 77 205 pix_image examples/data/fractal.JPG; -#X obj 223 55 inlet; -#X msg 223 123 open \$1; -#X obj 223 100 openpanel; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 2 0; -#X connect 5 0 4 0; -#X restore 451 113 pd image; #X text 63 216 ; #X text 56 308 Outlet 1: gemlist; #X text 63 262 Inlet 1: gemlist; -#X text 516 105 open an image; -#X text 509 118 (JPEG \, TIFF \, ..); -#X obj 468 166 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; +#X obj 468 166 tgl 15 1 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 1 1; #X text 63 275 Inlet 1: 1|0: turn conversion on/off (default:1); #X text 62 339 see also:; #X obj 248 338 pix_grey; #X obj 451 196 pix_yuv; -#X text 13 118 While the RGBA-format offers you the possibility to -add alpha-blending on a per-pixel-basis \, the YUV-format needs far -less memory and can be processed faster. You can use [pix_yuv] to convert -images of any format into YUV-space. If your image already is in YUV-space -\, this will do nothing.; -#X text 15 77 Description: convert the colorspace of an image to YUV -; +#X text 13 118 While the RGBA-format offers you the possibility to add alpha-blending on a per-pixel-basis \, the YUV-format needs far less memory and can be processed faster. You can use [pix_yuv] to convert images of any format into YUV-space. If your image already is in YUV-space \, this will do nothing.; +#X text 15 77 Description: convert the colorspace of an image to YUV; #X text 50 12 Synopsis: [pix_yuv]; #X obj 155 338 pix_rgba; -#X text 15 101 Images can be stored in various formats/color-spaces. -; -#X obj 451 233 pix_texture; -#X obj 451 256 square; -#X obj 514 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 17 0; -#X connect 16 0 17 1; -#X connect 17 0 27 0; -#X connect 23 0 27 0; -#X connect 27 0 33 0; -#X connect 33 0 34 0; +#X text 15 101 Images can be stored in various formats/color-spaces.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION convert the colorspace of an image to YUV; +#X text 10 65 KEYWORDS Gem pix image; +#X text 20 85 INLET_0 gemlist bool; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 514 8 pd META; +#X obj 451 233 _pix2rectangle 3; +#X obj 451 113 pix_test; +#X obj 521 261 _gemwin; +#X connect 11 0 28 0; +#X connect 16 0 20 0; +#X connect 20 0 27 0; +#X connect 28 0 20 0; diff --git a/help/polygon-help.pd b/help/polygon-help.pd index 4dcf2b485..66538dbf9 100644 --- a/help/polygon-help.pd +++ b/help/polygon-help.pd @@ -1,47 +1,18 @@ #N canvas 27 382 680 461 10; #X declare -lib Gem; #X text 475 39 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 180 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 492 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 358 Outlets:; #X text 21 371 Outlet 1: gemlist; -#X obj 469 58 cnv 15 200 270 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 528 354 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 533 393 pd gemwin; -#X msg 533 374 create; -#X text 529 353 Create window:; -#X obj 474 85 cnv 15 190 200 empty empty empty 20 12 0 14 -85973 -66577 -0; -#X obj 521 292 cnv 15 100 30 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 469 58 cnv 15 200 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 474 85 cnv 15 190 200 empty empty empty 20 12 0 14 #50fc50 #404040 0; +#X obj 521 292 cnv 15 100 30 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 479 136 draw line; #X msg 479 91 draw fill; #X msg 479 113 draw point; @@ -49,10 +20,9 @@ #X msg 605 194 0 \$1 0; #X msg 585 92 1 1 0; #X msg 593 112 1 -1 0; -#X floatatom 605 177 5 0 0 0 - - -; +#X floatatom 605 177 5 0 0 0 - - - 0; #X msg 603 152 -2 1 0; -#X text 21 138 Each (additional) inlet will accept an X Y Z point which -is where the control point will be.; +#X text 21 138 Each (additional) inlet will accept an X Y Z point which is where the control point will be.; #X text 26 309 Inlet 2: list: 3(XYZ) float values; #X text 26 330 Inlet N: list: 3(XYZ) float values; #X text 51 317 ...; @@ -65,35 +35,41 @@ is where the control point will be.; #X msg 478 221 draw trifan; #X msg 478 242 draw quad; #X msg 478 264 draw quadstrip; -#X text 27 247 Inlet 1: message: draw [line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip] -; +#X text 27 247 Inlet 1: message: draw [line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip]; #X text 54 30 Class: geometric object; #X text 33 14 Synopsis: [polygon]; #X text 7 69 Description: Renders a polygon.; -#X text 22 88 [polygon] creates a polygon graphics. The initial argument -is the number of points in the polygon. The maximum number of points -is unlimited.; +#X text 22 88 [polygon] creates a polygon graphics. The initial argument is the number of points in the polygon. The maximum number of points is unlimited.; #X obj 537 299 polygon 5; #X msg 603 246 width \$1; -#X floatatom 619 226 5 0 10 0 - - -; -#X obj 568 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 44 0; -#X connect 18 0 44 0; -#X connect 19 0 44 0; -#X connect 20 0 44 0; -#X connect 21 0 44 5; -#X connect 22 0 44 1; -#X connect 23 0 44 2; -#X connect 24 0 21 0; -#X connect 25 0 44 4; -#X connect 31 0 44 3; -#X connect 33 0 44 0; -#X connect 34 0 44 0; -#X connect 35 0 44 0; -#X connect 36 0 44 0; -#X connect 37 0 44 0; -#X connect 38 0 44 0; -#X connect 45 0 44 0; -#X connect 46 0 45 0; +#X floatatom 619 226 5 0 10 0 - - - 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a polygon.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw width; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_N list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 568 8 pd META; +#X obj 514 340 _gemwin; +#X connect 13 0 40 0; +#X connect 14 0 40 0; +#X connect 15 0 40 0; +#X connect 16 0 40 0; +#X connect 17 0 40 5; +#X connect 18 0 40 1; +#X connect 19 0 40 2; +#X connect 20 0 17 0; +#X connect 21 0 40 4; +#X connect 27 0 40 3; +#X connect 29 0 40 0; +#X connect 30 0 40 0; +#X connect 31 0 40 0; +#X connect 32 0 40 0; +#X connect 33 0 40 0; +#X connect 34 0 40 0; +#X connect 41 0 40 0; +#X connect 42 0 41 0; diff --git a/help/polygon_smooth-help.pd b/help/polygon_smooth-help.pd index 896fbb8f8..0595a8bde 100644 --- a/help/polygon_smooth-help.pd +++ b/help/polygon_smooth-help.pd @@ -1,72 +1,47 @@ #N canvas 288 248 639 408 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 228 Inlets:; #X text 63 241 Inlet 1: gemlist; #X text 39 292 Outlets:; #X text 57 305 Outlet 1: gemlist; -#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; -#X obj 8 76 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 261 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 50 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 300 pd gemwin; -#X msg 519 281 create; -#X text 515 260 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 146 cnv 15 160 80 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 146 cnv 15 160 80 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X floatatom 477 186 2 0 0 0 - - -; +#X floatatom 477 186 2 0 0 0 - - - 0; #X obj 451 207 polygon_smooth; #X text 50 12 Synopsis: [polygon_smooth]; #X text 29 77 Description: turn on/off polygon smoothing; -#X text 22 91 [polygon_smooth] turns on/off smoothing for polygons -\, aka antialiasing . You can either turn smoothing on (1) \, off (1) -or leave it unchanged (-1).; -#X text 23 138 Note that this might be very CPU-consumptive \, if you -don't have hw-acceleration.; +#X text 22 91 [polygon_smooth] turns on/off smoothing for polygons \, aka antialiasing . You can either turn smoothing on (1) \, off (1) or leave it unchanged (-1).; +#X text 23 138 Note that this might be very CPU-consumptive \, if you don't have hw-acceleration.; #X text 63 196 ; #X text 63 255 Inlet 1: float: turn polygon-smoothing on/off/nop.; -#X obj 477 150 hradio 15 1 1 3 empty empty empty 0 -6 0 8 -262144 -1 --1 2; +#X obj 477 150 hradio 15 1 1 3 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 2; #X obj 477 167 - 1; #X text 20 343 See also:; #X text 48 362 FSAA antialiasing message to; #X obj 224 362 gemwin; #X obj 451 111 alpha 1; -#X obj 451 240 circle 1 30; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 31 0; -#X connect 18 0 19 0; -#X connect 19 0 32 0; -#X connect 26 0 27 0; -#X connect 27 0 18 0; -#X connect 31 0 19 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION turn on/off polygon smoothing; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist float; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 451 240 circle 1; +#X obj 524 271 _gemwin; +#X connect 13 0 27 0; +#X connect 14 0 15 0; +#X connect 15 0 29 0; +#X connect 22 0 23 0; +#X connect 23 0 14 0; +#X connect 27 0 15 0; diff --git a/help/pqtorusknots-help.pd b/help/pqtorusknots-help.pd index dbe44f585..353a71733 100644 --- a/help/pqtorusknots-help.pd +++ b/help/pqtorusknots-help.pd @@ -1,97 +1,72 @@ #N canvas 100 61 710 412 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 469 47 cnv 15 235 290 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 474 274 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 479 313 pd gemwin; -#X msg 479 294 create; -#X text 475 273 Create window:; +#X obj 469 47 cnv 15 235 290 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 475 29 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 213 cnv 15 450 180 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 213 cnv 15 450 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 217 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 521 8 GEM object; #X text 29 229 Inlet 1: gemlist; #X text 11 356 Outlets:; #X text 23 369 Outlet 1: gemlist; -#X obj 472 75 cnv 15 230 195 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 472 75 cnv 15 230 195 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 475 88 draw line; #X msg 475 111 draw fill; #X obj 543 54 gemhead; -#X floatatom 553 89 5 -5 5 2 size - -; +#X floatatom 553 89 5 -5 5 2 size - - 0; #X text 29 243 Inlet 1: message: draw [line|fill|points]; #X msg 476 132 draw point; #X text 7 69 Description: Renders a 3d knot; #X text 34 14 Synopsis: [pqtorusknots]; #X msg 592 88 scale \$1; -#X floatatom 553 110 5 10 256 2 - - -; +#X floatatom 553 110 5 10 256 2 - - - 0; #X msg 593 109 steps \$1; -#X floatatom 553 130 5 0 20 2 - - -; -#X floatatom 553 150 5 0.2 1 2 - - -; +#X floatatom 553 130 5 0 20 2 - - - 0; +#X floatatom 553 150 5 0.2 1 2 - - - 0; #X msg 593 129 facets \$1; #X msg 593 149 thick \$1; #X msg 593 171 clump \$1 0.5 1; -#X floatatom 553 173 2 9 20 0 - - -; +#X floatatom 553 173 2 9 20 0 - - - 0; #X msg 593 225 uvScale 1 1; -#X floatatom 548 199 5 0 0 0 - - -; +#X floatatom 548 199 5 0 0 0 - - - 0; #X msg 593 197 pq \$1 3; -#X text 15 88 The [pqtorusknot] object renders a 3dimensional knot -at the current position with current color.; +#X text 15 88 The [pqtorusknot] object renders a 3dimensional knot at the current position with current color.; #X obj 544 249 pqtorusknots; #X text 63 186 ; -#X text 15 119 You can set various parameters \, like number of facets -\, number of clumps \, winding \, ...; +#X text 15 119 You can set various parameters \, like number of facets \, number of clumps \, winding \, ...; #X text 29 257 Inlet 1: message: steps ; #X text 29 272 Inlet 1: message: facets ; #X text 29 287 Inlet 1: message: thick ; -#X text 29 302 Inlet 1: message: clump <#clumps> -; +#X text 29 302 Inlet 1: message: clump <#clumps> ; #X text 29 317 Inlet 1: message: pq ; -#X text 29 332 Inlet 1: message: ivScale : for texturing -; -#X obj 588 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 17 0 38 0; -#X connect 18 0 38 0; -#X connect 19 0 38 0; -#X connect 20 0 25 0; -#X connect 22 0 38 0; -#X connect 25 0 38 0; -#X connect 26 0 27 0; -#X connect 27 0 38 0; -#X connect 28 0 30 0; -#X connect 29 0 31 0; -#X connect 30 0 38 0; -#X connect 31 0 38 0; -#X connect 32 0 38 0; -#X connect 33 0 32 0; -#X connect 34 0 38 0; -#X connect 35 0 36 0; -#X connect 36 0 38 0; +#X text 29 332 Inlet 1: message: ivScale : for texturing; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a 3d knot; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw steps facets thick clump pq ivScale; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 475 277 _gemwin; +#X connect 13 0 34 0; +#X connect 14 0 34 0; +#X connect 15 0 34 0; +#X connect 16 0 21 0; +#X connect 18 0 34 0; +#X connect 21 0 34 0; +#X connect 22 0 23 0; +#X connect 23 0 34 0; +#X connect 24 0 26 0; +#X connect 25 0 27 0; +#X connect 26 0 34 0; +#X connect 27 0 34 0; +#X connect 28 0 34 0; +#X connect 29 0 28 0; +#X connect 30 0 34 0; +#X connect 31 0 32 0; +#X connect 32 0 34 0; diff --git a/help/primTri-help.pd b/help/primTri-help.pd index d237c8784..4a413df10 100644 --- a/help/primTri-help.pd +++ b/help/primTri-help.pd @@ -1,38 +1,11 @@ #N canvas 130 61 696 468 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 107 cnv 15 200 250 empty empty empty 20 12 0 14 -228992 --66577 0; -#X obj 494 294 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 499 333 pd gemwin; -#X msg 499 314 create; -#X text 495 293 Create window:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 196 cnv 15 450 220 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 479 107 cnv 15 200 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 196 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 201 Inlets:; -#X obj 8 156 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 27 227 Inlet 1: message: draw [line|fill|point]; #X text 512 8 GEM object; @@ -40,10 +13,8 @@ #X text 9 380 Outlets:; #X text 21 393 Outlet 1: gemlist; #X text 485 89 Example:; -#X obj 482 137 cnv 15 190 110 empty empty empty 20 12 0 14 -81876 -66577 -0; -#X obj 534 252 cnv 15 100 30 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 482 137 cnv 15 190 110 empty empty empty 20 12 0 14 #4cfc4c #404040 0; +#X obj 534 252 cnv 15 100 30 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 485 145 draw line; #X msg 485 166 draw fill; #X msg 485 188 draw point; @@ -61,34 +32,39 @@ #X text 635 218 (XYZ)2; #X text 645 238 (XYZ)3; #X text 32 14 Synopsis: [primTri]; -#X text 7 69 Description: Renders a triangle with gradient colors. -; -#X text 16 86 The [primTri] object renders a triangle. The corner-points -can be specified with respect to position and color.; +#X text 7 69 Description: Renders a triangle with gradient colors.; +#X text 16 86 The [primTri] object renders a triangle. The corner-points can be specified with respect to position and color.; #X text 63 166 (none); -#X text 27 248 Inlet 2: list: 3(XYZ) float values (position of 1st -corner); -#X text 27 265 Inlet 3: list: 3(XYZ) float values (position of 2nd -corner); -#X text 27 282 Inlet 4: list: 3(XYZ) float values (position of 3rd -corner); -#X text 27 298 Inlet 5: list: 3(RGB) or 4(RGBA) float values (color -of 1st corner); -#X text 27 325 Inlet 6: list: 3(RGB) or 4(RGBA) float values (color -of 2nd corner); -#X text 27 352 Inlet 7: list: 3(RGB) or 4(RGBA) float values (color -of 3rd corner); -#X obj 543 259 primTri; -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 19 0 45 0; -#X connect 20 0 45 0; -#X connect 21 0 45 0; -#X connect 22 0 45 0; -#X connect 23 0 45 3; -#X connect 24 0 45 2; -#X connect 25 0 45 1; -#X connect 29 0 45 6; -#X connect 30 0 45 5; -#X connect 31 0 45 4; +#X text 27 248 Inlet 2: list: 3(XYZ) float values (position of 1st corner); +#X text 27 265 Inlet 3: list: 3(XYZ) float values (position of 2nd corner); +#X text 27 282 Inlet 4: list: 3(XYZ) float values (position of 3rd corner); +#X text 27 298 Inlet 5: list: 3(RGB) or 4(RGBA) float values (color of 1st corner); +#X text 27 325 Inlet 6: list: 3(RGB) or 4(RGBA) float values (color of 2nd corner); +#X text 27 352 Inlet 7: list: 3(RGB) or 4(RGBA) float values (color of 3rd corner); +#X obj 543 259 primTri, f 10; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a triangle with gradient colors.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 INLET_3 list; +#X text 20 165 INLET_4 list; +#X text 20 185 INLET_5 list; +#X text 20 205 INLET_6 list; +#X text 20 225 OUTLET_0 gemlist; +#X text 10 245 AUTHOR IOhannes m zmölnig; +#X text 10 265 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 491 296 _gemwin; +#X connect 15 0 41 0; +#X connect 16 0 41 0; +#X connect 17 0 41 0; +#X connect 18 0 41 0; +#X connect 19 0 41 3; +#X connect 20 0 41 2; +#X connect 21 0 41 1; +#X connect 25 0 41 6; +#X connect 26 0 41 5; +#X connect 27 0 41 4; diff --git a/help/rectangle-help.pd b/help/rectangle-help.pd index 957b3a34d..00d3031c7 100644 --- a/help/rectangle-help.pd +++ b/help/rectangle-help.pd @@ -1,72 +1,48 @@ -#N canvas 35 433 710 345 10; +#N canvas 35 433 710 405 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 499 67 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 564 244 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 569 283 pd gemwin; -#X msg 569 264 create; -#X text 565 243 Create window:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 110 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X text 17 175 Arguments:; -#X text 27 247 Inlet 1: message: draw [line|fill|point]; +#X obj 499 67 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 236 cnv 15 450 110 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X text 9 241 Inlets:; +#X obj 8 196 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 17 195 Arguments:; +#X text 27 267 Inlet 1: message: draw [line|fill|point]; #X text 522 8 GEM object; -#X text 27 233 Inlet 1: gemlist; -#X text 9 290 Outlets:; -#X text 21 303 Outlet 1: gemlist; +#X text 27 253 Inlet 1: gemlist; +#X text 9 310 Outlets:; +#X text 21 323 Outlet 1: gemlist; #X text 505 49 Example:; -#X obj 502 98 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 502 98 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 505 105 draw line; #X msg 505 126 draw fill; #X msg 505 148 draw point; #X obj 548 74 gemhead; -#X floatatom 591 118 5 0 0 2 width - -; -#X floatatom 609 149 5 0 0 2 height - -; -#X text 63 186 width & height of the rectangle; +#X floatatom 591 118 5 0 0 2 width - - 0; +#X floatatom 609 149 5 0 0 2 height - - 0; +#X text 63 206 width & height of the rectangle; #X text 33 14 Synopsis: [rectangle]; #X text 7 69 Description: Renders a rectangle; #X obj 548 179 rectangle 3 1; -#X text 27 261 Inlet 2: float: width (default to 1); -#X text 27 274 Inlet 3: float: height (default to 1); -#X text 16 86 The [rectangle] object renders a rectangle at the current -position with current color. The width and height of the rectangle -can be set by the arguments and changed via the second and third inlet. -; -#X text 19 133 note for the nitpickers: the rectangle will span from -(-width|-height) to (+width|+height) so the actual size is really double -the specified size.; -#X obj 588 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 27 0; -#X connect 19 0 27 0; -#X connect 20 0 27 0; -#X connect 21 0 27 0; -#X connect 22 0 27 1; -#X connect 23 0 27 2; +#X text 27 281 Inlet 2: float: width (default to 1); +#X text 27 294 Inlet 3: float: height (default to 1); +#X text 16 86 The [rectangle] object renders a rectangle at the current position with current color. The width and height of the rectangle can be set by the arguments and changed via the second and third inlet., f 72; +#X text 19 133 note for the nitpickers: the rectangle will span from (-width|-height) to (+width|+height) so the actual size is really double the specified size., f 71; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a rectangle; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 562 262 _gemwin; +#X connect 14 0 23 0; +#X connect 15 0 23 0; +#X connect 16 0 23 0; +#X connect 17 0 23 0; +#X connect 18 0 23 1; +#X connect 19 0 23 2; diff --git a/help/render_trigger-help.pd b/help/render_trigger-help.pd index f9c6586a4..319d27d84 100644 --- a/help/render_trigger-help.pd +++ b/help/render_trigger-help.pd @@ -1,18 +1,10 @@ #N canvas 450 81 684 364 10; #X declare -lib Gem; -#X obj 499 97 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 509 283 cnv 15 140 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X msg 524 303 create; -#X text 520 282 Create window:; -#X obj 7 65 cnv 15 450 140 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 256 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 499 97 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 7 65 cnv 15 450 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 256 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 261 Inlets:; -#X obj 8 216 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 216 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 215 Arguments:; #X text 482 8 GEM object; #X text 27 273 Inlet 1: gemlist; @@ -20,58 +12,37 @@ #X text 21 303 Outlet 1: gemlist; #X text 505 79 Example:; #X text 33 14 Synopsis: [render_trigger]; -#X obj 502 128 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 502 128 cnv 15 160 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 510 102 gemhead; #X obj 510 137 render_trigger; #X obj 510 183 t b a b; #X obj 532 258 square; #X text 54 30 Class: control object; #X text 7 69 Description: triggers on rendering; -#X text 29 85 render_trigger allows you to know when the actual rendering -is occurring in a gemlist. If you think of the gemlist as a list of -actions which occur \, the pre-bang outlet sends a bang out before -any of the actions below the render_trigger in the gemlist. The post-bang -sends out a bang after all of the actions have occurred.; +#X text 29 85 render_trigger allows you to know when the actual rendering is occurring in a gemlist. If you think of the gemlist as a list of actions which occur \, the pre-bang outlet sends a bang out before any of the actions below the render_trigger in the gemlist. The post-bang sends out a bang after all of the actions have occurred.; #X text 72 225 (none); #X text 21 316 Outlet 2: bang : pre-render; #X text 21 330 Outlet 2: bang : post-render; -#X text 9 172 !THIS IS OBOLETE AS YOU CAN NOW USE THE [trigger] OBJECT -FOR THE SAME PURPOSE!; -#X obj 602 158 bng 15 250 50 0 empty empty post 20 8 0 8 -262144 -1 --1; -#X obj 556 158 bng 15 250 50 0 empty empty pre 20 8 0 8 -262144 -1 --1; -#X obj 510 227 bng 15 250 50 0 empty empty post 20 8 0 8 -262144 -1 --1; -#X obj 554 208 bng 15 250 50 0 empty empty pre 20 8 0 8 -262144 -1 --1; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 93 create \, 1 \, frame 2; -#X msg 198 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 524 323 pd gemwin (2fps); -#X obj 558 8 declare -lib Gem; -#X connect 2 0 31 0; -#X connect 16 0 17 0; -#X connect 17 0 18 0; -#X connect 17 1 28 0; -#X connect 17 2 27 0; -#X connect 18 0 29 0; -#X connect 18 1 19 0; -#X connect 18 2 30 0; -#X connect 31 0 2 0; +#X text 9 172 !THIS IS OBOLETE AS YOU CAN NOW USE THE [trigger] OBJECT FOR THE SAME PURPOSE!; +#X obj 602 158 bng 15 250 50 0 empty empty post 20 8 0 8 #fcfcfc #000000 #000000; +#X obj 556 158 bng 15 250 50 0 empty empty pre 20 8 0 8 #fcfcfc #000000 #000000; +#X obj 510 227 bng 15 250 50 0 empty empty post 20 8 0 8 #fcfcfc #000000 #000000; +#X obj 554 208 bng 15 250 50 0 empty empty pre 20 8 0 8 #fcfcfc #000000 #000000; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION triggers on rendering; +#X text 10 65 KEYWORDS Gem control; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 20 125 OUTLET_1 bang; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 558 8 pd META; +#X obj 519 294 _gemwin 2; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 14 1 25 0; +#X connect 14 2 24 0; +#X connect 15 0 26 0; +#X connect 15 1 16 0; +#X connect 15 2 27 0; diff --git a/help/ripple-help.pd b/help/ripple-help.pd index 7128efb2b..e9228d24c 100644 --- a/help/ripple-help.pd +++ b/help/ripple-help.pd @@ -1,56 +1,27 @@ #N canvas 45 61 661 402 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 77 cnv 15 170 300 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 544 314 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 549 353 pd gemwin; -#X msg 549 334 create; -#X text 545 313 Create window:; +#X obj 479 77 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 59 Example:; -#X obj 7 52 cnv 15 450 132 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 244 cnv 15 450 145 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 52 cnv 15 450 132 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 244 cnv 15 450 145 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 249 Inlets:; -#X obj 8 189 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 189 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 189 Arguments:; #X text 27 275 Inlet 1: message: draw [line|fill|point]; #X text 472 8 GEM object; #X text 27 261 Inlet 1: gemlist; #X text 9 358 Outlets:; #X text 20 371 Outlet 1: gemlist; -#X obj 484 171 cnv 15 160 140 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 484 171 cnv 15 160 140 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 488 84 gemhead; -#X floatatom 566 89 5 0 0 0 - - -; +#X floatatom 566 89 5 0 0 0 - - - 0; #X msg 494 174 draw line; #X msg 494 194 draw fill; #X msg 494 214 draw point; #X obj 488 109 rotateXYZ 135 0 0; -#X obj 574 186 bng 25 250 50 0 empty empty grab 0 -6 0 8 -262144 -1 --1; -#X floatatom 572 222 5 0 0 1 amount - -; +#X obj 574 186 bng 25 250 50 0 empty empty grab 0 -6 0 8 #fcfcfc #000000 #000000; +#X floatatom 572 222 5 0 0 1 amount - - 0; #X text 7 56 Description: Renders and distorts a square.; #X text 27 331 Inlet 4: float: posX (centered); #X text 27 343 Inlet 5: float: posY (centered); @@ -59,31 +30,36 @@ #X text 63 202 segments of the square; #X text 33 14 Synopsis: [ripple]; #X obj 488 289 ripple 16 16; -#X text 16 73 When banged \, ripple will grab the vertex nearest to -the specified (ctrX ctrY) position. The vertices will be accelerated -towards the selected one for a moment and then gradually fall back -to their original position.; -#X obj 575 244 tgl 15 0 empty empty ctrX 18 8 0 8 -262144 -1 -1 0 1 -; -#X obj 575 264 tgl 15 0 empty empty ctrY 18 8 0 8 -262144 -1 -1 0 1 -; +#X text 16 73 When banged \, ripple will grab the vertex nearest to the specified (ctrX ctrY) position. The vertices will be accelerated towards the selected one for a moment and then gradually fall back to their original position.; +#X obj 575 244 tgl 15 0 empty empty ctrX 18 8 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 575 264 tgl 15 0 empty empty ctrY 18 8 0 8 #fcfcfc #000000 #000000 0 1; #X text 27 317 Inlet 3: float: amount; #X text 17 131 The amount of excursion can be specified.; -#X floatatom 510 247 5 0 0 0 - - -; -#X text 17 150 note: [ripple] distorts a bit different when texture-mapping -is used!; +#X floatatom 510 247 5 0 0 0 - - - 0; +#X text 17 150 note: [ripple] distorts a bit different when texture-mapping is used!; #X text 27 303 Inlet 2: float: size; -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 23 0; -#X connect 19 0 23 1; -#X connect 20 0 33 0; -#X connect 21 0 33 0; -#X connect 22 0 33 0; -#X connect 23 0 33 0; -#X connect 24 0 33 0; -#X connect 25 0 33 2; -#X connect 35 0 33 3; -#X connect 36 0 33 4; -#X connect 39 0 33 1; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders and distorts a square.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw bang; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 508 326 _gemwin; +#X connect 14 0 19 0; +#X connect 15 0 19 1; +#X connect 16 0 29 0; +#X connect 17 0 29 0; +#X connect 18 0 29 0; +#X connect 19 0 29 0; +#X connect 20 0 29 0; +#X connect 21 0 29 2; +#X connect 31 0 29 3; +#X connect 32 0 29 4; +#X connect 35 0 29 1; diff --git a/help/rotate-help.pd b/help/rotate-help.pd index 23b5444c6..26a18fa89 100644 --- a/help/rotate-help.pd +++ b/help/rotate-help.pd @@ -1,70 +1,49 @@ #N canvas 57 61 633 363 10; #X declare -lib Gem; #X text 442 8 GEM object; -#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 39 282 Outlets:; #X text 57 295 Outlet 1: gemlist; -#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 158 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 233 square; #X text 50 12 Synopsis: [rotate]; #X text 29 77 Description: rotation; -#X text 41 98 rotate accepts a gemList and changes the current transformation -matrix by the specified rotation; +#X text 41 98 rotate accepts a gemList and changes the current transformation matrix by the specified rotation; #X obj 451 186 rotate 45 0 0 1; -#X floatatom 468 162 5 0 0 0 - - -; +#X floatatom 468 162 5 0 0 0 - - - 0; #X msg 551 163 1 0 0; #X msg 566 187 0 1 1; #X text 63 166 1st argument: initial rotation amount (in degree); #X text 63 179 2nd-4th argument: (X Y Z) of the rotation-axis; -#X text 63 246 Inlet 2: float: rotation amount around axis (in deg) -; +#X text 63 246 Inlet 2: float: rotation amount around axis (in deg); #X text 63 264 Inlet 3: list: rotation axis (X Y Z); #X text 39 130 the (x y z) vector determines the axis of rotation; #X text 38 332 see also:; #X obj 101 332 rotateXYZ; #X obj 169 332 accumrotate; -#X obj 508 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 22 0; -#X connect 22 0 18 0; -#X connect 23 0 22 1; -#X connect 24 0 22 2; -#X connect 25 0 22 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION rotation; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 508 8 pd META; +#X obj 521 271 _gemwin; +#X connect 13 0 18 0; +#X connect 18 0 14 0; +#X connect 19 0 18 1; +#X connect 20 0 18 2; +#X connect 21 0 18 2; diff --git a/help/rotateXYZ-help.pd b/help/rotateXYZ-help.pd index 522feb506..fc692a36f 100644 --- a/help/rotateXYZ-help.pd +++ b/help/rotateXYZ-help.pd @@ -1,75 +1,50 @@ #N canvas 445 99 639 383 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 37 228 Inlets:; #X text 51 241 Inlet 1: gemlist; #X text 37 302 Outlets:; #X text 55 315 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 114 cnv 15 160 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 114 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 233 square; #X text 29 77 Description: rotation; -#X text 32 92 rotate accepts a gemList and changes the current transformation -matrix by the specified rotation; -#X floatatom 486 122 5 0 0 1 X[deg] - -; +#X text 32 92 rotate accepts a gemList and changes the current transformation matrix by the specified rotation; +#X floatatom 486 122 5 0 0 1 X[deg] - - 0; #X obj 451 186 rotateXYZ 45 0 0; -#X floatatom 506 142 5 0 0 1 Y[deg] - -; -#X floatatom 530 162 5 0 0 1 Z[deg] - -; +#X floatatom 506 142 5 0 0 1 Y[deg] - - 0; +#X floatatom 530 162 5 0 0 1 Z[deg] - - 0; #X text 50 12 Synopsis: [rotateXYZ]; -#X text 29 126 the rotation around the X- \, Y- and Z-axis (in this -order) can be specified separately by arguments and changed via inlets. -; -#X text 15 191 1st-3rd argument: rotation (in deg) around X- \, Y- -and Z-axis; -#X text 51 256 Inlet 2: float: rotation amount around X-axis (in deg) -; -#X text 51 282 Inlet 4: float: rotation amount around Z-axis (in deg) -; -#X text 51 269 Inlet 3: float: rotation amount around Y-axis (in deg) -; +#X text 29 126 the rotation around the X- \, Y- and Z-axis (in this order) can be specified separately by arguments and changed via inlets.; +#X text 15 191 1st-3rd argument: rotation (in deg) around X- \, Y- and Z-axis; +#X text 51 256 Inlet 2: float: rotation amount around X-axis (in deg); +#X text 51 282 Inlet 4: float: rotation amount around Z-axis (in deg); +#X text 51 269 Inlet 3: float: rotation amount around Y-axis (in deg); #X text 22 349 see also:; #X obj 85 349 rotate; #X obj 132 349 accumrotate; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 22 0; -#X connect 21 0 22 1; -#X connect 22 0 18 0; -#X connect 23 0 22 2; -#X connect 24 0 22 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION rotation; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 526 277 _gemwin; +#X connect 13 0 18 0; +#X connect 17 0 18 1; +#X connect 18 0 14 0; +#X connect 19 0 18 2; +#X connect 20 0 18 3; diff --git a/help/rubber-help.pd b/help/rubber-help.pd index 069a28293..9c2bfcbce 100644 --- a/help/rubber-help.pd +++ b/help/rubber-help.pd @@ -1,95 +1,74 @@ #N canvas 6 61 710 387 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 57 cnv 15 170 300 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 544 294 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 549 333 pd gemwin; -#X msg 549 314 create; -#X text 545 293 Create window:; +#X obj 479 57 cnv 15 170 300 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 39 Example:; -#X obj 7 65 cnv 15 450 102 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 226 cnv 15 450 145 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 102 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 226 cnv 15 450 145 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 231 Inlets:; -#X obj 8 171 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 171 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 170 Arguments:; #X text 27 257 Inlet 1: message: draw [line|fill|point]; #X text 482 8 GEM object; #X text 27 243 Inlet 1: gemlist; #X text 9 340 Outlets:; #X text 20 353 Outlet 1: gemlist; -#X obj 484 151 cnv 15 160 140 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 484 151 cnv 15 160 140 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 488 58 gemhead; -#X floatatom 530 77 5 -10 10 0 - - -; +#X floatatom 530 77 5 -10 10 0 - - - 0; #X msg 494 154 draw line; #X msg 494 174 draw fill; #X msg 494 194 draw point; -#X obj 581 166 bng 15 250 50 0 empty empty grab 20 7 0 8 -262144 -1 --1; +#X obj 581 166 bng 15 250 50 0 empty empty grab 20 7 0 8 #fcfcfc #000000 #000000; #X obj 581 132 select 1; -#X floatatom 573 227 5 0 0 1 ctrX - -; -#X floatatom 573 244 5 0 0 1 ctrY - -; -#X floatatom 582 185 5 0 0 1 size - -; -#X floatatom 582 202 5 0 0 1 height - -; +#X floatatom 573 227 5 0 0 1 ctrX - - 0; +#X floatatom 573 244 5 0 0 1 ctrY - - 0; +#X floatatom 582 185 5 0 0 1 size - - 0; +#X floatatom 582 202 5 0 0 1 height - - 0; #X text 33 14 Synopsis: [rubber]; #X text 7 69 Description: Renders and distorts a square.; #X text 27 313 Inlet 4: float: posX (centered); #X text 27 325 Inlet 5: float: posY (centered); -#X text 16 86 When banged \, rubber will grab the vertex of the square -specified by ctrX and ctrY and expose it at the specified height. You -can then move the grabbed vertex and the adjacent vertices will follow -inertly. When you bang the rubber object again \, the grabbed vertex -will fall back to its original position; +#X text 16 86 When banged \, rubber will grab the vertex of the square specified by ctrX and ctrY and expose it at the specified height. You can then move the grabbed vertex and the adjacent vertices will follow inertly. When you bang the rubber object again \, the grabbed vertex will fall back to its original position; #X text 65 197 default: 32 32; #X text 63 183 segments of the square; #X text 480 362 and move the mouse; #X obj 542 113 gemmouse 1 1; +#A saved init; #X obj 488 269 rubber 8 8; #X text 27 270 Inlet 1: bang: grab/release; #X text 27 285 Inlet 2: float: size; #X text 27 298 Inlet 3: float: height; #X obj 488 94 accumrotate 135 0 0; #X obj 488 77 t a b; -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 43 0; -#X connect 19 0 42 1; -#X connect 20 0 38 0; -#X connect 21 0 38 0; -#X connect 22 0 38 0; -#X connect 23 0 38 0; -#X connect 24 0 23 0; -#X connect 25 0 38 3; -#X connect 26 0 38 4; -#X connect 27 0 38 1; -#X connect 28 0 38 2; -#X connect 37 0 25 0; -#X connect 37 1 26 0; -#X connect 37 2 24 0; -#X connect 42 0 38 0; -#X connect 43 0 42 0; -#X connect 43 1 19 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders and distorts a square.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw bang; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 554 302 _gemwin; +#X connect 14 0 39 0; +#X connect 15 0 38 1; +#X connect 16 0 34 0; +#X connect 17 0 34 0; +#X connect 18 0 34 0; +#X connect 19 0 34 0; +#X connect 20 0 19 0; +#X connect 21 0 34 3; +#X connect 22 0 34 4; +#X connect 23 0 34 1; +#X connect 24 0 34 2; +#X connect 33 0 21 0; +#X connect 33 1 22 0; +#X connect 33 2 20 0; +#X connect 38 0 34 0; +#X connect 39 0 38 0; +#X connect 39 1 15 0; diff --git a/help/scale-help.pd b/help/scale-help.pd index f504184a9..dfb402a7d 100644 --- a/help/scale-help.pd +++ b/help/scale-help.pd @@ -1,59 +1,27 @@ #N canvas 207 61 639 441 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 306 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 306 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 318 Inlets:; #X text 63 331 Inlet 1: gemlist; #X text 39 382 Outlets:; #X text 57 395 Outlet 1: gemlist; -#X obj 8 256 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 256 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 255 Arguments:; -#X obj 8 76 cnv 15 430 170 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 126 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 126 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X text 50 12 Synopsis: [scale]; #X text 29 77 Description: scale; -#X text 39 97 scale accepts a gemList and changes the current transformation -matrix by the specified scale; +#X text 39 97 scale accepts a gemList and changes the current transformation matrix by the specified scale; #X text 39 129 The xyz vector determine the vector for scaling; -#X text 24 159 With 1 argument \, the entire object is scaled by this -amount; -#X text 22 177 With 3 arguments \, the object is scaled in each dimension -by the vector; -#X text 22 206 With 4 arguments \, the object is scaled by the amount -by the vector.; -#X floatatom 480 130 5 0 0 1 amount - -; +#X text 24 159 With 1 argument \, the entire object is scaled by this amount; +#X text 22 177 With 3 arguments \, the object is scaled in each dimension by the vector; +#X text 22 206 With 4 arguments \, the object is scaled by the amount by the vector.; +#X floatatom 480 130 5 0 0 1 amount - - 0; #X msg 524 174 1 1 1; #X msg 509 150 3 2 1; #X obj 451 263 cube; @@ -67,14 +35,23 @@ by the vector.; #X obj 451 196 scale 0.5; #X text 450 339 see also:; #X obj 452 363 scaleXYZ; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 29 0; -#X connect 25 0 36 1; -#X connect 26 0 36 2; -#X connect 27 0 36 2; -#X connect 29 0 36 0; -#X connect 30 0 31 0; -#X connect 31 0 28 0; -#X connect 36 0 28 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION scale; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 529 276 _gemwin; +#X connect 13 0 25 0; +#X connect 21 0 32 1; +#X connect 22 0 32 2; +#X connect 23 0 32 2; +#X connect 25 0 32 0; +#X connect 26 0 27 0; +#X connect 27 0 24 0; +#X connect 32 0 24 0; diff --git a/help/scaleXYZ-help.pd b/help/scaleXYZ-help.pd index d77d79cce..4a41fa05e 100644 --- a/help/scaleXYZ-help.pd +++ b/help/scaleXYZ-help.pd @@ -1,73 +1,50 @@ #N canvas 207 61 639 433 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 212 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 212 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 211 Inlets:; #X text 63 228 Inlet 1: gemlist; #X text 39 295 Outlets:; #X text 57 312 Outlet 1: gemlist; -#X obj 8 154 cnv 15 430 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 154 cnv 15 430 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 153 Arguments:; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 262 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 301 pd gemwin; -#X msg 519 282 create; -#X text 515 261 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 106 cnv 15 160 90 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 106 cnv 15 160 90 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X floatatom 491 110 5 0 0 1 X-scale - -; -#X obj 451 263 cube; -#X obj 459 222 loadbang; -#X msg 459 239 draw line; +#X floatatom 491 110 5 0 0 1 X-scale - - 0; #X text 50 12 Synopsis: [scaleXYZ]; #X text 29 77 Description: scale along the X- \, Y- and Z-axis; #X obj 451 176 scaleXYZ 1 0.5 0.7; -#X floatatom 506 131 5 0 0 1 Y-scale - -; -#X floatatom 527 150 5 0 0 1 Z-scale - -; +#X floatatom 506 131 5 0 0 1 Y-scale - - 0; +#X floatatom 527 150 5 0 0 1 Z-scale - - 0; #X text 54 173 : scaling factors along the axes.; #X text 63 244 Inlet 2: float: scaling amount along the X-axis; #X text 63 276 Inlet 4: float: scaling amount along the Z-axis; #X text 63 260 Inlet 3: float: scaling amount along the Y-axis; #X obj 451 200 rotate 45 1 1 1; -#X text 39 97 [scaleXYZ] accepts a gemList and changes the current -transformation matrix by the specified scale; +#X text 39 97 [scaleXYZ] accepts a gemList and changes the current transformation matrix by the specified scale; #X text 17 340 see also:; #X obj 83 340 scale; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION scale along the X- \, Y- and Z-axis; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 262 _gemwin; +#X obj 451 263 cube \; draw line; +#X connect 13 0 17 0; +#X connect 14 0 17 1; #X connect 17 0 24 0; -#X connect 18 0 24 1; -#X connect 20 0 21 0; -#X connect 21 0 19 0; -#X connect 24 0 31 0; -#X connect 25 0 24 2; -#X connect 26 0 24 3; -#X connect 31 0 19 0; +#X connect 18 0 17 2; +#X connect 19 0 17 3; +#X connect 24 0 30 0; diff --git a/help/scopeXYZ~-help.pd b/help/scopeXYZ~-help.pd index 9343d2574..7b727c1ea 100644 --- a/help/scopeXYZ~-help.pd +++ b/help/scopeXYZ~-help.pd @@ -1,50 +1,21 @@ #N canvas 30 348 677 461 10; #X declare -lib Gem; #X text 475 39 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 219 cnv 15 450 210 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 219 cnv 15 450 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 172 cnv 15 450 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 172 cnv 15 450 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 171 Arguments:; #X text 502 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 398 Outlets:; #X text 21 411 Outlet 1: gemlist; -#X obj 469 58 cnv 15 200 295 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 470 359 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy \, reset; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 475 398 pd gemwin; -#X msg 475 379 create; -#X text 471 358 Create window:; -#X obj 474 112 cnv 15 190 200 empty empty empty 20 12 0 14 -85973 -66577 -0; -#X obj 521 319 cnv 15 110 30 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 469 58 cnv 15 200 295 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 470 359 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 474 112 cnv 15 190 200 empty empty empty 20 12 0 14 #50fc50 #404040 0; +#X obj 521 319 cnv 15 110 30 empty empty empty 20 12 0 14 #14e814 #404040 0; #X text 27 293 Inlet 1: message: width : line-width(1); -#X obj 596 233 cnv 15 65 75 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 596 233 cnv 15 65 75 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 479 143 draw line; #X msg 479 183 draw fill; #X msg 479 120 draw point; @@ -56,32 +27,35 @@ #X msg 478 269 draw quad; #X msg 478 291 draw quadstrip; #X obj 527 88 rotateXYZ; -#X floatatom 585 65 5 0 0 0 - - -; -#X floatatom 599 167 5 0 10 0 - - -; +#X floatatom 585 65 5 0 0 0 - - - 0; +#X floatatom 599 167 5 0 10 0 - - - 0; #X msg 599 183 width \$1; -#X floatatom 600 124 5 0 100 0 - - -; -#X obj 579 359 cnv 15 90 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X text 27 247 Inlet 1: message: draw [default|line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip] -; -#N canvas 0 0 450 300 dsp 0; +#X floatatom 600 124 5 0 100 0 - - - 0; +#X obj 579 359 cnv 15 90 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X text 27 247 Inlet 1: message: draw [default|line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip]; +#N canvas 0 0 629 304 dsp 0; #X obj 74 87 r \$0-dsp; -#X obj 74 108 route set; -#X msg 132 131 \; pd dsp \$1; -#X obj 280 98 r pd; -#X obj 280 119 route dsp; -#X obj 280 170 s \$0-dsp; -#X msg 280 148 set \$1; -#X connect 0 0 1 0; -#X connect 1 1 2 0; +#X msg 74 131 \; pd dsp \$1; +#X obj 74 108 route float; +#X obj 199 84 r pd-dsp-started; +#X msg 199 107 1; +#X msg 199 130 set \$1; +#X obj 199 153 s \$0-dsp; +#X msg 309 107 0; +#X obj 309 84 r pd-dsp-stopped; +#X obj 301 44 loadbang; +#X connect 0 0 2 0; +#X connect 2 0 1 0; #X connect 3 0 4 0; -#X connect 4 0 6 0; -#X connect 6 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X connect 9 0 7 0; #X restore 587 396 pd dsp; -#X obj 590 362 tgl 30 0 \$0-dsp \$0-dsp dsp 35 15 2 12 -262144 -1 -1 -0 1; +#X obj 590 362 tgl 30 0 \$0-dsp \$0-dsp dsp 35 15 2 12 #fcfcfc #000000 #000000 0 1; #X obj 527 326 scopeXYZ~ 1024; -#X floatatom 599 216 5 0 0 0 - - -; +#X floatatom 599 216 5 0 0 0 - - - 0; #X obj 599 283 osc~ 882; #X obj 599 262 osc~ 221; #X obj 599 239 osc~ 40; @@ -89,39 +63,44 @@ #X text 33 14 Synopsis: [scopeXYZ~]; #X text 54 30 Class: geometric object \, DSP-object; #X text 7 69 Description: 3D oscilloscope; -#X text 22 87 [scopeXYZ~] is a 3-dimensional oscilloscope. It reads -3 input signals and applies the values as excursions along the respective -axis. The initial argument is the number of signal-points that are -be stored.; -#X text 27 306 Inlet 1: message: length : number of signal points -to be stored; -#X text 63 183 number of signal points that are stored (defaults to -blocksize); +#X text 22 87 [scopeXYZ~] is a 3-dimensional oscilloscope. It reads 3 input signals and applies the values as excursions along the respective axis. The initial argument is the number of signal-points that are be stored.; +#X text 27 306 Inlet 1: message: length : number of signal points to be stored; +#X text 63 183 number of signal points that are stored (defaults to blocksize); #X text 23 144 You can use it for Lissajou-patterns; #X text 28 343 Inlet 2: signal: X-values of the oscillograph; #X text 28 356 Inlet 3: signal: Y-values of the oscillograph; #X text 28 371 Inlet 4: signal: Z-values of the oscillograph; -#X obj 568 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 19 0 38 0; -#X connect 20 0 38 0; -#X connect 21 0 38 0; -#X connect 22 0 29 0; -#X connect 23 0 38 0; -#X connect 24 0 38 0; -#X connect 25 0 38 0; -#X connect 26 0 38 0; -#X connect 27 0 38 0; -#X connect 28 0 38 0; -#X connect 29 0 38 0; -#X connect 30 0 29 1; -#X connect 30 0 29 3; -#X connect 31 0 32 0; -#X connect 32 0 38 0; -#X connect 33 0 43 0; -#X connect 39 0 42 0; -#X connect 40 0 38 3; -#X connect 41 0 38 2; -#X connect 42 0 38 1; -#X connect 43 0 38 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION 3D oscilloscope; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw width length; +#X text 20 105 INLET_1 signal; +#X text 20 125 INLET_2 signal; +#X text 20 145 INLET_3 signal; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 568 8 pd META; +#X obj 477 366 _gemwin; +#X connect 16 0 35 0; +#X connect 17 0 35 0; +#X connect 18 0 35 0; +#X connect 19 0 26 0; +#X connect 20 0 35 0; +#X connect 21 0 35 0; +#X connect 22 0 35 0; +#X connect 23 0 35 0; +#X connect 24 0 35 0; +#X connect 25 0 35 0; +#X connect 26 0 35 0; +#X connect 27 0 26 1; +#X connect 27 0 26 3; +#X connect 28 0 29 0; +#X connect 29 0 35 0; +#X connect 30 0 40 0; +#X connect 36 0 39 0; +#X connect 37 0 35 3; +#X connect 38 0 35 2; +#X connect 39 0 35 1; +#X connect 40 0 35 0; diff --git a/help/separator-help.pd b/help/separator-help.pd index dbe727c81..f24a8a45e 100644 --- a/help/separator-help.pd +++ b/help/separator-help.pd @@ -3,17 +3,14 @@ #X text 692 8 GEM object; #X text 71 31 Class: manipulation object; #X text 50 12 Synopsis: [separator]; -#X obj 8 337 cnv 15 430 60 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 337 cnv 15 430 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 339 Inlets:; #X text 63 352 Inlet 1: gemlist; #X text 39 368 Outlets:; #X text 57 381 Outlet 1: gemlist; -#X obj 8 204 cnv 15 430 120 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 204 cnv 15 430 120 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 206 Arguments:; -#X obj 8 76 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 29 77 Description: separate render chains; #X text 72 236 "modelview" = "model" = "m"; #X text 72 249 "color" = "c"; @@ -21,65 +18,26 @@ #X text 72 276 "projection" = "p"; #X text 63 217 list of matrices to work on; #X text 63 298 default: "m c t p" (all matrices); -#X text 42 135 for the openGL-savvy: [separator] pushes (saves) the -modelview \, color \, texture and projection matrices to the stack -(unless the stack is full). Once rendering below [separator] is done -\, the matrices are popped \, thus restoring the state before [separator] -was called.; -#X text 42 95 [separator] isolates parallel render-chains with regard -to transformation effects (translation \, rotation \, ...) \, so you -don't get side-effects; -#X obj 8 411 cnv 15 430 130 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X text 42 135 for the openGL-savvy: [separator] pushes (saves) the modelview \, color \, texture and projection matrices to the stack (unless the stack is full). Once rendering below [separator] is done \, the matrices are popped \, thus restoring the state before [separator] was called.; +#X text 42 95 [separator] isolates parallel render-chains with regard to transformation effects (translation \, rotation \, ...) \, so you don't get side-effects; +#X obj 8 411 cnv 15 430 130 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 162 448 pix_separator; -#X text 53 420 NOTE: [separator] has no effect on pixel-operations. -to isolate [pix_*]-chains from each other \, use:; -#X text 55 476 NOTE: the color will not be affected by [separator]. -if you change the [color] in the subchain rendered first \, the same -color will automatically be applied to subchains rendered later. the -only way to work around this \, is to reset the color in the other -subchains.; -#X obj 602 440 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 607 479 pd gemwin; -#X msg 607 460 create; -#X text 603 439 Create window:; -#X obj 439 229 cnv 15 210 40 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 658 229 cnv 15 210 40 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X text 53 420 NOTE: [separator] has no effect on pixel-operations. to isolate [pix_*]-chains from each other \, use:; +#X text 55 476 NOTE: the color will not be affected by [separator]. if you change the [color] in the subchain rendered first \, the same color will automatically be applied to subchains rendered later. the only way to work around this \, is to reset the color in the other subchains.; +#X obj 602 440 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 439 229 cnv 15 210 40 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 658 229 cnv 15 210 40 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 446 241 separator; #X obj 446 188 translateXYZ 2 0 0; #X obj 520 242 separator; #X obj 446 148 gemhead; #X obj 446 168 color 1 0 0; -#X obj 446 119 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 661 122 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 446 55 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; +#X obj 446 119 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 661 122 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X obj 446 55 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X obj 446 73 t f f; #X obj 661 96 == 0; -#X floatatom 581 197 5 0 0 0 - - -; +#X floatatom 581 197 5 0 0 0 - - - 0; #X obj 446 33 loadbang; #X text 472 56 toggle between separated/unseparated rendering; #X text 694 117 blue; @@ -89,9 +47,7 @@ subchains.; #X obj 661 168 color 0 0 1; #X obj 446 208 t a a; #X obj 661 208 t a a; -#X text 465 326 If you did not use a [separator] in the example \, -then one of the chains would have an extra rotation (depending on which -subchain is rendered first).; +#X text 465 326 If you did not use a [separator] in the example \, then one of the chains would have an extra rotation (depending on which subchain is rendered first).; #X obj 747 273 rotateXYZ 0 45 0; #X obj 747 293 square; #X obj 520 273 rotateXYZ 0 45 0; @@ -100,34 +56,39 @@ subchain is rendered first).; #X obj 446 271 color 0 1 1; #X obj 520 293 circle; #X obj 446 293 cone; -#X text 464 364 With the [separator] \, both objects will by translated -\, but the rotation in one branch will not effect the other branch. -; -#X obj 768 8 declare -lib Gem; -#X connect 25 0 26 0; -#X connect 26 0 25 0; -#X connect 30 0 56 0; -#X connect 31 0 48 0; -#X connect 32 0 53 0; -#X connect 33 0 34 0; -#X connect 34 0 31 0; -#X connect 35 0 33 0; -#X connect 36 0 46 0; -#X connect 37 0 38 0; -#X connect 38 0 35 0; -#X connect 38 1 39 0; -#X connect 39 0 36 0; -#X connect 40 0 51 1; -#X connect 40 0 53 1; -#X connect 41 0 37 0; -#X connect 45 0 49 0; -#X connect 46 0 47 0; -#X connect 47 0 45 0; -#X connect 48 0 30 0; -#X connect 48 1 32 0; -#X connect 49 0 55 0; -#X connect 49 1 51 0; -#X connect 51 0 52 0; -#X connect 53 0 57 0; -#X connect 55 0 54 0; -#X connect 56 0 58 0; +#X text 464 364 With the [separator] \, both objects will by translated \, but the rotation in one branch will not effect the other branch.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION separate render chains; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 768 8 pd META; +#X obj 608 450 _gemwin; +#X connect 27 0 53 0; +#X connect 28 0 45 0; +#X connect 29 0 50 0; +#X connect 30 0 31 0; +#X connect 31 0 28 0; +#X connect 32 0 30 0; +#X connect 33 0 43 0; +#X connect 34 0 35 0; +#X connect 35 0 32 0; +#X connect 35 1 36 0; +#X connect 36 0 33 0; +#X connect 37 0 48 1; +#X connect 37 0 50 1; +#X connect 38 0 34 0; +#X connect 42 0 46 0; +#X connect 43 0 44 0; +#X connect 44 0 42 0; +#X connect 45 0 27 0; +#X connect 45 1 29 0; +#X connect 46 0 52 0; +#X connect 46 1 48 0; +#X connect 48 0 49 0; +#X connect 50 0 54 0; +#X connect 52 0 51 0; +#X connect 53 0 55 0; diff --git a/help/shearXY-help.pd b/help/shearXY-help.pd index fa1f38a3a..65df97741 100644 --- a/help/shearXY-help.pd +++ b/help/shearXY-help.pd @@ -1,61 +1,40 @@ #N canvas 57 61 625 322 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 233 Inlets:; #X text 63 246 Inlet 1: gemlist; #X text 39 276 Outlets:; #X text 57 289 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 288 pd gemwin; -#X msg 519 269 create; -#X text 515 248 Create window:; +#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 71 31 Class: manipulation object; -#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X floatatom 500 117 3 -4 4 0 - - -; +#X floatatom 500 117 3 -4 4 0 - - - 0; #X obj 451 138 shearXY 1; #X text 50 12 Synopsis: [shearXY]; #X text 29 77 Description: shear; -#X text 41 91 [shearXY] accepts a gemList and changes the current transformation -matrix by the specified shear; -#X text 36 122 the X translation depend on Y position and the shear -factor (float).; +#X text 41 91 [shearXY] accepts a gemList and changes the current transformation matrix by the specified shear; +#X text 36 122 the X translation depend on Y position and the shear factor (float).; #X text 60 194 1st argument: shear factor (XY); #X text 63 261 Inlet 2: float: XY shear factor; #X obj 451 179 cube; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 19 0; -#X connect 18 0 19 1; -#X connect 19 0 26 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shear; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 256 _gemwin; +#X connect 14 0 16 0; +#X connect 15 0 16 1; +#X connect 16 0 23 0; diff --git a/help/shearXZ-help.pd b/help/shearXZ-help.pd index c68c3372b..08f6da5c5 100644 --- a/help/shearXZ-help.pd +++ b/help/shearXZ-help.pd @@ -1,61 +1,40 @@ #N canvas 57 61 625 325 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 233 Inlets:; #X text 63 246 Inlet 1: gemlist; #X text 39 276 Outlets:; #X text 57 289 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 453 60 Example:; #X text 71 31 Class: manipulation object; #X text 29 77 Description: shear; #X text 50 12 Synopsis: [shearXZ]; -#X text 41 91 [shearXZ] accepts a gemList and changes the current transformation -matrix by the specified shear; +#X text 41 91 [shearXZ] accepts a gemList and changes the current transformation matrix by the specified shear; #X text 60 194 1st argument: shear factor (XZ); #X text 63 261 Inlet 2: float: XZ shear factor; -#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 288 pd gemwin; -#X msg 519 269 create; -#X text 515 248 Create window:; -#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 458 82 gemhead; #X obj 458 177 square; -#X floatatom 507 115 3 -4 4 0 - - -; +#X floatatom 507 115 3 -4 4 0 - - - 0; #X obj 458 136 shearXZ 1; -#X text 36 122 the X translation depend on Z position and the shear -factor (float).; -#X obj 518 8 declare -lib Gem; -#X connect 18 0 19 0; -#X connect 19 0 18 0; -#X connect 22 0 25 0; -#X connect 24 0 25 1; -#X connect 25 0 23 0; +#X text 36 122 the X translation depend on Z position and the shear factor (float).; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shear; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 254 _gemwin; +#X connect 19 0 22 0; +#X connect 21 0 22 1; +#X connect 22 0 20 0; diff --git a/help/shearYX-help.pd b/help/shearYX-help.pd index 4257de1be..a861ba04b 100644 --- a/help/shearYX-help.pd +++ b/help/shearYX-help.pd @@ -1,61 +1,40 @@ #N canvas 335 193 634 330 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 233 Inlets:; #X text 63 246 Inlet 1: gemlist; #X text 39 276 Outlets:; #X text 57 289 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 453 60 Example:; #X text 71 31 Class: manipulation object; #X text 29 77 Description: shear; -#X text 36 122 the X translation depend on Y position and the shear -factor (float).; +#X text 36 122 the X translation depend on Y position and the shear factor (float).; #X text 50 12 Synopsis: [shearYX]; -#X text 41 91 [shearYX] accepts a gemList and changes the current transformation -matrix by the specified shear; +#X text 41 91 [shearYX] accepts a gemList and changes the current transformation matrix by the specified shear; #X text 60 194 1st argument: shear factor (YX); #X text 63 261 Inlet 2: float: YX shear factor; -#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 288 pd gemwin; -#X msg 519 269 create; -#X text 515 248 Create window:; -#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 179 square; -#X floatatom 500 117 3 -4 4 0 - - -; +#X floatatom 500 117 3 -4 4 0 - - - 0; #X obj 451 138 shearYX 1; -#X obj 518 8 declare -lib Gem; -#X connect 19 0 20 0; -#X connect 20 0 19 0; -#X connect 23 0 26 0; -#X connect 25 0 26 1; -#X connect 26 0 24 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shear; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 257 _gemwin; +#X connect 20 0 23 0; +#X connect 22 0 23 1; +#X connect 23 0 21 0; diff --git a/help/shearYZ-help.pd b/help/shearYZ-help.pd index aef9a6932..c618760ff 100644 --- a/help/shearYZ-help.pd +++ b/help/shearYZ-help.pd @@ -1,63 +1,42 @@ #N canvas 357 249 631 328 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 233 Inlets:; #X text 63 246 Inlet 1: gemlist; #X text 39 276 Outlets:; #X text 57 289 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 453 60 Example:; #X text 71 31 Class: manipulation object; #X text 29 77 Description: shear; #X text 50 12 Synopsis: [shearYZ]; #X text 60 194 1st argument: shear factor (YZ); #X text 63 261 Inlet 2: float: YZ shear factor; -#X text 41 91 [shearYZ] accepts a gemList and changes the current transformation -matrix by the specified shear; -#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 288 pd gemwin; -#X msg 519 269 create; -#X text 515 248 Create window:; -#X obj 450 148 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X text 41 91 [shearYZ] accepts a gemList and changes the current transformation matrix by the specified shear; +#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 148 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X floatatom 500 157 3 -4 4 0 - - -; +#X floatatom 500 157 3 -4 4 0 - - - 0; #X obj 451 178 shearYZ 1; -#X text 36 122 the Y translation depend on Z position and the shear -factor (float).; +#X text 36 122 the Y translation depend on Z position and the shear factor (float).; #X obj 451 217 cube; #X obj 451 120 rotateXYZ 0 45 0; -#X obj 518 8 declare -lib Gem; -#X connect 18 0 19 0; -#X connect 19 0 18 0; -#X connect 22 0 27 0; -#X connect 23 0 24 1; -#X connect 24 0 26 0; -#X connect 27 0 24 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shear; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 522 258 _gemwin; +#X connect 19 0 24 0; +#X connect 20 0 21 1; +#X connect 21 0 23 0; +#X connect 24 0 21 0; diff --git a/help/shearZX-help.pd b/help/shearZX-help.pd index 246ba9d8d..fb61f1d2e 100644 --- a/help/shearZX-help.pd +++ b/help/shearZX-help.pd @@ -1,61 +1,40 @@ #N canvas 356 249 630 329 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 233 Inlets:; #X text 63 246 Inlet 1: gemlist; #X text 39 276 Outlets:; #X text 57 289 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 453 60 Example:; #X text 71 31 Class: manipulation object; #X text 29 77 Description: shear; #X text 50 12 Synopsis: [shearZX]; -#X text 42 91 [shearZX] accepts a gemList and changes the current transformation -matrix by the specified shear; +#X text 42 91 [shearZX] accepts a gemList and changes the current transformation matrix by the specified shear; #X text 60 194 1st argument: shear factor (ZX); #X text 63 261 Inlet 2: float: ZX shear factor; -#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 288 pd gemwin; -#X msg 519 269 create; -#X text 515 248 Create window:; -#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 514 249 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X floatatom 500 117 3 -4 4 0 - - -; +#X floatatom 500 117 3 -4 4 0 - - - 0; #X obj 451 138 shearZX 1; -#X text 36 122 the Z translation depend on X position and the shear -factor (float).; +#X text 36 122 the Z translation depend on X position and the shear factor (float).; #X obj 451 179 teapot; -#X obj 518 8 declare -lib Gem; -#X connect 18 0 19 0; -#X connect 19 0 18 0; -#X connect 22 0 24 0; -#X connect 23 0 24 1; -#X connect 24 0 26 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shear; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 519 257 _gemwin; +#X connect 19 0 21 0; +#X connect 20 0 21 1; +#X connect 21 0 23 0; diff --git a/help/shearZY-help.pd b/help/shearZY-help.pd index 2f1c8cf92..d4540d282 100644 --- a/help/shearZY-help.pd +++ b/help/shearZY-help.pd @@ -1,61 +1,40 @@ #N canvas 57 61 628 330 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 226 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 233 Inlets:; #X text 63 246 Inlet 1: gemlist; #X text 39 276 Outlets:; #X text 57 289 Outlet 1: gemlist; -#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; -#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 440 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 239 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 246 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 285 pd gemwin; -#X msg 519 266 create; -#X text 515 245 Create window:; +#X obj 514 246 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 71 31 Class: manipulation object; -#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 108 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 451 179 square; -#X floatatom 500 117 3 -4 4 0 - - -; +#X floatatom 500 117 3 -4 4 0 - - - 0; #X text 29 77 Description: shear; -#X text 41 91 [shearYZ] accepts a gemList and changes the current transformation -matrix by the specified shear; +#X text 41 91 [shearYZ] accepts a gemList and changes the current transformation matrix by the specified shear; #X text 60 194 1st argument: shear factor (ZY); #X text 63 261 Inlet 2: float: ZY shear factor; #X text 50 12 Synopsis: [shearYZ]; #X obj 451 138 shearZY 1; -#X text 36 122 the Y translation depend on Z position and the shear -factor (float).; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 25 0; -#X connect 19 0 25 1; -#X connect 25 0 18 0; +#X text 36 122 the Y translation depend on Z position and the shear factor (float).; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shear; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 521 251 _gemwin; +#X connect 14 0 22 0; +#X connect 16 0 22 1; +#X connect 22 0 15 0; diff --git a/help/shininess-help.pd b/help/shininess-help.pd index a104db212..820bbdd33 100644 --- a/help/shininess-help.pd +++ b/help/shininess-help.pd @@ -1,70 +1,48 @@ #N canvas 61 61 639 342 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 39 272 Outlets:; #X text 57 285 Outlet 1: gemlist; -#X obj 8 166 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 166 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 165 Arguments:; -#X obj 8 66 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 66 cnv 15 430 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; +#X obj 514 254 cnv 15 100 75 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 71 31 Class: manipulation object; -#X obj 450 112 cnv 15 120 50 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 112 cnv 15 120 50 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 500 192 gemhead; #X obj 500 230 world_light; #X obj 451 193 sphere; #X obj 500 211 rotate 90 1 0 0; #X obj 451 166 specular 1 0 0; -#X floatatom 509 121 5 0 128 0 shiny - -; +#X floatatom 509 121 5 0 128 0 shiny - - 0; #X text 63 249 Inlet 2: int: shininess 0..128; #X text 62 176 the shininess value; #X text 13 69 Description: shininess of the material; #X text 50 12 Synopsis: [shininess]; -#X text 22 86 [shininess] accepts a gemList and sets the shininess-value -for all subsequent vertex operations; -#X text 20 114 [shininess] accepts a single shininess-value that ranges -between 0 and 128 the shininess can be set via an initial argument. -; +#X text 22 86 [shininess] accepts a gemList and sets the shininess-value for all subsequent vertex operations; +#X text 20 114 [shininess] accepts a single shininess-value that ranges between 0 and 128 the shininess can be set via an initial argument.; #X obj 451 140 shininess; #X text 60 191 default:0; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 30 0; -#X connect 18 0 21 0; -#X connect 21 0 19 0; -#X connect 22 0 20 0; -#X connect 23 0 30 1; -#X connect 30 0 22 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION shininess of the material; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 int; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 518 258 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 14 0 27 0; +#X connect 15 0 18 0; +#X connect 18 0 16 0; +#X connect 19 0 17 0; +#X connect 20 0 27 1; +#X connect 27 0 19 0; diff --git a/help/slideSquares-help.pd b/help/slideSquares-help.pd index ef43340c4..bbf34be36 100644 --- a/help/slideSquares-help.pd +++ b/help/slideSquares-help.pd @@ -1,66 +1,45 @@ #N canvas 289 160 683 363 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 499 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 564 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 569 293 pd gemwin; -#X msg 569 274 create; -#X text 565 253 Create window:; +#X obj 499 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 564 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 505 59 Example:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 502 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 310 Outlets:; #X text 21 323 Outlet 1: gemlist; -#X obj 502 112 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 502 112 cnv 15 160 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 513 84 gemhead; -#X floatatom 566 134 5 0 0 0 - - -; -#X floatatom 620 165 5 0 0 0 - - -; +#X floatatom 566 134 5 0 0 0 - - - 0; +#X floatatom 620 165 5 0 0 0 - - - 0; #X text 620 149 height; #X text 27 275 Inlet 3: float: height (dimY); #X text 566 118 width; #X text 33 14 Synopsis: [slideSquares]; #X text 7 69 Description: Renders sliding rectangles.; -#X text 16 86 The slideSquares object renders a number of sliding rectangles -at the current position with current color. The dimensions of the sliding -rectangles can be changed via the inlet2 and inlet3.; -#X text 63 167 dimensions of the sliding rectangles (width height) -; +#X text 16 86 The slideSquares object renders a number of sliding rectangles at the current position with current color. The dimensions of the sliding rectangles can be changed via the inlet2 and inlet3.; +#X text 63 167 dimensions of the sliding rectangles (width height); #X text 65 181 default: 1 1; #X text 27 260 Inlet 2: float: width (dimX); #X obj 513 209 slideSquares 1 1; -#X obj 568 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 30 0; -#X connect 19 0 30 1; -#X connect 20 0 30 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders sliding rectangles.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 568 8 pd META; +#X obj 571 261 _gemwin; +#X connect 15 0 27 0; +#X connect 16 0 27 1; +#X connect 17 0 27 2; diff --git a/help/specular-help.pd b/help/specular-help.pd index 48dca55a5..328900f39 100644 --- a/help/specular-help.pd +++ b/help/specular-help.pd @@ -1,46 +1,19 @@ #N canvas 61 61 632 364 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 216 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 39 272 Outlets:; #X text 57 285 Outlet 1: gemlist; -#X obj 8 166 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 166 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 165 Arguments:; -#X obj 8 76 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; +#X obj 513 254 cnv 15 100 75 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 500 192 gemhead; #X obj 500 230 world_light; @@ -54,17 +27,23 @@ #X msg 462 132 0 10 0 0.4; #X obj 451 156 specular 1 0 0; #X text 60 191 defaults: 0 0 0 1; -#X text 22 96 [specular] accepts a gemList and sets the specular-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 22 96 [specular] accepts a gemList and sets the specular-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X text 36 323 see also:; #X obj 97 323 specularRGB; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 28 0; -#X connect 18 0 25 0; -#X connect 25 0 19 0; -#X connect 26 0 28 1; -#X connect 27 0 28 1; -#X connect 28 0 24 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION specular colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 258 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 14 0 25 0; +#X connect 15 0 22 0; +#X connect 22 0 16 0; +#X connect 23 0 25 1; +#X connect 24 0 25 1; +#X connect 25 0 21 0; diff --git a/help/specularRGB-help.pd b/help/specularRGB-help.pd index bd889397c..8d03b633f 100644 --- a/help/specularRGB-help.pd +++ b/help/specularRGB-help.pd @@ -1,46 +1,18 @@ #N canvas 61 61 629 372 10; #X declare -lib Gem; #X text 432 8 GEM object; -#X obj 8 216 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 216 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 39 302 Outlets:; #X text 57 315 Outlet 1: gemlist; -#X obj 8 166 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 166 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 165 Arguments:; -#X obj 8 76 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 197 134 destroy; -#X msg 132 112 reset \, lighting 1 \, create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; #X text 71 31 Class: manipulation object; -#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 450 118 cnv 15 160 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; #X obj 500 192 gemhead; #X obj 500 230 world_light; @@ -50,28 +22,38 @@ #X obj 500 211 rotate 90 1 0 0; #X text 60 191 defaults: 0 0 0 1; #X obj 451 156 specularRGB 1 0 0; -#X floatatom 479 121 3 0 10 0 R - -; -#X floatatom 508 137 3 0 10 0 G - -; -#X floatatom 536 119 3 0 10 0 B - -; -#X floatatom 565 135 3 0 10 0 A - -; +#X floatatom 479 121 3 0 10 0 R - - 0; +#X floatatom 508 137 3 0 10 0 G - - 0; +#X floatatom 536 119 3 0 10 0 B - - 0; +#X floatatom 565 135 3 0 10 0 A - - 0; #X text 50 12 Synopsis: [specularRGB]; -#X text 22 96 [specularRGB] accepts a gemList and sets the specular-color -for all subsequent vertex-operations. You have to enable lighting to -see any effects.; +#X text 22 96 [specularRGB] accepts a gemList and sets the specular-color for all subsequent vertex-operations. You have to enable lighting to see any effects.; #X text 62 247 Inlet 2: float: Red-value; #X text 62 287 Inlet 5: float: Alpha-value; #X text 62 274 Inlet 4: float: Blue-value; #X text 62 260 Inlet 3: float: Green-value; #X text 35 341 see also:; #X obj 107 342 specular; -#X obj 508 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 25 0; -#X connect 18 0 23 0; -#X connect 23 0 19 0; -#X connect 25 0 22 0; -#X connect 26 0 25 1; -#X connect 27 0 25 2; -#X connect 28 0 25 3; -#X connect 29 0 25 4; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION specular colouring; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 INLET_4 float; +#X text 20 185 OUTLET_0 gemlist; +#X text 10 205 AUTHOR IOhannes m zmölnig; +#X text 10 225 LICENSE GPL v2; +#X restore 508 8 pd META; +#X obj 513 254 cnv 15 100 75 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 520 258 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 21 0; +#X connect 14 0 19 0; +#X connect 19 0 15 0; +#X connect 21 0 18 0; +#X connect 22 0 21 1; +#X connect 23 0 21 2; +#X connect 24 0 21 3; +#X connect 25 0 21 4; diff --git a/help/sphere-help.pd b/help/sphere-help.pd index a7f6bfdf5..9885425dd 100644 --- a/help/sphere-help.pd +++ b/help/sphere-help.pd @@ -1,39 +1,13 @@ #N canvas 274 73 663 374 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 47 cnv 15 170 270 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 485 252 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 490 291 pd gemwin; -#X msg 490 272 create; -#X text 486 251 Create window:; +#X obj 479 47 cnv 15 170 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 485 252 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 485 29 Example:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 154 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 154 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 153 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 27 261 Inlet 2: float: size; @@ -41,34 +15,39 @@ #X text 27 233 Inlet 1: gemlist; #X text 9 287 Outlets:; #X text 21 300 Outlet 1: gemlist; -#X obj 486 184 cnv 15 130 60 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 486 184 cnv 15 130 60 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 506 88 draw line; #X msg 512 111 draw fill; #X msg 519 132 draw point; #X obj 497 59 gemhead; -#X floatatom 519 187 3 0 0 0 - - -; +#X floatatom 519 187 3 0 0 0 - - - 0; #X text 542 186 size; -#X floatatom 542 204 3 0 0 0 - - -; +#X floatatom 542 204 3 0 0 0 - - - 0; #X text 565 203 segments; #X text 27 272 Inlet 3: int: number of segments; #X text 33 14 Synopsis: [sphere]; #X text 16 69 Description: Renders a sphere.; -#X text 30 85 The sphere object renders a segmented sphere at the current -position with current color. The look of the sphere can be changed -with the draw message \, its size can be changed via the second inlet. -; +#X text 30 85 The sphere object renders a segmented sphere at the current position with current color. The look of the sphere can be changed with the draw message \, its size can be changed via the second inlet.; #X obj 497 222 sphere 1; #X text 35 168 size of the sphere \, segments; #X text 34 184 defaults: 1 \, 10; #X text 33 330 see also:; #X obj 102 331 sphere3d; -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 19 0 31 0; -#X connect 20 0 31 0; -#X connect 21 0 31 0; -#X connect 22 0 31 0; -#X connect 23 0 31 1; -#X connect 25 0 31 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a sphere.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 int; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 492 257 _gemwin; +#X connect 16 0 28 0; +#X connect 17 0 28 0; +#X connect 18 0 28 0; +#X connect 19 0 28 0; +#X connect 20 0 28 1; +#X connect 22 0 28 2; diff --git a/help/sphere3d-help.pd b/help/sphere3d-help.pd index 33580a0ed..145b082ac 100644 --- a/help/sphere3d-help.pd +++ b/help/sphere3d-help.pd @@ -1,39 +1,13 @@ #N canvas 67 280 714 379 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 479 47 cnv 15 230 280 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 544 264 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 549 303 pd gemwin; -#X msg 549 284 create; -#X text 545 263 Create window:; +#X obj 479 47 cnv 15 230 280 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 544 264 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 480 31 Example:; -#X obj 7 61 cnv 15 450 120 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 226 cnv 15 450 140 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 61 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 226 cnv 15 450 140 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 226 Inlets:; -#X obj 8 186 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 186 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 185 Arguments:; #X text 27 252 Inlet 1: message: draw [line|fill|point]; #X text 27 307 Inlet 2: float: size; @@ -41,58 +15,60 @@ #X text 27 238 Inlet 1: gemlist; #X text 9 334 Outlets:; #X text 21 347 Outlet 1: gemlist; -#X obj 534 135 cnv 15 175 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 534 135 cnv 15 175 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 483 56 draw line; #X msg 483 76 draw fill; #X msg 483 95 draw point; #X obj 553 54 gemhead; -#X floatatom 571 194 5 0 0 1 size - -; -#X floatatom 616 231 3 0 0 2 segments - -; +#X floatatom 571 194 5 0 0 1 size - - 0; +#X floatatom 616 231 3 0 0 2 segments - - 0; #X text 27 318 Inlet 3: int: number of segments; #X text 33 14 Synopsis: [sphere3d]; #X text 7 65 Description: Renders a sphere3d.; -#X text 14 82 The sphere3d object renders a segmented sphere3d at the -current position with current color. The look of the sphere3d can be -changed with the draw message \, its size can be changed via the second -inlet.; +#X text 14 82 The sphere3d object renders a segmented sphere3d at the current position with current color. The look of the sphere3d can be changed with the draw message \, its size can be changed via the second inlet.; #X text 63 197 size of the sphere3d; -#X floatatom 488 150 5 0 0 0 - - -; -#X floatatom 486 179 5 0 0 0 - - -; +#X floatatom 488 150 5 0 0 0 - - - 0; +#X floatatom 486 179 5 0 0 0 - - - 0; #X obj 479 230 r \$0-s3d; #X obj 483 117 s \$0-s3d; #X text 27 266 Inlet 1: message: setCartesian ; -#X text 27 279 Inlet 1: message: setSpherical -; +#X text 27 279 Inlet 1: message: setSpherical ; #X msg 535 151 setCartesian 2 3 \$1 1 0; #X obj 552 114 rotateXYZ; -#X floatatom 578 93 5 0 0 0 - - -; +#X floatatom 578 93 5 0 0 0 - - - 0; #X text 505 333 see also; #X obj 575 334 sphere; #X msg 548 174 setSpherical 2 3 \$1 45 45; #X obj 481 287 s \$0-s3d; #X msg 481 266 print; #X obj 553 229 sphere3d; -#X text 14 139 Unlike [sphere] \, you can modify (dislocate) each point -at the sphere via the setCartesian and setSpherical messages (for cartesian -and spherical (in deg) coordinates resp.); +#X text 14 139 Unlike [sphere] \, you can modify (dislocate) each point at the sphere via the setCartesian and setSpherical messages (for cartesian and spherical (in deg) coordinates resp.); #X text 27 292 Inlet 1: message: print; -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 19 0 33 0; -#X connect 20 0 33 0; -#X connect 21 0 33 0; -#X connect 22 0 37 0; -#X connect 23 0 44 1; -#X connect 24 0 44 2; -#X connect 30 0 36 0; -#X connect 31 0 41 0; -#X connect 32 0 44 0; -#X connect 36 0 44 0; -#X connect 37 0 44 0; -#X connect 38 0 37 1; -#X connect 38 0 37 2; -#X connect 38 0 37 3; -#X connect 41 0 44 0; -#X connect 43 0 42 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a sphere3d.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw setCartesian setSpherical print; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 int; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 550 270 _gemwin; +#X connect 16 0 30 0; +#X connect 17 0 30 0; +#X connect 18 0 30 0; +#X connect 19 0 34 0; +#X connect 20 0 41 1; +#X connect 21 0 41 2; +#X connect 27 0 33 0; +#X connect 28 0 38 0; +#X connect 29 0 41 0; +#X connect 33 0 41 0; +#X connect 34 0 41 0; +#X connect 35 0 34 1; +#X connect 35 0 34 2; +#X connect 35 0 34 3; +#X connect 38 0 41 0; +#X connect 40 0 39 0; diff --git a/help/spline_path-help.pd b/help/spline_path-help.pd index 82b1c2d86..fffc6dac1 100644 --- a/help/spline_path-help.pd +++ b/help/spline_path-help.pd @@ -60,7 +60,14 @@ its values in n-tuples like: " ..." Therefore #X text 50 240 name of the table; #X obj 516 168 spline_path 3 array; #X msg 543 140 open array; -#X obj 578 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION reads out a table; +#X text 10 65 KEYWORDS Gem; +#X text 20 85 INLET_0 float; +#X text 10 105 AUTHOR IOhannes m zmölnig; +#X text 10 125 LICENSE GPL v2; +#X restore 578 8 pd META; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; diff --git a/help/spot_light-help.pd b/help/spot_light-help.pd index 15cef435f..084cde8d2 100644 --- a/help/spot_light-help.pd +++ b/help/spot_light-help.pd @@ -1,92 +1,55 @@ #N canvas 34 73 724 516 10; #X declare -lib Gem; #X text 471 28 Example:; -#X obj 7 64 cnv 15 450 265 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 377 cnv 15 450 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 64 cnv 15 450 265 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 377 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 19 374 Inlets:; -#X obj 8 337 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 337 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 336 Arguments:; #X text 452 8 GEM object; #X text 37 386 Inlet 1: gemlist; #X text 22 468 Outlets:; #X text 34 481 Outlet 1: gemlist; -#X obj 468 47 cnv 15 225 400 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 473 49 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 256 112 destroy; -#X obj 322 45 inlet; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 8 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X restore 478 88 pd gemwin; -#X msg 478 69 create; -#X text 474 48 Create window:; -#X obj 472 197 cnv 15 220 210 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 468 47 cnv 15 225 400 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 473 49 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 472 197 cnv 15 220 210 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 483 128 gemhead; #X text 53 30 Class: non-geometric object; #X msg 489 316 1 1 1; -#X obj 482 385 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 482 385 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 500 385 debug \$1; -#X floatatom 563 132 5 0 0 0 - - -; -#X obj 586 55 cnv 15 85 50 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X floatatom 563 132 5 0 0 0 - - - 0; +#X obj 586 55 cnv 15 85 50 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 588 81 lighting \$1; -#X obj 588 59 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; +#X obj 588 59 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 489 335 1 1 0; -#X text 18 186 The second inlet sets the color of the light-source. -; -#X text 17 154 You can adjust the light with [rotate]. If you are lost -use "debug" to display the light source as a small cone.; +#X text 18 186 The second inlet sets the color of the light-source.; +#X text 17 154 You can adjust the light with [rotate]. If you are lost use "debug" to display the light source as a small cone.; #X text 33 14 Synopsis: [spot_light]; #X text 7 64 Description: adds a spot-light to the scene; -#X text 37 417 Inlet 1: message: debug 1|0 : show debugging object -(default:0), f 64; -#X text 37 447 Inlet 3: list: linear_attenuation \, cone_cutoff_angle -\, decay_at_edges, f 69; +#X text 37 417 Inlet 1: message: debug 1|0 : show debugging object (default:0), f 64; +#X text 37 447 Inlet 3: list: linear_attenuation \, cone_cutoff_angle \, decay_at_edges, f 69; #X obj 484 362 spot_light; #N canvas 611 263 574 368 spheres 0; #X obj 66 12 gemhead; -#X floatatom 84 243 5 0 0 0 - - -; -#X obj 49 14 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X floatatom 99 43 5 0 0 0 - - -; -#X floatatom 132 60 5 0 0 0 - - -; -#X floatatom 166 77 5 0 0 0 - - -; -#X floatatom 103 261 5 0 0 0 - - -; +#X floatatom 84 243 5 0 0 0 - - - 0; +#X obj 49 14 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; +#X floatatom 99 43 5 0 0 0 - - - 0; +#X floatatom 132 60 5 0 0 0 - - - 0; +#X floatatom 166 77 5 0 0 0 - - - 0; +#X floatatom 103 261 5 0 0 0 - - - 0; #X obj 66 96 rotateXYZ 0 0 0; -#X floatatom 106 130 5 0 0 0 - - -; -#X floatatom 146 147 5 0 0 0 - - -; -#X floatatom 187 163 5 0 0 0 - - -; +#X floatatom 106 130 5 0 0 0 - - - 0; +#X floatatom 146 147 5 0 0 0 - - - 0; +#X floatatom 187 163 5 0 0 0 - - - 0; #X obj 66 183 translateXYZ 0 0 0; #X obj 306 74 gemhead; -#X floatatom 410 143 5 0 0 0 - - -; -#X floatatom 450 160 5 0 0 0 - - -; -#X floatatom 491 176 5 0 0 0 - - -; -#X floatatom 409 54 5 0 0 0 - - -; -#X floatatom 442 71 5 0 0 0 - - -; -#X floatatom 476 88 5 0 0 0 - - -; +#X floatatom 410 143 5 0 0 0 - - - 0; +#X floatatom 450 160 5 0 0 0 - - - 0; +#X floatatom 491 176 5 0 0 0 - - - 0; +#X floatatom 409 54 5 0 0 0 - - - 0; +#X floatatom 442 71 5 0 0 0 - - - 0; +#X floatatom 476 88 5 0 0 0 - - - 0; #X obj 373 284 sphere 0.2; #X msg 304 214 20; #X obj 302 181 loadbang; @@ -119,54 +82,53 @@ use "debug" to display the light source as a small cone.; #X connect 22 0 23 0; #X connect 23 0 19 0; #X restore 476 418 pd spheres; -#X text 15 262 Keep in mind that the attributes have to be set before -rendering the vertices \, so if you are trying for frame accurate rendering -\, you will want to set the gemhead order to a low number so that all -of the values of the light get set first.; +#X text 15 262 Keep in mind that the attributes have to be set before rendering the vertices \, so if you are trying for frame accurate rendering \, you will want to set the gemhead order to a low number so that all of the values of the light get set first.; #X text 63 348 none; #X obj 483 176 translateXYZ 0 0 2; -#X floatatom 498 211 5 0 0 1 linear_attenuation - -; -#X floatatom 550 248 5 0 0 2 cone_cutoff_angle - -; -#X floatatom 588 278 5 0 0 2 decay_at_edges - -; +#X floatatom 498 211 5 0 0 1 linear_attenuation - - 0; +#X floatatom 550 248 5 0 0 2 cone_cutoff_angle - - 0; +#X floatatom 588 278 5 0 0 2 decay_at_edges - - 0; #X obj 588 297 t b f; #X obj 550 317 t b f; #X text 490 299 color; #X obj 483 150 rotateXYZ -33 0 0; #X text 37 432 Inlet 2: list: 3(RGB) float values; -#X text 17 205 The third inlet receives a list of three floats: linear_attenuation: -only accepts positive values cone_cutoff_angle: 0-90 or 180 decay_at_edges/exponent: -0-128; -#X text 19 81 [spot_light] produces a light which is at a variable -distance from the scene. It can be used to make a pinpoint light \, -or widened for larger illumination. The edges may appear jagged when -lighting low polygon models: to smooth \, increase the polygon's # -of vertices (or "slices").; +#X text 17 205 The third inlet receives a list of three floats: linear_attenuation: only accepts positive values cone_cutoff_angle: 0-90 or 180 decay_at_edges/exponent: 0-128; +#X text 19 81 [spot_light] produces a light which is at a variable distance from the scene. It can be used to make a pinpoint light \, or widened for larger illumination. The edges may appear jagged when lighting low polygon models: to smooth \, increase the polygon's # of vertices (or "slices").; #X obj 548 337 pack 0 90 3; -#X obj 492 265 tgl 20 0 empty \$0-onoff empty 17 7 0 10 -262144 -1 --1 0 1; +#X obj 492 265 tgl 20 0 empty \$0-onoff empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 480 457 see also:; #X obj 527 477 world_light; #X obj 485 477 light; #X text 37 401 Inlet 1: float: turn light on/off (default:1); -#X obj 578 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 16 0 43 0; -#X connect 18 0 32 1; -#X connect 19 0 20 0; -#X connect 20 0 32 0; -#X connect 21 0 43 2; -#X connect 23 0 12 1; -#X connect 24 0 23 0; -#X connect 25 0 32 1; -#X connect 36 0 32 0; -#X connect 37 0 47 0; -#X connect 38 0 41 0; -#X connect 39 0 40 0; -#X connect 40 0 47 0; -#X connect 40 1 47 2; -#X connect 41 0 47 0; -#X connect 41 1 47 1; -#X connect 43 0 36 0; -#X connect 47 0 32 2; -#X connect 48 0 32 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION adds a spot-light to the scene; +#X text 10 65 KEYWORDS Gem non-geometric; +#X text 20 85 INLET_0 gemlist float debug; +#X text 20 105 INLET_1 list; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 476 56 _gemwin; +#X connect 13 0 40 0; +#X connect 15 0 29 1; +#X connect 16 0 17 0; +#X connect 17 0 29 0; +#X connect 18 0 40 2; +#X connect 20 0 51 0; +#X connect 21 0 20 0; +#X connect 22 0 29 1; +#X connect 33 0 29 0; +#X connect 34 0 44 0; +#X connect 35 0 38 0; +#X connect 36 0 37 0; +#X connect 37 0 44 0; +#X connect 37 1 44 2; +#X connect 38 0 44 0; +#X connect 38 1 44 1; +#X connect 40 0 33 0; +#X connect 44 0 29 2; +#X connect 45 0 29 0; diff --git a/help/square-help.pd b/help/square-help.pd index 2df4559d8..a442c7141 100644 --- a/help/square-help.pd +++ b/help/square-help.pd @@ -1,38 +1,12 @@ #N canvas 289 160 710 345 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 489 57 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 554 234 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 559 273 pd gemwin; -#X msg 559 254 create; -#X text 555 233 Create window:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 489 57 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 554 234 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 27 261 Inlet 2: float: size; @@ -41,26 +15,31 @@ #X text 9 280 Outlets:; #X text 21 293 Outlet 1: gemlist; #X text 495 39 Example:; -#X obj 492 88 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 492 88 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 495 95 draw line; #X msg 495 116 draw fill; #X msg 495 138 draw point; #X obj 563 64 gemhead; -#X floatatom 594 124 5 0 0 0 - - -; +#X floatatom 594 124 5 0 0 0 - - - 0; #X text 594 108 size; #X obj 563 169 square; #X text 7 69 Description: Renders a square; #X text 33 14 Synopsis: [square]; #X text 63 186 size of the square; -#X text 16 86 The [square] object renders a square at the current position -with current color. The size of the square can be changed via the second -inlet.; -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 19 0 25 0; -#X connect 20 0 25 0; -#X connect 21 0 25 0; -#X connect 22 0 25 0; -#X connect 23 0 25 1; +#X text 16 86 The [square] object renders a square at the current position with current color. The size of the square can be changed via the second inlet.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a square; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 557 238 _gemwin; +#X connect 16 0 22 0; +#X connect 17 0 22 0; +#X connect 18 0 22 0; +#X connect 19 0 22 0; +#X connect 20 0 22 1; diff --git a/help/surface3d-help.pd b/help/surface3d-help.pd index 8fc68d0da..381215c12 100644 --- a/help/surface3d-help.pd +++ b/help/surface3d-help.pd @@ -1,55 +1,18 @@ #N canvas 41 102 968 681 10; #X declare -lib Gem; #X text 58 45 Class: geometric object; -#X obj 13 64 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 13 212 cnv 15 450 280 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 13 64 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 13 212 cnv 15 450 280 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 17 214 Inlets:; -#X obj 13 173 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 13 173 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 22 172 Arguments:; #X text 32 229 Inlet 1: gemlist; #X text 16 448 Outlets:; #X text 30 460 Outlet 1: gemlist; -#X obj 475 63 cnv 15 480 560 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 805 544 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 455 304 gemwin 0; -#X obj 132 182 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X obj 294 56 gemhead; -#X obj 294 76 world_light; -#X msg 207 155 lighting 1; -#X obj 207 134 loadbang; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 9 0; -#X connect 10 0 0 0; -#X connect 11 0 10 0; -#X restore 821 583 pd gemwin; -#X msg 821 564 create; -#X text 817 543 Create window:; -#X obj 796 74 cnv 15 150 150 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 796 234 cnv 15 150 150 empty empty empty 20 12 0 14 -24198 -66577 -0; -#X obj 486 74 cnv 15 300 310 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 475 63 cnv 15 480 560 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 796 74 cnv 15 150 150 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 796 234 cnv 15 150 150 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 486 74 cnv 15 300 310 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 519 175 draw line; #X msg 519 155 draw fill; #X msg 519 195 draw point; @@ -78,15 +41,14 @@ #X obj 807 356 s curve3d; #X text 660 139 of the curve; #X text 647 125 draw control point; -#X obj 486 398 cnv 15 300 210 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 486 398 cnv 15 300 210 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 494 407 gemhead; -#X floatatom 522 450 5 0 0 0 - - -; -#X floatatom 557 450 5 0 0 0 - - -; -#X floatatom 593 450 5 0 0 0 - - -; -#X floatatom 562 408 5 0 0 0 - - -; -#X floatatom 610 408 5 0 0 0 - - -; -#X floatatom 659 408 5 0 0 0 - - -; +#X floatatom 522 450 5 0 0 0 - - - 0; +#X floatatom 557 450 5 0 0 0 - - - 0; +#X floatatom 593 450 5 0 0 0 - - - 0; +#X floatatom 562 408 5 0 0 0 - - - 0; +#X floatatom 610 408 5 0 0 0 - - - 0; +#X floatatom 659 408 5 0 0 0 - - - 0; #X obj 494 471 rotateXYZ 0 0 0; #X obj 494 428 translateXYZ -2.5 -2.5 -2; #X obj 504 496 r curve3d; @@ -96,8 +58,7 @@ #X text 826 250 curve grid; #X text 28 430 Inlet 2: not used; #X text 32 243 Inlet 1: message: draw [line|fill|point|...]; -#X obj 13 503 cnv 15 450 120 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 13 503 cnv 15 450 120 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #N canvas 253 49 691 493 forme2 0; #N canvas 0 0 353 257 tripleRnd 0; #X obj 12 63 random 100; @@ -1104,10 +1065,8 @@ #X connect 51 0 24 0; #X connect 52 0 25 0; #X restore 136 549 pd forme2; -#X obj 136 530 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 57 550 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X obj 136 530 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; +#X obj 57 550 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 253 49 697 499 forme1 0; #X obj 76 418 outlet; #X obj 36 15 inlet; @@ -1572,13 +1531,9 @@ #X text 31 336 Inlet 1 : message: set Mx My X Y Z; #X text 31 296 Inlet 1: message: grid X Y; #X text 31 259 Inlet 1: message: res X Y; -#X text 53 272 This message is use for changing the size of the control -matrix (X \, Y are 2 int); -#X text 52 310 This message is use for changing the subdivision of -the displayed curve (X Y are 2 int); -#X text 53 349 This message can be use to set the position of a control -point. (Mx \, My : position of the point in the matrix. X \, Y \, Z -: position of this control point; +#X text 53 272 This message is use for changing the size of the control matrix (X \, Y are 2 int); +#X text 52 310 This message is use for changing the subdivision of the displayed curve (X Y are 2 int); +#X text 53 349 This message can be use to set the position of a control point. (Mx \, My : position of the point in the matrix. X \, Y \, Z : position of this control point; #X text 21 507 examples :; #X obj 494 520 surface3d 5 5; #X obj 504 561 r curve3d; @@ -1587,70 +1542,73 @@ point. (Mx \, My : position of the point in the matrix. X \, Y \, Z #X text 59 28 Synopsis: [surface3d]; #X text 13 68 Description: Renders a 3d bicubic curve.; #X text 67 182 size of the control matrix (default : 4 4); -#X text 33 85 The surface3d object renders a curve at the current position -with current color or texture. The shape of the curve is controlled -from a matrix. The curve go throw all control points (between point -1 to res-1); +#X text 33 85 The surface3d object renders a curve at the current position with current color or texture. The shape of the curve is controlled from a matrix. The curve go throw all control points (between point 1 to res-1); #X text 31 388 Inlet 1: normal 0/1; -#X text 51 399 since computing normal use a lot's of processing power -\, you can disable normal with this message; +#X text 51 399 since computing normal use a lot's of processing power \, you can disable normal with this message; #X obj 490 344 s curve3d_render; #X obj 623 343 s curve3d_render; #X obj 580 496 r curve3d_render; #X obj 594 539 loadbang; -#X obj 795 399 cnv 15 150 110 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 795 399 cnv 15 150 110 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 812 434 normal \$1; -#X obj 812 415 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; +#X obj 812 415 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X obj 812 455 s curve3d_render; #X text 33 146 This object is related to curve3d; -#X text 271 4 Create a 3d bicubic curve \, using a matrix of control -points; -#X obj 848 8 declare -lib Gem; -#X connect 11 0 12 0; -#X connect 12 0 11 0; -#X connect 17 0 89 0; -#X connect 18 0 89 0; -#X connect 19 0 89 0; -#X connect 20 0 89 0; -#X connect 21 0 89 0; -#X connect 22 0 89 0; -#X connect 23 0 89 0; -#X connect 24 0 89 0; -#X connect 25 0 89 0; -#X connect 26 0 90 0; -#X connect 27 0 90 0; -#X connect 28 0 90 0; -#X connect 29 0 90 0; -#X connect 30 0 90 0; -#X connect 31 0 41 0; -#X connect 32 0 42 0; -#X connect 33 0 41 0; -#X connect 34 0 42 0; -#X connect 35 0 42 0; -#X connect 36 0 41 0; -#X connect 37 0 41 0; -#X connect 38 0 42 0; -#X connect 46 0 54 0; -#X connect 47 0 53 1; -#X connect 48 0 53 2; -#X connect 49 0 53 3; -#X connect 50 0 54 1; -#X connect 51 0 54 2; -#X connect 52 0 54 3; -#X connect 53 0 79 0; -#X connect 54 0 53 0; -#X connect 55 0 79 0; -#X connect 63 0 70 0; -#X connect 64 0 63 0; -#X connect 65 0 66 0; -#X connect 66 0 71 0; -#X connect 69 0 65 0; -#X connect 79 0 81 0; -#X connect 80 0 81 0; -#X connect 82 0 81 0; -#X connect 91 0 79 0; -#X connect 92 0 82 0; -#X connect 94 0 96 0; -#X connect 95 0 94 0; +#X text 271 4 Create a 3d bicubic curve \, using a matrix of control points; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a 3d bicubic curve.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw res grid set normal; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 848 8 pd META; +#X obj 821 582 gemhead; +#X obj 821 602 world_light; +#X obj 815 515 _gemwin \; 0 \; 0 \; lighting 1; +#X connect 13 0 85 0; +#X connect 14 0 85 0; +#X connect 15 0 85 0; +#X connect 16 0 85 0; +#X connect 17 0 85 0; +#X connect 18 0 85 0; +#X connect 19 0 85 0; +#X connect 20 0 85 0; +#X connect 21 0 85 0; +#X connect 22 0 86 0; +#X connect 23 0 86 0; +#X connect 24 0 86 0; +#X connect 25 0 86 0; +#X connect 26 0 86 0; +#X connect 27 0 37 0; +#X connect 28 0 38 0; +#X connect 29 0 37 0; +#X connect 30 0 38 0; +#X connect 31 0 38 0; +#X connect 32 0 37 0; +#X connect 33 0 37 0; +#X connect 34 0 38 0; +#X connect 42 0 50 0; +#X connect 43 0 49 1; +#X connect 44 0 49 2; +#X connect 45 0 49 3; +#X connect 46 0 50 1; +#X connect 47 0 50 2; +#X connect 48 0 50 3; +#X connect 49 0 75 0; +#X connect 50 0 49 0; +#X connect 51 0 75 0; +#X connect 59 0 66 0; +#X connect 60 0 59 0; +#X connect 61 0 62 0; +#X connect 62 0 67 0; +#X connect 65 0 61 0; +#X connect 75 0 77 0; +#X connect 76 0 77 0; +#X connect 78 0 77 0; +#X connect 87 0 75 0; +#X connect 88 0 78 0; +#X connect 90 0 92 0; +#X connect 91 0 90 0; +#X connect 96 0 97 0; diff --git a/help/teapot-help.pd b/help/teapot-help.pd index 98ccfec20..317b9cf30 100644 --- a/help/teapot-help.pd +++ b/help/teapot-help.pd @@ -1,39 +1,13 @@ #N canvas 312 148 709 361 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 489 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 554 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 559 293 pd gemwin; -#X msg 559 274 create; -#X text 555 253 Create window:; +#X obj 489 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 554 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 495 59 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 236 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 236 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 235 Inlets:; -#X obj 8 176 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 29 275 Inlet 2: float: size; #X text 505 8 GEM object; @@ -43,29 +17,34 @@ #X text 33 14 Synopsis: [teapot]; #X text 7 69 Description: Renders a teapot.; #X text 63 186 size of the teapot; -#X obj 492 111 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 492 111 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 495 118 draw line; #X msg 495 141 draw fill; #X obj 563 84 gemhead; -#X floatatom 581 129 5 -5 5 2 size - -; -#X floatatom 600 161 5 0 20 2 grid - -; +#X floatatom 581 129 5 -5 5 2 size - - 0; +#X floatatom 600 161 5 0 20 2 grid - - 0; #X text 29 289 Inlet 3: float: number of slices; #X text 29 261 Inlet 1: message: draw [line|fill|points]; -#X text 14 130 You can also specify the "number of slices" via the -3rd inlet.; +#X text 14 130 You can also specify the "number of slices" via the 3rd inlet.; #X msg 496 162 draw point; -#X text 15 88 The teapot object renders a teapot at the current position -with current color. The size of the teapot can be changed via the second -inlet.; +#X text 15 88 The teapot object renders a teapot at the current position with current color. The size of the teapot can be changed via the second inlet.; #X obj 563 189 teapot 2 14; #X text 63 200 number of slices; -#X obj 578 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 21 0 31 0; -#X connect 22 0 31 0; -#X connect 23 0 31 0; -#X connect 24 0 31 1; -#X connect 25 0 31 2; -#X connect 29 0 31 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a teapot.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 578 8 pd META; +#X obj 559 257 _gemwin; +#X connect 18 0 28 0; +#X connect 19 0 28 0; +#X connect 20 0 28 0; +#X connect 21 0 28 1; +#X connect 22 0 28 2; +#X connect 26 0 28 0; diff --git a/help/text2d-help.pd b/help/text2d-help.pd index a863f676e..bdaaa1986 100644 --- a/help/text2d-help.pd +++ b/help/text2d-help.pd @@ -1,31 +1,10 @@ -#N canvas 91 80 658 655 10; +#N canvas 948 87 655 703 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 465 65 cnv 15 170 370 empty empty empty 20 12 0 14 #dce4fc #404040 0; -#X obj 465 452 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 470 491 pd gemwin; -#X msg 470 472 create; -#X text 466 451 Create window:; +#X obj 465 65 cnv 15 170 420 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 465 490 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 7 65 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; -#X obj 8 335 cnv 15 450 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 335 cnv 15 450 200 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 340 Inlets:; #X obj 8 295 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 294 Arguments:; @@ -54,17 +33,17 @@ #X text 27 380 Inlet 1: message: text [] : render the given text; #X text 27 395 Inlet 1: message: list [] : render the given text, f 59; #X text 27 410 Inlet 1: message: alias 1|0 : anti-aliasing on/off (default:1), f 66; -#X obj 30 535 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; -#X text 43 539 Note: on some systems it might be necessary to turn rendering ON before loading a font.; +#X obj 30 565 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; +#X text 43 569 Note: on some systems it might be necessary to turn rendering ON before loading a font.; #X text 33 14 Synopsis: [text2d]; #X text 10 123 Any TrueType-font can be rendered. Per default a file "vera.ttf" is searched in the paths. If it is not found you will not see anything unless you load a valid font via the "font"-message. The font-loader uses Pd's search-paths \, so you could specify your path on the command-line and load fonts with just "font times.ttf".; -#X obj 538 530 text3d; -#X text 468 529 see also:; -#X obj 538 553 textextruded; -#X obj 538 576 textoutline; -#X obj 30 591 cnv 15 400 40 empty empty empty 20 12 0 14 #fc8000 #404040 0; -#X text 43 595 Note2: The text will disappear completely once the pivot point of the text moves out of the window; -#X obj 459 591 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 538 560 text3d; +#X text 468 559 see also:; +#X obj 538 583 textextruded; +#X obj 538 606 textoutline; +#X obj 30 621 cnv 15 400 40 empty empty empty 20 12 0 14 #fc8000 #404040 0; +#X text 43 625 Note2: The text will disappear completely once the pivot point of the text moves out of the window; +#X obj 459 621 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #N canvas 822 665 450 369 disappearing 0; #X obj 43 27 inlet; #X obj 43 306 s \$0-X; @@ -102,10 +81,19 @@ #X connect 15 0 16 0; #X connect 16 0 1 0; #X connect 16 1 17 0; -#X restore 459 611 pd disappearing text; +#X restore 459 641 pd disappearing text; #X text 27 454 Inlet 2: float: size (in points) default:20, f 56; #X text 27 425 Inlet 1: message: justify []: horizontal&vertical justification; -#X obj 528 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a line of text; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist font text list alias justify; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 528 8 pd META; #X text 10 94 [text2d] renders a text with the current color \, but without(!) 3D-transformation (like [rotate] or [scale]).; #X obj 479 89 translateXYZ; #X obj 479 398 text2d; @@ -120,27 +108,44 @@ #X obj 540 138 / 10; #X floatatom 545 115 5 0 0 0 - - - 0; #X floatatom 581 116 5 0 0 0 - - - 0; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 17 0 52 0; -#X connect 18 0 53 1; +#X obj 472 493 _gemwin; +#X text 19 509 Outlet 2: information about the text; +#N canvas 15 180 585 372 more_informations 0; +#X text 33 24 for now the outlet 2 outputs for each frame :; +#X text 45 47 - ascender : size over the pivot point (pixels); +#X text 45 66 - descender : size under the pivot point (pixels); +#X text 45 85 - bbox : bounding box of the text; +#X text 59 103 (x1 \, y1 \, z1 \, x2 \, y2 \, z2); +#X text 41 126 - bboxline : line number + bounding box of this specific line, f 62; +#X restore 260 508 pd more_informations; +#X obj 479 428 color 1 0 0; +#X obj 479 449 _textbbox \; width 2; +#X obj 559 452 - 1; +#X obj 559 429 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X connect 14 0 49 0; +#X connect 15 0 50 1; +#X connect 16 0 50 0; +#X connect 17 0 16 0; +#X connect 18 0 50 0; +#X connect 19 0 50 0; #X connect 19 0 53 0; -#X connect 20 0 19 0; -#X connect 21 0 53 0; -#X connect 22 0 53 0; -#X connect 22 0 56 0; -#X connect 23 0 53 0; -#X connect 29 0 53 0; -#X connect 30 0 52 3; -#X connect 31 0 52 1; -#X connect 46 0 47 0; -#X connect 52 0 59 0; -#X connect 54 0 23 0; -#X connect 55 0 20 0; -#X connect 56 0 53 0; -#X connect 57 0 53 0; -#X connect 59 0 60 0; -#X connect 60 0 53 0; -#X connect 61 0 62 0; -#X connect 62 0 60 1; -#X connect 63 0 59 2; +#X connect 20 0 50 0; +#X connect 26 0 50 0; +#X connect 27 0 49 3; +#X connect 28 0 49 1; +#X connect 43 0 44 0; +#X connect 49 0 56 0; +#X connect 50 0 65 0; +#X connect 50 1 66 1; +#X connect 51 0 20 0; +#X connect 52 0 17 0; +#X connect 53 0 50 0; +#X connect 54 0 50 0; +#X connect 56 0 57 0; +#X connect 57 0 50 0; +#X connect 58 0 59 0; +#X connect 59 0 57 1; +#X connect 60 0 56 2; +#X connect 65 0 66 0; +#X connect 67 0 66 2; +#X connect 68 0 67 0; diff --git a/help/text3d-help.pd b/help/text3d-help.pd index c9383f6a6..db1373a50 100644 --- a/help/text3d-help.pd +++ b/help/text3d-help.pd @@ -1,31 +1,10 @@ -#N canvas 108 62 817 669 10; +#N canvas 574 154 822 715 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 465 65 cnv 15 180 510 empty empty empty 20 12 0 14 #dce4fc #404040 0; -#X obj 467 433 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 472 472 pd gemwin; -#X msg 472 453 create; -#X text 468 432 Create window:; +#X obj 465 65 cnv 15 180 600 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 467 531 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 7 65 cnv 15 450 260 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; -#X obj 8 374 cnv 15 450 190 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 374 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 379 Inlets:; #X obj 8 335 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 334 Arguments:; @@ -34,20 +13,20 @@ #X text 9 533 Outlets:; #X text 21 546 Outlet 1: gemlist; #X text 471 47 Example:; -#X obj 468 112 cnv 15 170 310 empty empty empty 20 12 0 14 #14e814 #404040 0; +#X obj 468 112 cnv 15 170 360 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 471 70 gemhead; -#X floatatom 510 379 5 0 100 1 size - - 0; +#X floatatom 510 429 5 0 100 1 size - - 0; #X msg 481 154 font \$1; #X obj 481 135 openpanel; #X obj 481 118 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #X msg 489 180 text hello world!; -#X msg 493 199 1 2 3 4; +#X msg 509 242 1 2 3 4; #X text 7 69 Description: Renders a line of text; #X text 63 346 initial text (defaults to "gem"); #X text 7 248 Justification:; #X text 32 263 horizontal justification can be one of "left" \, "right" \, "center"(default) and "base"(none); #X text 32 293 vertical justification can be one of "top" \, "bottom" \, "middle"(default) and "base"(none); -#X msg 488 246 justify left base; +#X msg 519 289 justify left base; #X floatatom 575 74 5 0 0 0 - - - 0; #X floatatom 534 69 4 0 0 0 - - - 0; #X text 27 405 Inlet 1: message: font <.TTF-file> : load a TrueType-font; @@ -55,43 +34,83 @@ #X text 27 432 Inlet 1: message: list [] : render the given text; #X text 27 475 Inlet 1: message: justify [] : horizontal&vertical justification; #X obj 471 91 rotateXYZ; -#X obj 471 400 text3d; +#X obj 471 450 text3d; #X text 10 94 [text3d] renders one line of a text with the current color \, and all 3D-transformation; #X text 33 14 Synopsis: [text3d]; -#X obj 30 611 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; -#X text 43 615 Note: on some systems it might be necessary to turn rendering ON before loading a font.; -#X msg 499 221 string 48 49 32 51 52; +#X obj 30 641 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; +#X text 43 645 Note: on some systems it might be necessary to turn rendering ON before loading a font.; +#X msg 515 264 string 48 49 32 51 52; #X text 27 444 Inlet 1: message: string [] : render the given text \, given as a list of unicode code points (similar to ASCII); #X text 10 123 Any TrueType-font can be rendered. Per default a file "vera.ttf" is searched in the paths. If it is not found you will not see anything unless you load a valid font via the "font"-message. The font-loader uses Pd's search-paths \, so you could specify your path on the command-line and load fonts with just "font times.ttf".; -#X obj 541 509 text2d; -#X text 470 507 see also:; -#X obj 541 532 textextruded; -#X obj 541 555 textoutline; +#X obj 541 597 text2d; +#X text 470 595 see also:; +#X obj 541 620 textextruded; +#X obj 541 643 textoutline; #X text 27 514 Inlet 2: float: size (in points) (default:20); -#X obj 528 8 declare -lib Gem; -#X msg 506 273 string 20320 10 22909 10 19990 10 30028, f 17; -#X msg 503 327 text مرحبا بالعالم; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a line of text; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist font text list string justify alias; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 528 8 pd META; +#X msg 522 316 string 20320 10 22909 10 19990 10 30028, f 17; +#X msg 521 366 text مرحبا بالعالم; #X text 15 204 Note that text is rendered using only the given font. Therefore \, your font must have the glyphs you want to display (or you will only see placeholders); #X text 27 502 Inlet 1: message: alias 1|0 : anti-aliasing on/off (default:1), f 66; -#X msg 503 352 alias \$1; -#X obj 562 352 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; -#X obj 30 567 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; -#X text 43 571 Note: changing the fontsize will re-generate the glyphs \, which can be slow. [scale] is much faster.; +#X msg 518 393 alias \$1; +#X obj 577 393 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 30 597 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; +#X text 43 601 Note: changing the fontsize will re-generate the glyphs \, which can be slow. [scale] is much faster.; +#X obj 473 538 _gemwin; +#X text 21 561 Outlet 2: information about the text; +#N canvas 15 180 585 372 more_informations 0; +#X text 33 24 for now the outlet 2 outputs for each frame :; +#X text 45 47 - ascender : size over the pivot point (pixels); +#X text 45 66 - descender : size under the pivot point (pixels); +#X text 45 85 - bbox : bounding box of the text; +#X text 59 103 (x1 \, y1 \, z1 \, x2 \, y2 \, z2); +#X text 41 126 - bboxline : line number + bounding box of this specific line, f 62; +#X restore 262 560 pd more_informations; +#X obj 471 477 color 1 0 0; +#X obj 471 498 _textbbox \; width 2; +#X obj 551 478 hradio 18 1 0 4 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0; +#X obj 551 501 - 1; +#N canvas 735 461 450 300 multiline 0; +#X obj 100 101 bng 18 250 50 0 \$0-multiline \$0-multiline empty 0 -9 0 10 #fcfcfc #000000 #000000; +#X obj 240 192 outlet; +#X obj 242 95 r \$0-multiline; +#X msg 242 118 10; +#X obj 240 142 makefilename %c; +#X msg 240 165 text multi\$1line; +#X connect 2 0 3 0; #X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 17 0 36 0; -#X connect 18 0 37 1; -#X connect 19 0 37 0; -#X connect 20 0 19 0; -#X connect 21 0 20 0; -#X connect 22 0 37 0; -#X connect 23 0 37 0; -#X connect 29 0 37 0; -#X connect 30 0 36 3; -#X connect 31 0 36 1; -#X connect 36 0 37 0; -#X connect 42 0 37 0; -#X connect 51 0 37 0; -#X connect 52 0 37 0; -#X connect 55 0 37 0; -#X connect 56 0 55 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X coords 0 -1 1 1 85 20 1 100 100; +#X restore 502 210 pd multiline; +#X connect 14 0 33 0; +#X connect 15 0 34 1; +#X connect 16 0 34 0; +#X connect 17 0 16 0; +#X connect 18 0 17 0; +#X connect 19 0 34 0; +#X connect 20 0 34 0; +#X connect 26 0 34 0; +#X connect 27 0 33 3; +#X connect 28 0 33 1; +#X connect 33 0 34 0; +#X connect 34 0 59 0; +#X connect 34 1 60 1; +#X connect 39 0 34 0; +#X connect 48 0 34 0; +#X connect 49 0 34 0; +#X connect 52 0 34 0; +#X connect 53 0 52 0; +#X connect 59 0 60 0; +#X connect 61 0 62 0; +#X connect 62 0 60 2; +#X connect 63 0 34 0; diff --git a/help/textextruded-help.pd b/help/textextruded-help.pd index 4256fa5b2..1eb53de56 100644 --- a/help/textextruded-help.pd +++ b/help/textextruded-help.pd @@ -1,31 +1,10 @@ -#N canvas 26 90 645 670 10; +#N canvas 547 139 647 697 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 466 65 cnv 15 170 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; -#X obj 466 341 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 471 380 pd gemwin; -#X msg 471 361 create; -#X text 467 340 Create window:; +#X obj 466 65 cnv 15 170 330 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 466 451 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 7 65 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; -#X obj 8 336 cnv 15 450 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 336 cnv 15 450 190 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 341 Inlets:; #X obj 8 295 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 294 Arguments:; @@ -56,35 +35,61 @@ #X text 27 394 Inlet 1: message: list [] : render the given text; #X text 27 428 Inlet 1: message: justify [] : horizontal&vertical justification; #X obj 472 89 rotateXYZ; -#X obj 20 573 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; -#X text 33 577 Note: on some systems it might be necessary to turn rendering ON before loading a font.; +#X obj 20 583 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; +#X text 33 587 Note: on some systems it might be necessary to turn rendering ON before loading a font.; #X obj 472 308 textextruded; #X text 33 14 Synopsis: [textextruded]; #X msg 497 268 depth \$1; #X floatatom 497 249 5 0 0 1 depth - - 0; #X text 10 94 [textextruded] renders one line of a extruded text with the current color \, and all 3D-transformation; #X text 27 408 Inlet 1: message: depth : extrusion depth; -#X obj 20 618 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; -#X text 32 623 Note: GEM needs to be compiled with FTGL-support for this to work; -#X text 472 418 see also:; -#X obj 545 418 text2d; -#X obj 592 418 text3d; +#X obj 20 628 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; +#X text 32 633 Note: GEM needs to be compiled with FTGL-support for this to work; +#X text 472 528 see also:; +#X obj 545 528 text2d; +#X obj 592 528 text3d; #X text 27 457 Inlet 2: float: size (in points). (default:20); -#X obj 531 8 declare -lib Gem; -#X obj 20 527 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; -#X text 33 531 Note: changing the fontsize will re-generate the glyphs \, which can be slow. [scale] is much faster.; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 17 0 37 0; -#X connect 18 0 40 1; -#X connect 19 0 40 0; -#X connect 20 0 19 0; -#X connect 21 0 20 0; -#X connect 22 0 40 0; -#X connect 23 0 40 0; -#X connect 30 0 40 0; -#X connect 31 0 37 3; -#X connect 32 0 37 1; -#X connect 37 0 40 0; -#X connect 42 0 40 0; -#X connect 43 0 42 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a line of text; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist font text list depth justify; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 531 8 pd META; +#X obj 20 537 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; +#X text 33 541 Note: changing the fontsize will re-generate the glyphs \, which can be slow. [scale] is much faster.; +#X obj 472 454 _gemwin; +#X text 20 504 Outlet 2: information about the text; +#N canvas 15 180 585 372 more_informations 0; +#X text 33 24 for now the outlet 2 outputs for each frame :; +#X text 45 47 - ascender : size over the pivot point (pixels); +#X text 45 66 - descender : size under the pivot point (pixels); +#X text 45 85 - bbox : bounding box of the text; +#X text 59 103 (x1 \, y1 \, z1 \, x2 \, y2 \, z2); +#X text 41 126 - bboxline : line number + bounding box of this specific line, f 62; +#X restore 261 503 pd more_informations; +#X obj 472 337 color 1 0 0; +#X obj 472 358 _textbbox \; width 2; +#X obj 552 361 - 1; +#X obj 552 338 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X connect 14 0 34 0; +#X connect 15 0 37 1; +#X connect 16 0 37 0; +#X connect 17 0 16 0; +#X connect 18 0 17 0; +#X connect 19 0 37 0; +#X connect 20 0 37 0; +#X connect 27 0 37 0; +#X connect 28 0 34 3; +#X connect 29 0 34 1; +#X connect 34 0 37 0; +#X connect 37 0 55 0; +#X connect 37 1 56 1; +#X connect 39 0 37 0; +#X connect 40 0 39 0; +#X connect 55 0 56 0; +#X connect 57 0 56 2; +#X connect 58 0 57 0; diff --git a/help/textoutline-help.pd b/help/textoutline-help.pd index 136ce6f2f..68b3fa3f3 100644 --- a/help/textoutline-help.pd +++ b/help/textoutline-help.pd @@ -1,29 +1,8 @@ -#N canvas 26 90 653 630 10; +#N canvas 166 150 653 630 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 466 66 cnv 15 170 270 empty empty empty 20 12 0 14 #dce4fc #404040 0; -#X obj 468 346 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 473 385 pd gemwin; -#X msg 473 366 create; -#X text 469 345 Create window:; +#X obj 466 66 cnv 15 170 330 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 468 446 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 7 65 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X obj 8 335 cnv 15 450 180 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 340 Inlets:; @@ -61,24 +40,50 @@ #X text 43 576 Note: on some systems it might be necessary to turn rendering ON before loading a font.; #X obj 474 312 textoutline; #X text 10 94 [textoutline] renders one line of a outlined text with the current color \, and all 3D-transformation; -#X text 473 421 see also:; -#X obj 487 486 textextruded; -#X obj 489 441 text2d; -#X obj 488 463 text3d; +#X text 473 521 see also:; +#X obj 487 586 textextruded; +#X obj 489 541 text2d; +#X obj 488 563 text3d; #X text 27 446 Inlet 2: float: size (in points). (default:20); -#X obj 528 8 declare -lib Gem; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a line of text; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist font text list justify; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 528 8 pd META; #X obj 30 527 cnv 15 400 40 empty empty empty 20 12 0 14 #fce0c0 #404040 0; #X text 43 531 Note: changing the fontsize will re-generate the glyphs \, which can be slow. [scale] is much faster.; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 17 0 37 0; -#X connect 18 0 41 1; -#X connect 19 0 41 0; -#X connect 20 0 19 0; -#X connect 21 0 20 0; -#X connect 22 0 41 0; -#X connect 23 0 41 0; -#X connect 30 0 41 0; -#X connect 31 0 37 3; -#X connect 32 0 37 1; -#X connect 37 0 41 0; +#X obj 472 453 _gemwin; +#X text 21 495 Outlet 2: information about the text; +#N canvas 15 180 585 372 more_informations 0; +#X text 33 24 for now the outlet 2 outputs for each frame :; +#X text 45 47 - ascender : size over the pivot point (pixels); +#X text 45 66 - descender : size under the pivot point (pixels); +#X text 45 85 - bbox : bounding box of the text; +#X text 59 103 (x1 \, y1 \, z1 \, x2 \, y2 \, z2); +#X text 41 126 - bboxline : line number + bounding box of this specific line, f 62; +#X restore 262 494 pd more_informations; +#X obj 474 337 color 1 0 0; +#X obj 474 358 _textbbox \; width 2; +#X obj 554 361 - 1; +#X obj 554 338 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X connect 14 0 34 0; +#X connect 15 0 38 1; +#X connect 16 0 38 0; +#X connect 17 0 16 0; +#X connect 18 0 17 0; +#X connect 19 0 38 0; +#X connect 20 0 38 0; +#X connect 27 0 38 0; +#X connect 28 0 34 3; +#X connect 29 0 34 1; +#X connect 34 0 38 0; +#X connect 38 0 51 0; +#X connect 38 1 52 1; +#X connect 51 0 52 0; +#X connect 53 0 52 2; +#X connect 54 0 53 0; diff --git a/help/torus-help.pd b/help/torus-help.pd index 9ee350510..24e73c3b7 100644 --- a/help/torus-help.pd +++ b/help/torus-help.pd @@ -1,75 +1,54 @@ #N canvas 279 150 677 369 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 489 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 554 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 559 293 pd gemwin; -#X msg 559 274 create; -#X text 555 253 Create window:; +#X obj 489 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 554 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 495 59 Example:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 236 cnv 15 450 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 236 cnv 15 450 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 237 Inlets:; -#X obj 8 176 cnv 15 450 55 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 55 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 29 277 Inlet 2: float: size; #X text 482 8 GEM object; #X text 29 249 Inlet 1: gemlist; #X text 11 326 Outlets:; #X text 23 339 Outlet 1: gemlist; -#X obj 492 111 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 492 111 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 495 118 draw line; #X msg 495 141 draw fill; #X obj 563 84 gemhead; -#X floatatom 573 116 5 -5 5 2 size - -; -#X floatatom 583 144 5 0 20 2 slices - -; +#X floatatom 573 116 5 -5 5 2 size - - 0; +#X floatatom 583 144 5 0 20 2 slices - - 0; #X text 29 291 Inlet 3: float: number of slices; #X text 29 263 Inlet 1: message: draw [line|fill|points]; -#X text 14 130 You can also specify the "number of slices" via the -3rd inlet.; +#X text 14 130 You can also specify the "number of slices" via the 3rd inlet.; #X msg 496 162 draw point; #X text 33 14 Synopsis: [torus]; #X text 63 186 size of the torus; #X text 7 69 Description: Renders a torus.; -#X text 15 88 The torus object renders a torus (aka: doughnut) at the -current position with current color. The size of the torus can be changed -via the second inlet.; -#X floatatom 593 171 5 0 20 2 thickness - -; +#X text 15 88 The torus object renders a torus (aka: doughnut) at the current position with current color. The size of the torus can be changed via the second inlet.; +#X floatatom 593 171 5 0 20 2 thickness - - 0; #X obj 563 189 torus 1; #X text 63 199 # of slices; #X text 62 214 thickness (R-r); #X text 29 307 Inlet 3: float: thickness of the torus (R-r); -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 32 0; -#X connect 19 0 32 0; -#X connect 20 0 32 0; -#X connect 21 0 32 1; -#X connect 22 0 32 2; -#X connect 26 0 32 0; -#X connect 31 0 32 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a torus.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 561 261 _gemwin; +#X connect 15 0 29 0; +#X connect 16 0 29 0; +#X connect 17 0 29 0; +#X connect 18 0 29 1; +#X connect 19 0 29 2; +#X connect 23 0 29 0; +#X connect 28 0 29 3; diff --git a/help/translate-help.pd b/help/translate-help.pd index 4bec04968..c1d45e0d7 100644 --- a/help/translate-help.pd +++ b/help/translate-help.pd @@ -1,55 +1,27 @@ #N canvas 22 88 639 383 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 218 Inlets:; #X text 63 231 Inlet 1: gemlist; #X text 39 282 Outlets:; #X text 57 295 Outlet 1: gemlist; -#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 71 31 Class: manipulation object; -#X obj 454 108 cnv 15 160 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 454 108 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 455 84 gemhead; #X obj 455 216 square; -#X floatatom 485 140 5 0 0 2 amount - -; +#X floatatom 485 140 5 0 0 2 amount - - 0; #X msg 570 150 0 1 1; #X text 50 12 Synopsis: [translate]; #X msg 548 128 0.1 0 0; #X text 29 77 Description: translation; -#X text 41 91 translate accepts a gemList and changes the current transformation -matrix by the specified translation; +#X text 41 91 translate accepts a gemList and changes the current transformation matrix by the specified translation; #X text 36 122 the a*(x y z) vector determines the translation; #X text 63 166 1st argument: translation scale; #X text 63 179 2nd-4th argument: translation-axis (XYZ); @@ -58,11 +30,20 @@ matrix by the specified translation; #X obj 455 175 translate 0.1 1 1 0; #X text 35 332 see also:; #X obj 99 333 translateXYZ; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 30 0; -#X connect 19 0 30 1; -#X connect 20 0 30 2; -#X connect 22 0 30 2; -#X connect 30 0 18 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION translation; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 list; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 261 _gemwin; +#X connect 14 0 27 0; +#X connect 16 0 27 1; +#X connect 17 0 27 2; +#X connect 19 0 27 2; +#X connect 27 0 15 0; diff --git a/help/translateXYZ-help.pd b/help/translateXYZ-help.pd index 8d513ccd4..7683359ed 100644 --- a/help/translateXYZ-help.pd +++ b/help/translateXYZ-help.pd @@ -1,68 +1,50 @@ #N canvas 57 61 639 383 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 206 cnv 15 430 120 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 39 213 Inlets:; #X text 63 226 Inlet 1: gemlist; #X text 39 287 Outlets:; #X text 57 300 Outlet 1: gemlist; -#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 430 40 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; -#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 8 76 cnv 15 430 70 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 519 293 pd gemwin; -#X msg 519 274 create; -#X text 515 253 Create window:; +#X obj 514 254 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 71 31 Class: manipulation object; -#X obj 454 108 cnv 15 160 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 454 108 cnv 15 160 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 457 84 gemhead; #X obj 457 218 square; -#X floatatom 497 122 3 -4 4 0 X - -; +#X floatatom 497 122 3 -4 4 0 X - - 0; #X text 29 77 Description: translation; #X obj 457 178 translateXYZ 1 2 0; -#X floatatom 537 139 3 -4 4 0 Y - -; -#X floatatom 578 154 3 -16 3 0 Z - -; +#X floatatom 537 139 3 -4 4 0 Y - - 0; +#X floatatom 578 154 3 -16 3 0 Z - - 0; #X text 36 122 the translation is determined by a vector (X Y Z); #X text 60 174 1st-3rd argument: translation vector (XYZ); #X text 63 241 Inlet 2: float: translation along X-axis; #X text 63 266 Inlet 4: float: translation along Z-axis; #X text 63 254 Inlet 3: float: translation along Y-axis; #X text 50 12 Synopsis: [translateXYZ]; -#X text 41 91 [translateXYZ] accepts a gemList and changes the current -transformation matrix by the specified translation; +#X text 41 91 [translateXYZ] accepts a gemList and changes the current transformation matrix by the specified translation; #X text 23 333 see also:; #X obj 85 334 translate; -#X obj 518 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 17 0 21 0; -#X connect 19 0 21 1; -#X connect 21 0 18 0; -#X connect 22 0 21 2; -#X connect 23 0 21 3; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION translation; +#X text 10 65 KEYWORDS Gem openGL transformation; +#X text 20 85 INLET_0 gemlist; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 float; +#X text 20 165 OUTLET_0 gemlist; +#X text 10 185 AUTHOR IOhannes m zmölnig; +#X text 10 205 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 520 260 _gemwin; +#X connect 14 0 18 0; +#X connect 16 0 18 1; +#X connect 18 0 15 0; +#X connect 19 0 18 2; +#X connect 20 0 18 3; diff --git a/help/trapezoid-help.pd b/help/trapezoid-help.pd index c8cf5a86b..f7576c0aa 100644 --- a/help/trapezoid-help.pd +++ b/help/trapezoid-help.pd @@ -1,72 +1,51 @@ #N canvas 6 61 673 358 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 489 87 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 554 264 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 559 303 pd gemwin; -#X msg 559 284 create; -#X text 555 263 Create window:; +#X obj 489 87 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 554 264 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 495 69 Example:; -#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 130 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 65 cnv 15 450 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 130 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 156 cnv 15 450 50 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 155 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 472 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 310 Outlets:; #X text 21 323 Outlet 1: gemlist; -#X obj 492 122 cnv 15 160 120 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 492 122 cnv 15 160 120 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 495 135 draw line; #X msg 495 156 draw fill; #X msg 495 178 draw point; #X obj 549 94 gemhead; -#X floatatom 587 174 5 0 0 0 - - -; -#X floatatom 600 202 5 0 0 0 - - -; +#X floatatom 587 174 5 0 0 0 - - - 0; +#X floatatom 600 202 5 0 0 0 - - - 0; #X text 587 158 size; #X text 600 186 top line; #X text 33 14 Synopsis: [trapezoid]; #X text 7 69 Description: Renders a trapezoid box.; -#X text 15 86 The trapezoid object renders a trapezoid (box) at the -current position with current color. The dimensions and shape of the -trapezoid can be changed via the last two inlets.; +#X text 15 86 The trapezoid object renders a trapezoid (box) at the current position with current color. The dimensions and shape of the trapezoid can be changed via the last two inlets.; #X text 63 167 dimensions of the trapezoid (size topline); #X text 65 181 default: 1 1; #X text 27 260 Inlet 2: float: size; -#X text 27 275 Inlet 3: float: length of top line \, relative to the -size; +#X text 27 275 Inlet 3: float: length of top line \, relative to the size; #X obj 549 225 trapezoid 1 0.7; -#X obj 548 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 18 0 33 0; -#X connect 19 0 33 0; -#X connect 20 0 33 0; -#X connect 21 0 33 0; -#X connect 22 0 33 1; -#X connect 23 0 33 2; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a trapezoid box.; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 OUTLET_0 gemlist; +#X text 10 165 AUTHOR IOhannes m zmölnig; +#X text 10 185 LICENSE GPL v2; +#X restore 548 8 pd META; +#X obj 560 271 _gemwin; +#X connect 15 0 30 0; +#X connect 16 0 30 0; +#X connect 17 0 30 0; +#X connect 18 0 30 0; +#X connect 19 0 30 1; +#X connect 20 0 30 2; diff --git a/help/triangle-help.pd b/help/triangle-help.pd index 475b95b79..28dafc4fd 100644 --- a/help/triangle-help.pd +++ b/help/triangle-help.pd @@ -1,38 +1,12 @@ #N canvas 289 160 710 345 10; #X declare -lib Gem; #X text 54 30 Class: geometric object; -#X obj 489 57 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 554 234 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 559 273 pd gemwin; -#X msg 559 254 create; -#X text 555 233 Create window:; -#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 489 57 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 554 234 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 8 216 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 9 221 Inlets:; -#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 175 Arguments:; #X text 27 247 Inlet 1: message: draw [line|fill|point]; #X text 27 261 Inlet 2: float: size; @@ -41,27 +15,31 @@ #X text 9 280 Outlets:; #X text 21 293 Outlet 1: gemlist; #X text 495 39 Example:; -#X obj 492 88 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 492 88 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 495 95 draw line; #X msg 495 116 draw fill; #X msg 495 138 draw point; #X obj 563 64 gemhead; -#X floatatom 594 124 5 0 0 0 - - -; +#X floatatom 594 124 5 0 0 0 - - - 0; #X text 594 108 size; #X text 63 186 size of the triangle; #X text 33 14 Synopsis: [triangle]; #X obj 563 168 triangle 2; #X text 7 69 Description: Renders an isosceles triangle; -#X text 16 86 The [triangle] object renders an equal-sided (where the -height equals the base) triangle at the current position with current -color. The size of the triangle can be changed via the second inlet. -; -#X obj 588 8 declare -lib Gem; -#X connect 3 0 4 0; -#X connect 4 0 3 0; -#X connect 19 0 27 0; -#X connect 20 0 27 0; -#X connect 21 0 27 0; -#X connect 22 0 27 0; -#X connect 23 0 27 1; +#X text 16 86 The [triangle] object renders an equal-sided (where the height equals the base) triangle at the current position with current color. The size of the triangle can be changed via the second inlet.; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders an isosceles triangle; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw; +#X text 20 105 INLET_1 float; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 588 8 pd META; +#X obj 561 241 _gemwin; +#X connect 16 0 24 0; +#X connect 17 0 24 0; +#X connect 18 0 24 0; +#X connect 19 0 24 0; +#X connect 20 0 24 1; diff --git a/help/tube-help.pd b/help/tube-help.pd index f70838df1..3479878f0 100644 --- a/help/tube-help.pd +++ b/help/tube-help.pd @@ -1,67 +1,36 @@ -#N canvas 56 109 754 622 10; +#N canvas 436 84 754 622 10; #X declare -lib Gem; #X text 44 383 default = D1 and D2; #X text 54 27 Class: geometric object; -#X obj 479 47 cnv 15 250 550 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 484 533 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 454 304 gemwin 0; -#X obj 131 164 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 198 112 destroy; -#X msg 131 140 create \, 1 \, lighting 1; -#X obj 298 149 world_light; -#X obj 298 122 gemhead; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 9 0 8 0; -#X restore 489 572 pd gemwin; -#X msg 489 550 create; -#X text 485 532 Create window:; +#X obj 479 47 cnv 15 250 550 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 485 29 Example:; -#X obj 7 47 cnv 15 450 90 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 7 286 cnv 15 450 260 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 47 cnv 15 450 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 7 286 cnv 15 450 260 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 18 291 Inlets:; #X text 26 323 Inlet 1: message: draw [line|fill|point]; #X text 552 8 GEM object; #X text 26 308 Inlet 1: gemlist; #X text 8 498 Outlets:; #X text 19 511 Outlet 1: gemlist; -#X obj 484 141 cnv 15 240 380 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 484 141 cnv 15 240 380 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 494 54 gemhead; -#X floatatom 543 84 5 0 0 0 - - -; -#X obj 7 146 cnv 15 450 130 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X floatatom 543 84 5 0 0 0 - - - 0; +#X obj 7 146 cnv 15 450 130 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X obj 494 111 rotateXYZ 135 0 0; #X msg 519 166 draw line; #X msg 528 188 draw fill; #X msg 537 210 width 1; #X msg 545 232 width 10; -#X floatatom 568 306 5 0 0 1 D1 - -; +#X floatatom 568 306 5 0 0 1 D1 - - 0; #X msg 510 144 draw point; -#X floatatom 578 325 5 0 0 1 D2 - -; -#X floatatom 588 344 5 0 0 1 H - -; -#X floatatom 598 363 5 0 0 1 Tx - -; -#X floatatom 606 382 5 0 0 1 Ty - -; -#X floatatom 614 401 5 0 0 1 R1x - -; -#X floatatom 623 420 5 0 0 1 R1y - -; -#X floatatom 632 439 5 0 0 1 R2x - -; -#X floatatom 641 458 5 0 0 1 R2y - -; +#X floatatom 578 325 5 0 0 1 D2 - - 0; +#X floatatom 588 344 5 0 0 1 H - - 0; +#X floatatom 598 363 5 0 0 1 Tx - - 0; +#X floatatom 606 382 5 0 0 1 Ty - - 0; +#X floatatom 614 401 5 0 0 1 R1x - - 0; +#X floatatom 623 420 5 0 0 1 R1y - - 0; +#X floatatom 632 439 5 0 0 1 R2x - - 0; +#X floatatom 641 458 5 0 0 1 R2y - - 0; #X obj 494 496 tube 0.5 0.9 2.5 30; #X text 33 11 Synopsis: [tube]; #X text 7 51 Description: Renders a complex tube; @@ -77,37 +46,53 @@ #X text 26 448 Inlet 8: Y rotation of 1st circle; #X text 26 480 Inlet 10: Y rotation of 2nd circle; #X text 26 465 Inlet 9: X rotation of 2nd circle; -#X floatatom 598 84 5 0 0 0 - - -; -#X floatatom 654 84 5 0 0 0 - - -; +#X floatatom 598 84 5 0 0 0 - - - 0; +#X floatatom 654 84 5 0 0 0 - - - 0; #X msg 558 278 numslices \$1; -#X floatatom 558 257 5 0 100 1 - - -; +#X floatatom 558 257 5 0 100 1 - - - 0; #X text 26 338 Inlet 1: message: numslices <#>; -#X text 7 72 The tube object generates a shape defined by 2 circles. -These 2 circles can be rotated and translated independently to create -different shapes.; +#X text 7 72 The tube object generates a shape defined by 2 circles. These 2 circles can be rotated and translated independently to create different shapes.; #X text 63 217 4 : number of segments; #X text 63 199 3 : height of the tube; -#X obj 628 8 declare -lib Gem; -#X connect 4 0 5 0; -#X connect 5 0 4 0; -#X connect 17 0 20 0; -#X connect 18 0 20 1; -#X connect 20 0 35 0; -#X connect 21 0 35 0; -#X connect 22 0 35 0; -#X connect 23 0 35 0; -#X connect 24 0 35 0; -#X connect 25 0 35 1; -#X connect 26 0 35 0; -#X connect 27 0 35 2; -#X connect 28 0 35 3; -#X connect 29 0 35 4; -#X connect 30 0 35 5; -#X connect 31 0 35 6; -#X connect 32 0 35 7; -#X connect 33 0 35 8; -#X connect 34 0 35 9; -#X connect 50 0 20 2; -#X connect 51 0 20 3; -#X connect 52 0 35 0; -#X connect 53 0 52 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION Renders a complex tube; +#X text 10 65 KEYWORDS Gem openGL shape; +#X text 20 85 INLET_0 gemlist draw numslices; +#X text 20 105 INLET_1 float; +#X text 20 125 INLET_2 float; +#X text 20 145 INLET_3 height; +#X text 20 165 INLET_4 float; +#X text 20 185 INLET_5 float; +#X text 20 205 INLET_6 float; +#X text 20 225 INLET_7 float; +#X text 20 245 INLET_8 float; +#X text 20 265 OUTLET_0 gemlist; +#X text 10 285 AUTHOR IOhannes m zmölnig; +#X text 10 305 LICENSE GPL v2; +#X restore 628 8 pd META; +#X obj 513 527 _gemwin \; 0 \; 0 \; lighting 1; +#X obj 622 530 gemhead; +#X obj 622 553 world_light; +#X connect 13 0 16 0; +#X connect 14 0 16 1; +#X connect 16 0 31 0; +#X connect 17 0 31 0; +#X connect 18 0 31 0; +#X connect 19 0 31 0; +#X connect 20 0 31 0; +#X connect 21 0 31 1; +#X connect 22 0 31 0; +#X connect 23 0 31 2; +#X connect 24 0 31 3; +#X connect 25 0 31 4; +#X connect 26 0 31 5; +#X connect 27 0 31 6; +#X connect 28 0 31 7; +#X connect 29 0 31 8; +#X connect 30 0 31 9; +#X connect 46 0 16 2; +#X connect 47 0 16 3; +#X connect 48 0 31 0; +#X connect 49 0 48 0; +#X connect 56 0 57 0; diff --git a/help/vertex_program-help.pd b/help/vertex_program-help.pd index ac6866762..33c78faf1 100644 --- a/help/vertex_program-help.pd +++ b/help/vertex_program-help.pd @@ -1,46 +1,18 @@ #N canvas 35 199 631 458 10; #X declare -lib Gem; #X text 452 8 GEM object; -#X obj 8 335 cnv 15 430 80 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 8 335 cnv 15 430 80 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 11 336 Inlets:; #X text 10 386 Outlets:; -#X obj 8 296 cnv 15 430 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 296 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 295 Arguments:; -#X obj 7 76 cnv 15 430 210 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 -228992 -66577 -0; +#X obj 7 76 cnv 15 430 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0; #X text 453 60 Example:; -#X obj 474 334 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 0 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 132 112 create \, 1; -#X msg 198 112 destroy; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 3 1 7 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X restore 479 373 pd gemwin; -#X msg 479 354 create; -#X text 475 333 Create window:; -#X obj 450 158 cnv 15 160 70 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 474 334 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 450 158 cnv 15 160 70 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 451 84 gemhead; -#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 -262144 --1 -1; +#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 587 366 image 0; #X obj 77 48 inlet; #X obj 77 344 outlet; @@ -60,15 +32,12 @@ #X text 516 105 open an image; #X text 509 118 (JPEG \, TIFF \, ..); #X obj 451 136 pix_texture; -#X obj 10 211 cnv 15 420 70 empty empty empty 20 12 0 14 -225280 -66577 -0; +#X obj 10 211 cnv 15 420 70 empty empty empty 20 12 0 14 #d8fcfc #404040 0; #X text 50 12 Synopsis: [vertex_program]; #X text 71 31 Class: shader object; #X text 13 76 Description: set the ARB vertex shader; -#X text 24 95 [vertex_program] loads and applies an ARB (or NV) vertex -shader.; -#X obj 520 164 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; +#X text 24 95 [vertex_program] loads and applies an ARB (or NV) vertex shader.; +#X obj 520 164 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000; #N canvas 0 0 450 300 open 0; #X obj 75 103 openpanel; #X obj 75 173 outlet; @@ -82,23 +51,17 @@ shader.; #X connect 4 0 0 0; #X restore 463 163 pd open; #X msg 463 183 open examples/data/toon.vp; -#X obj 450 252 cnv 15 160 30 empty empty empty 20 12 0 14 -102041 -66577 -0; +#X obj 450 252 cnv 15 160 30 empty empty empty 20 12 0 14 #60e860 #404040 0; #N canvas 0 0 752 303 parameter 0; #X obj 81 44 inlet; #X obj 81 270 outlet; -#X obj 241 47 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 0 256; -#X obj 288 64 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 35 256; -#X obj 328 82 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 1 256; +#X obj 241 47 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 288 64 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 328 82 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 #fcfcfc #000000 #000000 0 256; #X obj 288 101 t b f; #X obj 328 101 t b f; -#X obj 149 230 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 34336 256; -#X obj 217 162 nbx 5 14 -1e+37 1e+37 0 0 empty empty parameter# 0 -6 -0 10 -262144 -1 -1 0 256; +#X obj 149 230 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 #fcfcfc #000000 #000000 0 256; +#X obj 217 162 nbx 5 14 -1e+37 1e+37 0 0 empty empty parameter# 0 -6 0 10 #fcfcfc #000000 #000000 0 256; #X obj 81 248 GEMglProgramEnvParameter4fvARB; #X obj 88 175 loadbang; #X obj 88 207 GLdefine GL_VERTEX_PROGRAM_ARB; @@ -128,8 +91,7 @@ shader.; #X restore 217 25 pd defaults; #X msg 217 8 default; #X obj 286 121 pack 0 35 1 0; -#X text 301 250 "glProgramEnvParameter" to work on "GL_VERTEX_PROGRAM_ARB" -; +#X text 301 250 "glProgramEnvParameter" to work on "GL_VERTEX_PROGRAM_ARB"; #X text 301 158 which parameter we want to modify; #X text 398 122 the values for the parameter; #X connect 0 0 9 0; @@ -152,29 +114,30 @@ shader.; #X connect 14 0 13 0; #X connect 15 0 9 3; #X restore 451 256 pd parameter; -#X text 11 123 If you want to modify the parameters of the shader-program -\, you have to set the modification up yourself \, via [GEMglProgramEnvParameter*] -working on GL_VERTEX_PROGRAM_ARB.; -#X text 14 219 IMPORTANT NOTE: your openGL-implementation (gfx-card -driver \, ...) has to support either (or both) the ARB shader extensions -or the NV shader extensions in order to make use of this object.; -#X text 10 176 Of course \, you also have to supply anything else needed -for the shader to work (like textures \, ...); -#X text 35 362 Inlet 1: message: open : vertex shader program -to load; +#X text 11 123 If you want to modify the parameters of the shader-program \, you have to set the modification up yourself \, via [GEMglProgramEnvParameter*] working on GL_VERTEX_PROGRAM_ARB.; +#X text 14 219 IMPORTANT NOTE: your openGL-implementation (gfx-card driver \, ...) has to support either (or both) the ARB shader extensions or the NV shader extensions in order to make use of this object.; +#X text 10 176 Of course \, you also have to supply anything else needed for the shader to work (like textures \, ...); +#X text 35 362 Inlet 1: message: open : vertex shader program to load; #X obj 451 296 teapot; #X obj 453 422 fragment_program; #X text 451 405 see also:; #X obj 451 206 vertex_program toon.vp; -#X obj 518 8 declare -lib Gem; -#X connect 10 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 22 0; -#X connect 22 0 40 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 30 0 40 0; -#X connect 32 0 37 0; -#X connect 40 0 32 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION set the ARB vertex shader; +#X text 10 65 KEYWORDS Gem openGL shader; +#X text 20 85 INLET_0 gemlist open; +#X text 20 105 OUTLET_0 gemlist; +#X text 10 125 AUTHOR IOhannes m zmölnig; +#X text 10 145 LICENSE GPL v2; +#X restore 518 8 pd META; +#X obj 479 340 _gemwin; +#X connect 11 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 19 0; +#X connect 19 0 37 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 37 0; +#X connect 29 0 34 0; +#X connect 37 0 29 0; diff --git a/help/world_light-help.pd b/help/world_light-help.pd index a2ffeb0eb..ae60eb940 100644 --- a/help/world_light-help.pd +++ b/help/world_light-help.pd @@ -1,98 +1,65 @@ #N canvas 265 153 653 455 10; #X declare -lib Gem; #X text 475 59 Example:; -#X obj 7 64 cnv 15 450 200 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 7 317 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 -0; +#X obj 7 64 cnv 15 450 200 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; +#X obj 7 317 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0; #X text 26 322 Inlets:; -#X obj 8 276 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 -0; +#X obj 8 276 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0; #X text 17 275 Arguments:; #X text 452 8 GEM object; #X text 44 334 Inlet 1: gemlist; #X text 26 388 Outlets:; #X text 38 401 Outlet 1: gemlist; -#X obj 469 77 cnv 15 170 320 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 474 331 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 -0; -#N canvas 0 22 450 300 gemwin 0; -#X obj 132 136 gemwin; -#X obj 67 89 outlet; -#X obj 67 10 inlet; -#X obj 67 41 route create; -#X msg 67 70 set destroy; -#X msg 142 68 set create; -#X msg 256 112 destroy; -#X obj 322 45 inlet; -#X msg 132 112 create \, 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 0 8 0; -#X connect 3 1 5 0; -#X connect 3 1 6 0; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X restore 479 370 pd gemwin; -#X msg 479 351 create; -#X text 475 330 Create window:; -#X obj 473 129 cnv 15 150 100 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 469 77 cnv 15 170 320 empty empty empty 20 12 0 14 #dce4fc #404040 0; +#X obj 474 331 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0; +#X obj 473 129 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0; #X obj 481 84 gemhead; #X text 53 30 Class: non-geometric object; #X text 7 69 Description: adds a point-light to the scene; -#X text 44 360 Inlet 1: message: debug 1|0 : show debugging object -(default:0), f 66; +#X text 44 360 Inlet 1: message: debug 1|0 : show debugging object (default:0), f 66; #X text 44 373 Inlet 2: list: 3(RGB) or 4(RGBA) float values; #X msg 568 182 1 1 1; -#X obj 495 157 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 495 157 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 495 178 debug \$1; -#X text 19 189 Keep in mind that the attributes have to be set before -rendering the vertices \, so if you are trying for frame accurate rendering -\, you will want to set the gemhead order to a low number so that all -of the values of the light get set first.; +#X text 19 189 Keep in mind that the attributes have to be set before rendering the vertices \, so if you are trying for frame accurate rendering \, you will want to set the gemhead order to a low number so that all of the values of the light get set first.; #X obj 480 264 sphere; -#X floatatom 561 88 5 0 0 0 - - -; +#X floatatom 561 88 5 0 0 0 - - - 0; #X obj 481 106 rotateXYZ 0 -120 0; #X obj 480 242 gemhead 40; -#X obj 537 271 cnv 15 85 50 empty empty empty 20 12 0 14 -24198 -66577 -0; +#X obj 537 271 cnv 15 85 50 empty empty empty 20 12 0 14 #14e814 #404040 0; #X msg 539 298 lighting \$1; -#X obj 539 276 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; +#X obj 539 276 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1; #X msg 567 159 1 1 0; -#X text 18 169 The second inlet sets the color of the light-source. -; +#X text 18 169 The second inlet sets the color of the light-source.; #X text 63 287 light-number; #X obj 481 204 world_light; -#X text 19 86 [world_light] produces a light which is at an infinite -distance from the scene. This means that all of the light rays are -parallel \, which reduces the computation somewhat.; -#X text 17 135 You can adjust the light with [rotate]. If you are lost -use "debug" to display the light source as a small cone.; +#X text 19 86 [world_light] produces a light which is at an infinite distance from the scene. This means that all of the light rays are parallel \, which reduces the computation somewhat.; +#X text 17 135 You can adjust the light with [rotate]. If you are lost use "debug" to display the light source as a small cone.; #X text 33 14 Synopsis: [world_light]; -#X obj 490 134 tgl 20 0 empty \$0-onoff empty 17 7 0 10 -262144 -1 --1 0 1; +#X obj 490 134 tgl 20 0 empty \$0-onoff empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; #X text 40 425 see also:; #X obj 145 425 spot_light; #X obj 103 425 light; #X text 44 347 Inlet 1: float: turn light on/off (default:1); -#X obj 528 8 declare -lib Gem; -#X connect 12 0 13 0; -#X connect 13 0 12 0; -#X connect 16 0 27 0; -#X connect 21 0 35 1; -#X connect 22 0 23 0; -#X connect 23 0 35 0; -#X connect 26 0 27 2; -#X connect 27 0 35 0; -#X connect 28 0 25 0; -#X connect 30 0 12 1; -#X connect 31 0 30 0; -#X connect 32 0 35 1; -#X connect 39 0 35 0; +#N canvas 484 243 450 300 META 0; +#X obj 10 25 declare -lib Gem; +#X text 10 45 DESCRIPTION adds a point-light to the scene; +#X text 10 65 KEYWORDS Gem non-geometric; +#X text 20 85 INLET_0 gemlist float debug; +#X text 20 105 INLET_1 list; +#X text 20 125 OUTLET_0 gemlist; +#X text 10 145 AUTHOR IOhannes m zmölnig; +#X text 10 165 LICENSE GPL v2; +#X restore 528 8 pd META; +#X obj 481 338 _gemwin; +#X connect 13 0 24 0; +#X connect 18 0 32 1; +#X connect 19 0 20 0; +#X connect 20 0 32 0; +#X connect 23 0 24 2; +#X connect 24 0 32 0; +#X connect 25 0 22 0; +#X connect 27 0 42 0; +#X connect 28 0 27 0; +#X connect 29 0 32 1; +#X connect 36 0 32 0; diff --git a/m4/gem.m4 b/m4/gem.m4 index a41757cff..17e1cab49 100644 --- a/m4/gem.m4 +++ b/m4/gem.m4 @@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([GEM_ARG_WITH], [ AC_ARG_WITH([$1], - AC_HELP_STRING([--without-$1], [disable $1-lib ($2)]),,[ + AS_HELP_STRING([--without-$1], [disable $1-lib ($2)]),,[ AS_IF([ test "x$3" != "x" ], [ with_$1="yes" ]) ]) AS_IF([ test "x${with_$1}" = "x" ], [ with_$1="${with_ALL}" ]) @@ -18,7 +18,7 @@ AC_DEFUN([GEM_ARG_WITH], # inverse of GEM_ARG_WITH AC_DEFUN([GEM_ARG_WITHOUT], [AC_ARG_WITH([$1], - AC_HELP_STRING([--with-$1], [enable $1-lib ($2)]),,[ + AS_HELP_STRING([--with-$1], [enable $1-lib ($2)]),,[ AS_IF([ test "x$3" = "xforce" ], [ with_$1="no" ]) ]) ])# GEM_ARG_WITHOUT @@ -26,7 +26,7 @@ AC_DEFUN([GEM_ARG_WITHOUT], # same as GEM_ARG_WITH but with "enable" AC_DEFUN([GEM_ARG_ENABLE], [AC_ARG_ENABLE([$1], - AC_HELP_STRING([--disable-$1], [disable $1 ($2)]), + AS_HELP_STRING([--disable-$1], [disable $1 ($2)]), , [enable_$1="yes"]) ])# GEM_ARG_ENABLE @@ -34,7 +34,7 @@ AC_DEFUN([GEM_ARG_ENABLE], # inverse of GEM_ARG_ENABLE AC_DEFUN([GEM_ARG_DISABLE], [AC_ARG_ENABLE([$1], - AC_HELP_STRING([--enable-$1], [enable $1 ($2)]), + AS_HELP_STRING([--enable-$1], [enable $1 ($2)]), , [enable_$1="no"]) ])# GEM_ARG_DISABLE @@ -46,7 +46,7 @@ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], AC_CONFIG_FILES([src/$1/Makefile]) AC_ARG_ENABLE([$1], - AC_HELP_STRING([--disable-$1], [disable $1-objects]), + AS_HELP_STRING([--disable-$1], [disable $1-objects]), [ AS_IF([ test "x$enableval" != "xno" ], [ AC_MSG_RESULT([building Gem with $1-objects]) @@ -70,7 +70,7 @@ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], AC_CONFIG_FILES([src/$1/Makefile]) AC_ARG_ENABLE([$1], - AC_HELP_STRING([--enable-$1], [enable $1-objects]), + AS_HELP_STRING([--enable-$1], [enable $1-objects]), [ AS_IF([ test "x$enableval" != "xyes" ], [ AC_MSG_RESULT([building Gem without $1-objects]) @@ -110,15 +110,19 @@ AC_DEFUN([GEM_CHECK_LIB], AC_SUBST(GEM_LIB_[]NAME[]_CFLAGS) AC_SUBST(GEM_LIB_[]NAME[]_LIBS) -AC_ARG_WITH([Name], - AC_HELP_STRING([--without-[]Name], [disable Name ($8)])) +AS_IF([ test "$9" = "no"], +[AC_ARG_WITH([Name], + AS_HELP_STRING([--with-[]Name], [disable Name ($8)]))], +[AC_ARG_WITH([Name], + AS_HELP_STRING([--without-[]Name], [disable Name ($8)]))] +) AC_ARG_WITH([]Name-CFLAGS, - AC_HELP_STRING([--with-[]Name-CFLAGS="-I/path/to/[]Name/include/"], [compiler flags for Name])) + AS_HELP_STRING([--with-[]Name-CFLAGS="-I/path/to/[]Name/include/"], [compiler flags for Name])) AC_ARG_WITH([]Name-LIBS, - AC_HELP_STRING([--with-[]Name-LIBS="-L/path/to/[]Name/lib/ -l$2"], [linker flags for Name])) + AS_HELP_STRING([--with-[]Name-LIBS="-L/path/to/[]Name/lib/ -l$2"], [linker flags for Name])) - AS_IF([ test "x$with_[]Name" = "x" ], [ with_[]Name="$9" ]) - AS_IF([ test "x$with_[]Name" = "x" ], [ with_[]Name="$with_ALL" ]) +AS_IF([ test "x$with_[]Name" = "x" ], [ with_[]Name="$with_ALL" ]) +AS_IF([ test "x$with_[]Name" = "x" ], [ with_[]Name="$9" ]) tmp_gem_check_lib_cppflags="$CPPFLAGS" tmp_gem_check_lib_cflags="$CFLAGS" @@ -260,7 +264,7 @@ dnl PKG_CHECK_MODULES(AS_TR_CPP(PKG_$1), $1,AS_VAR_SET(acLib)yes, AC_CHECK_LIB( AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$2),[1], [$8]) ]) AS_IF([ test "x$4" != "x" ], [ - AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$4),[1], [Define to 1 if you have the `$4' function.]) + AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$4),[1], [Define to 1 if you have the '$4' function.]) ]) GEM_LIB_[]NAME[]_CFLAGS=${PKG_[]NAME[]_CFLAGS} GEM_LIB_[]NAME[]_LIBS=${PKG_[]NAME[]_LIBS} @@ -354,11 +358,11 @@ AC_DEFUN([GEM_CHECK_FRAMEWORK], AC_SUBST(GEM_FRAMEWORK_[]NAME[]_LIBS) AC_ARG_WITH([]Name[]-framework, - AC_HELP_STRING([--without-[]Name[]-framework], [disable Name-framework])) + AS_HELP_STRING([--without-[]Name[]-framework], [disable Name-framework])) AC_ARG_WITH([]Name[]-framework-CFLAGS, - AC_HELP_STRING([--with-[]Name[]-framework-CFLAGS="-I/path/to/[]Name/include/"], [compiler flags for Name-framework])) + AS_HELP_STRING([--with-[]Name[]-framework-CFLAGS="-I/path/to/[]Name/include/"], [compiler flags for Name-framework])) AC_ARG_WITH([]Name[]-framework-LIBS, - AC_HELP_STRING([--with-[]Name[]-framework-LIBS="-L/path/to/[]Name/lib/ -l$2"], [linker flags for Name-framework])) + AS_HELP_STRING([--with-[]Name[]-framework-LIBS="-L/path/to/[]Name/lib/ -l$2"], [linker flags for Name-framework])) AS_IF([ test "x$with_[]Name[]_framework" = "x" ], [ with_[]Name="$with_ALL" ]) @@ -514,11 +518,26 @@ tmp_rte_cflags="$CFLAGS" tmp_rte_cxxflags="$CXXFLAGS" tmp_rte_ldflags="$LDFLAGS" tmp_rte_libs="$LIBS" +tmp_rte_pd="pd" GEM_RTE_CFLAGS="-DPD" GEM_RTE_LIBS="" GEM_RTE="Pure Data" + +AC_ARG_WITH([floatsize], + AS_HELP_STRING([--with-floatsize=], + [use a given floatsize (32, 64)])) +AC_MSG_CHECKING([floatsize]) +tmp_rte_pd="pd${with_floatsize}" +AS_CASE([$with_floatsize], + [32], [floatsize=32; tmp_rte_pd="pd"], + [64], [floatsize=64], + [""], [floatsize=""], + [AC_MSG_ERROR([invalid floatsize: only 32 and 64 are currently allowed])]) +AS_IF([test "x$floatsize" != "x"],[GEM_RTE_CFLAGS+=" -DPD_FLOATSIZE=${floatsize}"]) +AC_MSG_RESULT([${floatsize:-default (32)}]) + have_pd=no AC_ARG_WITH([pd], AS_HELP_STRING([--with-pd=],[where to find pd-binary (./bin/pd.exe) and pd-sources])) @@ -527,18 +546,16 @@ AS_IF([ test "x${with_pd}" = "x" ],[ AS_CASE([$host_os], [*-darwin*], [ # get the latest and greatest Pd installed in /Applications - with_pd_=$(ls -S /Applications/Pd*.app/Contents/Resources/bin/pd 2>/dev/null | sort | tail -1 | sed "s/\/bin\/pd$//") + with_pd_=$(ls -S "/Applications/Pd*.app/Contents/Resources/bin/${tmp_rte_pd}" 2>/dev/null | sort | tail -1 | sed "s/\/bin\/${tmp_rte_pd}$//") AS_IF([ test -d "${with_pd_}" ], [ with_pd="${with_pd_}" ]) ], [*mingw* | *cygwin*], [ - dnl AS_IF([ test -d "${PROGRAMFILES}/pd" ], [ with_pd="${PROGRAMFILES}/pd" ]) + dnl AS_IF([ test -d "${PROGRAMFILES}/${tmp_rte_pd}" ], [ with_pd="${PROGRAMFILES}/${tmp_rte_pd}" ]) ],)]) AS_IF([ test "x${with_pd}" = "x" || test "x${with_pd}" = "yes" ], [ PKG_CHECK_MODULES([PD], [pd], [have_pd="yes"]) - GEM_RTE_CPPFLAGS="${GEM_RTE_CPPFLAGS} ${PD_CFLAGS}" GEM_RTE_CFLAGS="${GEM_RTE_CFLAGS} ${PD_CFLAGS}" - GEM_RTE_CXXFLAGS="${GEM_RTE_CXXFLAGS} ${PD_CFLAGS}" GEM_RTE_LIBS="${GEM_RTE_LIBS} ${PD_LIBS}" with_pd="" ]) @@ -577,11 +594,11 @@ AS_IF([ test "x${have_pd}" = "xyes" ],[ LIBS="$LIBS ${GEM_RTE_LIBS}" ]) -AC_CHECK_LIB([:pd.dll], [nullfn], [have_pddll="yes"], [have_pddll="no"]) +AC_CHECK_LIB([:${tmp_rte_pd}.dll], [nullfn], [have_pddll="yes"], [have_pddll="no"]) AS_IF([ test "x$have_pddll" = "xyes" ], [ - GEM_RTE_LIBS="${GEM_RTE_LIBS}${GEM_RTE_LIBS:+ }-Xlinker -l:pd.dll" + GEM_RTE_LIBS="${GEM_RTE_LIBS}${GEM_RTE_LIBS:+ }-Xlinker -l:${tmp_rte_pd}.dll" ],[ - AC_CHECK_LIB([pd], [nullfn], [GEM_RTE_LIBS="${GEM_RTE_LIBS}${GEM_RTE_LIBS:+ }-lpd"]) + AC_CHECK_LIB([${tmp_rte_pd}], [nullfn], [GEM_RTE_LIBS="${GEM_RTE_LIBS}${GEM_RTE_LIBS:+ }-l${tmp_rte_pd}"]) ]) AC_CHECK_HEADERS([m_pd.h], [have_pd="yes"], [have_pd="no"]) @@ -600,7 +617,9 @@ AC_CHECK_HEADERS([m_imp.h], [], [], #endif ]) -AC_PATH_PROGS([PD_EXE], [pd.com pd], [pd], [${with_pd}/bin:${with_pd}/src:${with_pd}]) +AC_PATH_PROGS([PD_EXE], [${tmp_rte_pd}.com ${tmp_rte_pd}], [${tmp_rte_pd}], [${with_pd}/bin:${with_pd}/src:${with_pd}]) +GEM_RTE_EXE="${PD_EXE}" +AC_SUBST(GEM_RTE_EXE) ### this should only be set if Pd has been found # the extension @@ -636,6 +655,7 @@ LIBS="$tmp_rte_libs" ]) # GEM_CHECK_RTE + AC_DEFUN([GEM_CHECK_THREADS], [ GEM_ARG_ENABLE([threads], [default: use threads]) @@ -669,6 +689,6 @@ AC_DEFUN([GEM_CHECK_EXTERNAL], AC_SUBST(GEM_EXTERNAL_CFLAGS) AC_SUBST(GEM_EXTERNAL_LIBS) - AS_IF([test "x$have_pddll" = "xyes" ], [ GEM_EXTERNAL_LIBS="${GEM_EXTERNAL_LIBS}${GEM_EXTERNAL_LIBS:+ }-Xlinker -l:Gem.dll" ]) + AS_IF([test "x$have_pddll" = "xyes" ], [ GEM_EXTERNAL_LIBS="${GEM_EXTERNAL_LIBS}${GEM_EXTERNAL_LIBS:+ }-Xlinker -l:Gem.${GEM_RTE_EXTENSION:-dll}" ]) AS_IF([test "x$WINDOWS" = "xyes" ], [GEM_CHECK_CXXFLAGS([-mms-bitfields], [GEM_EXTERNAL_CFLAGS+="-mms-bitfields"])]) ]) diff --git a/m4/iem.m4 b/m4/iem.m4 index 66289745b..b63916369 100644 --- a/m4/iem.m4 +++ b/m4/iem.m4 @@ -33,7 +33,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 15 +#serial 16 @@ -69,3 +69,32 @@ AC_DEFUN([IEM_CHECK_INCLUDES_DEFAULT], [ [#]endif" done ]) + +# +# SYNOPSIS +# +# IEM_CHECK_FUNCS(function..., [action-if-found], [action-if-not-found], [additional-cflags], [additional-libs]) +# +# DESCRIPTION +# +# check for functions +# +# For each function enumerated in the blank-or-newline-separated argument list, +# define HAVE_function (in all capitals) if it is available. +# if additional-cflags is given, it is temporarily appended to the CFLAGS. +# if additional-libs is given, it is temporarily appended to the LIBS +# +# Example: +# +# IEM_CHECK_FUNCS([foo bar], [], [], [-DHAVE_FOO=1], [-lfoo]) +# +AC_DEFUN([IEM_CHECK_FUNCS], [ + tmp_iemcheckfuncs_cflags="$CFLAGS" + tmp_iemcheckfuncs_libs="$LIBS" + CFLAGS="$CFLAGS $4" + LIBS="$LIBS $5" + AC_CHECK_FUNCS([$1], [$2], [$3]) + + CFLAGS="${tmp_iemcheckfuncs_cflags}" + LIBS="${tmp_iemcheckfuncs_libs}" +]) diff --git a/plugins/ASSIMP2/ASSIMP2-modelplugin.pd b/plugins/ASSIMP2/ASSIMP2-modelplugin.pd new file mode 100644 index 000000000..baa78c941 --- /dev/null +++ b/plugins/ASSIMP2/ASSIMP2-modelplugin.pd @@ -0,0 +1,3 @@ +#N canvas 242 133 479 182 12; +#X text 26 29 With the ASSIMP backend \, you can load a multitude of different model formats.; +#X text 24 79 This is the backend for the old ASSIMP2 library \, which is no longer maintained.; diff --git a/plugins/ASSIMP2/Makefile.am b/plugins/ASSIMP2/Makefile.am index 7678bd677..23cd4c1c9 100644 --- a/plugins/ASSIMP2/Makefile.am +++ b/plugins/ASSIMP2/Makefile.am @@ -9,9 +9,12 @@ EXTRA_DIST += win-vs2008/modelASSIMP2.sln win-vs2008/modelASSIMP2.vcproj EXTRA_DIST += win-vs2008/ASSIMP2.vsprops pkglib_LTLIBRARIES= +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = if HAVE_ASSIMP2 pkglib_LTLIBRARIES += gem_modelASSIMP2.la +dist_gemhelp_DATA += ASSIMP2-modelplugin.pd endif gem_modelASSIMP2_la_CXXFLAGS = diff --git a/plugins/ASSIMP2/modelASSIMP2.cpp b/plugins/ASSIMP2/modelASSIMP2.cpp index 93237bcaf..91e2429ca 100644 --- a/plugins/ASSIMP2/modelASSIMP2.cpp +++ b/plugins/ASSIMP2/modelASSIMP2.cpp @@ -43,14 +43,13 @@ static void get_bounding_box_for_node (const struct aiScene*scene, ) { struct aiMatrix4x4 prev; - unsigned int n = 0, t; prev = *trafo; aiMultiplyMatrix4(trafo,&nd->mTransformation); - for (; n < nd->mNumMeshes; ++n) { + for (unsigned int n=0; n < nd->mNumMeshes; ++n) { const struct aiMesh* mesh = scene->mMeshes[nd->mMeshes[n]]; - for (t = 0; t < mesh->mNumVertices; ++t) { + for (unsigned int t = 0; t < mesh->mNumVertices; ++t) { struct aiVector3D tmp = mesh->mVertices[t]; aiTransformVecByMatrix4(&tmp,trafo); @@ -65,7 +64,7 @@ static void get_bounding_box_for_node (const struct aiScene*scene, } } - for (n = 0; n < nd->mNumChildren; ++n) { + for (unsigned int n = 0; n < nd->mNumChildren; ++n) { get_bounding_box_for_node(scene, nd->mChildren[n],min,max,trafo); } *trafo = prev; @@ -197,15 +196,13 @@ static void recursive_render (const struct aiScene*scene, std::vector >& colors, aiMatrix4x4* trafo) { - int i; - unsigned int n = 0, t; aiMatrix4x4 prev = *trafo; // update transform aiMultiplyMatrix4(trafo,&nd->mTransformation); // draw all meshes assigned to this node - for (; n < nd->mNumMeshes; ++n) { + for (unsigned int =0; n < nd->mNumMeshes; ++n) { const struct aiMesh* mesh = scene->mMeshes[nd->mMeshes[n]]; if(use_material) { apply_material(sc->mMaterials[mesh->mMaterialIndex]); @@ -226,7 +223,7 @@ static void recursive_render (const struct aiScene*scene, glDisable(GL_COLOR_MATERIAL); } #endif - for (t = 0; t < mesh->mNumFaces; ++t) { + for (unsigned int t = 0; t < mesh->mNumFaces; ++t) { const struct aiFace* face = &mesh->mFaces[t]; GLenum face_mode; @@ -248,7 +245,7 @@ static void recursive_render (const struct aiScene*scene, float* pt; std::vector vec; - for(i = 0; i < face->mNumIndices; i++) { + for(int i = 0; i < face->mNumIndices; i++) { int index = face->mIndices[i]; if(use_material && mesh->mColors[0] != NULL) { @@ -281,7 +278,7 @@ static void recursive_render (const struct aiScene*scene, } // draw all children - for (n = 0; n < nd->mNumChildren; ++n) { + for (unsigned int n = 0; n < nd->mNumChildren; ++n) { recursive_render(scene, sc, nd->mChildren[n], use_material, vertices, normals, texcoords, colors, trafo); } @@ -403,9 +400,8 @@ void modelASSIMP2 :: setProperties(gem::Properties&props) #if 0 std::vectorkeys=props.keys(); - unsigned int i; - for(i=0; imTransformation); - for (; n < nd->mNumMeshes; ++n) { + for (unsigned int n=0; n < nd->mNumMeshes; ++n) { const struct aiMesh* mesh = scene->mMeshes[nd->mMeshes[n]]; - for (t = 0; t < mesh->mNumVertices; ++t) { + for (unsigned int t = 0; t < mesh->mNumVertices; ++t) { aiVector3D tmp = mesh->mVertices[t]; aiTransformVecByMatrix4(&tmp,trafo); @@ -63,7 +62,7 @@ static void get_bounding_box_for_node (const struct aiScene*scene, } } - for (n = 0; n < nd->mNumChildren; ++n) { + for (unsigned int n = 0; n < nd->mNumChildren; ++n) { get_bounding_box_for_node(scene, nd->mChildren[n],min,max,trafo); } *trafo = prev; @@ -180,8 +179,6 @@ static void recursive_render( , aiMatrix4x4* trafo ) { - int i; - unsigned int t; aiMatrix4x4 prev = *trafo; // update transform aiMultiplyMatrix4(trafo,&nd->mTransformation); @@ -202,9 +199,9 @@ static void recursive_render( apply_material(outmesh.mesh.material, sc->mMaterials[mesh->mMaterialIndex]); - for (t = 0; t < mesh->mNumFaces; ++t) { + for (unsigned int t = 0; t < mesh->mNumFaces; ++t) { const struct aiFace* face = &mesh->mFaces[t]; - for(i = 0; i < face->mNumIndices; i++) { + for(int i = 0; i < face->mNumIndices; i++) { int index = face->mIndices[i]; numVertices++; @@ -370,7 +367,7 @@ void modelASSIMP3 :: setProperties(gem::Properties&props) std::string s; double d; #if 0 - verbose(1, "[GEM:modelASSIMP3] key[%d]=%s ... %d", i, keys[i].c_str(), + logpost(0, 3+1, "[GEM:modelASSIMP3] key[%d]=%s ... %d", i, keys[i].c_str(), props.type(keys[i])); #endif if("textype" == key) { @@ -427,9 +424,8 @@ void modelASSIMP3 :: setProperties(gem::Properties&props) void modelASSIMP3 :: getProperties(gem::Properties&props) { std::vectorkeys=props.keys(); - unsigned int i; props.clear(); - for(i=0; ibiSize = sizeof(BITMAPINFOHEADER); @@ -184,23 +184,23 @@ bool filmAVI :: open(const std::string&filename, m_image.image.xsize = streaminfo.rcFrame.right - streaminfo.rcFrame.left; m_image.image.ysize = streaminfo.rcFrame.bottom - streaminfo.rcFrame.top; - m_image.image.setCsizeByFormat(m_wantedFormat); + m_image.image.setFormat(m_wantedFormat); m_image.image.reallocate(); if (!(m_hic = ICLocate(ICTYPE_VIDEO, 0, m_pbmihRaw, m_pbmihDst, ICMODE_DECOMPRESS))) { - verbose(0, "[GEM:filmAVI] Could not find decompressor: %s", + logpost(0, 3+0, "[GEM:filmAVI] Could not find decompressor: %s", filename.c_str()); goto unsupported; } if (m_format==GEM_GRAY) { if (ICERR_OK != ICDecompressSetPalette(m_hic, m_pbmihDst)) { - verbose(0, "[GEM:filmAVI] Could not set palette: %s", filename.c_str()); + logpost(0, 3+0, "[GEM:filmAVI] Could not set palette: %s", filename.c_str()); } } if (ICERR_OK != ICDecompressBegin(m_hic, m_pbmihRaw, m_pbmihDst)) { - verbose(0, "[GEM:filmAVI] Could not begin decompression: %s", + logpost(0, 3+0, "[GEM:filmAVI] Could not begin decompression: %s", filename.c_str()); goto unsupported; } @@ -239,7 +239,7 @@ pixBlock* filmAVI :: getFrame(void) m_image.newimage=1; m_image.image.upsidedown=false; - m_image.image.setCsizeByFormat(m_wantedFormat); + m_image.image.setFormat(m_wantedFormat); m_image.image.reallocate(); if (!AVIStreamRead(m_streamVid, @@ -318,8 +318,7 @@ void filmAVI::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; iGetVideoHeight(); m_fps= l_info->GetFps(); } - m_image.image.setCsizeByFormat(m_wantedFormat); + m_image.image.setFormat(m_wantedFormat); if (!(m_image.image.xsize*m_image.image.ysize*m_image.image.csize)) { goto unsupported; } @@ -172,7 +172,7 @@ pixBlock* filmAVIPLAY :: getFrame() if (m_aviimage) { int format = m_aviimage->Format(); m_rawdata=m_aviimage->Data(); - m_image.image.setCsizeByFormat(m_wantedFormat); + m_image.image.setFormat(m_wantedFormat); switch(format) { case IMG_FMT_RGB24: m_image.image.fromRGB (m_rawdata); @@ -257,8 +257,7 @@ void filmAVIPLAY::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i=0) { - verbose(0, "[GEM:videoAVT] trying to open #%d of %d devices", m_devicenum, + logpost(0, 3+0, "[GEM:videoAVT] trying to open #%d of %d devices", m_devicenum, cameraNum); if(cameraNum>m_devicenum && (cameraList[m_devicenum].PermittedAccess == ePvAccessMaster)) { @@ -243,7 +241,7 @@ bool videoAVT :: openDevice(gem::Properties&props) } } } else { - verbose(0, "[GEM:videoAVT] trying to open device '%s'", + logpost(0, 3+0, "[GEM:videoAVT] trying to open device '%s'", m_devicename.c_str()); /* cameraList[i].SerialString, @@ -251,13 +249,12 @@ bool videoAVT :: openDevice(gem::Properties&props) cameraList[i].UniqueId, IP */ - unsigned long i=0; errno=0; const unsigned long uid=strtoul(m_devicename.c_str(), NULL, 0); if(NULL==m_grabber && 0==errno) { - verbose(1, "[GEM:videoAVT] checking UniqueID: 0x% 8x", uid); - for(i=0; i>8, (IpAddr & 0x0FF0000)>>16, @@ -389,8 +386,7 @@ std::vector videoAVT::enumerate() tPvCameraInfo*cameraList=new tPvCameraInfo[cameraNum]; cameraNum = PvCameraList(cameraList,cameraNum,NULL); - unsigned long i = 0; - for (i = 0; i < cameraNum; i++) { + for (unsigned long i = 0; i < cameraNum; i++) { result.push_back(cameraList[i].DisplayName); } @@ -461,9 +457,8 @@ bool videoAVT::enumProperties(gem::Properties&readable, } void videoAVT::setProperties(gem::Properties&props) { - int i; std::vectorkeys=props.keys(); - for(i=0; ikeys=props.keys(); - for(i=0; isize[0]; m_frame.ysize=frame->size[1]; - m_frame.setCsizeByFormat(GEM_RGBA); + m_frame.setFormat(GEM_RGBA); m_frame.fromRGB(colframe->image); lock(); @@ -148,12 +148,12 @@ bool videoDC1394 :: openDevice(gem::Properties&props) err=dc1394_camera_enumerate (m_dc, &list); /* Find cameras */ if(DC1394_SUCCESS!=err) { - verbose(0, "[GEM:videoDC1394] %s: failed to enumerate", + logpost(0, 3+0, "[GEM:videoDC1394] %s: failed to enumerate", dc1394_error_get_string(err)); return false; } if (list->num < 1) { - verbose(0, "[GEM:videoDC1394] no cameras found"); + logpost(0, 3+0, "[GEM:videoDC1394] no cameras found"); dc1394_camera_free_list (list); return false; } @@ -161,8 +161,7 @@ bool videoDC1394 :: openDevice(gem::Properties&props) if(m_devicenum>=0) { devicenum=m_devicenum; } else if (!m_devicename.empty()) { - int i=0; - for(i=0; inum; i++) { + for(int i=0; inum; i++) { // find camera based on its GUID std::string name=guid2string(list->ids[i].guid); if(guid2string(list->ids[i].guid)==m_devicename) { @@ -186,17 +185,17 @@ bool videoDC1394 :: openDevice(gem::Properties&props) list->ids[devicenum].unit); } else { m_dccamera=NULL; - verbose(0, "[GEM:videoDC1394] only found %d cameras but requested #%d!", + logpost(0, 3+0, "[GEM:videoDC1394] only found %d cameras but requested #%d!", list->num, devicenum); } dc1394_camera_free_list (list); if(!m_dccamera) { - verbose(0, "[GEM:videoDC1394] could not access camera!"); + logpost(0, 3+0, "[GEM:videoDC1394] could not access camera!"); return false; } - verbose(1, "[GEM:videoDC1394] using camera with GUID %s", + logpost(0, 3+1, "[GEM:videoDC1394] using camera with GUID %s", guid2string(m_dccamera->guid, m_dccamera->unit).c_str()); setProperties(props); @@ -209,7 +208,7 @@ bool videoDC1394 :: openDevice(gem::Properties&props) err=dc1394_video_get_supported_modes(m_dccamera,&video_modes); if(DC1394_SUCCESS!=err) { - verbose(0, "[GEM:videoDC1394] can't get video modes"); + logpost(0, 3+0, "[GEM:videoDC1394] can't get video modes"); closeDevice(); return false; } @@ -220,25 +219,24 @@ bool videoDC1394 :: openDevice(gem::Properties&props) mode=d; } - verbose(1, "[GEM:videoDC1394] trying mode %d", mode); + logpost(0, 3+1, "[GEM:videoDC1394] trying mode %d", mode); if(mode>=0) { if(mode>=video_modes.num) { - verbose(0, "[GEM:videoDC1394] requested channel %d/%d out of bounds", mode, + logpost(0, 3+0, "[GEM:videoDC1394] requested channel %d/%d out of bounds", mode, video_modes.num); mode=-1; } } - int i; - for (i=video_modes.num-1; i>=0; i--) { + for (int i=video_modes.num-1; i>=0; i--) { unsigned int w=0, h=0; if(DC1394_SUCCESS==dc1394_get_image_size_from_video_mode(m_dccamera, video_modes.modes[i], &w, &h)) { - verbose(1, "[GEM:videoDC1394] videomode[%02d/%d]=%dx%d", i, + logpost(0, 3+1, "[GEM:videoDC1394] videomode[%02d/%d]=%dx%d", i, video_modes.num, w, h); } else { - verbose(1, "[GEM:videoDC1394] videomode %d refused dimen: %d", i, + logpost(0, 3+1, "[GEM:videoDC1394] videomode %d refused dimen: %d", i, video_modes.modes[i]); } @@ -246,7 +244,7 @@ bool videoDC1394 :: openDevice(gem::Properties&props) &coding); dc1394bool_t iscolor=DC1394_FALSE; if(DC1394_SUCCESS==dc1394_is_color(coding, &iscolor)) { - verbose(1, "[GEM:videoDC1394] videomode[%02d/%d] %d is%scolor", i, + logpost(0, 3+1, "[GEM:videoDC1394] videomode[%02d/%d] %d is%scolor", i, video_modes.num, coding, (iscolor?" ":" NOT ")); } @@ -261,6 +259,7 @@ bool videoDC1394 :: openDevice(gem::Properties&props) if(mode<0) { // select highest res mode: + int i = -1; for (i=video_modes.num-1; i>=0; i--) { if (!dc1394_is_video_mode_scalable(video_modes.modes[i])) { dc1394_get_color_coding_from_video_mode(m_dccamera,video_modes.modes[i], @@ -271,12 +270,12 @@ bool videoDC1394 :: openDevice(gem::Properties&props) } } if (i < 0) { - verbose(0, "[GEM:videoDC1394] Could not get a valid mode"); + logpost(0, 3+0, "[GEM:videoDC1394] Could not get a valid mode"); closeDevice(); return false; } } else { - verbose(1, "[GEM:videoDC1394] using mode %d", mode); + logpost(0, 3+1, "[GEM:videoDC1394] using mode %d", mode); video_mode=video_modes.modes[mode]; } @@ -284,19 +283,19 @@ bool videoDC1394 :: openDevice(gem::Properties&props) unsigned int w=0, h=0; if(DC1394_SUCCESS==dc1394_get_image_size_from_video_mode(m_dccamera, video_mode, &w, &h)) { - verbose(1, "[GEM:videoDC1394] videomode[%d]=%dx%d", video_mode, w, h); + logpost(0, 3+1, "[GEM:videoDC1394] videomode[%d]=%dx%d", video_mode, w, h); } dc1394_get_color_coding_from_video_mode(m_dccamera,video_mode, &coding); dc1394bool_t iscolor=DC1394_FALSE; if(DC1394_SUCCESS==dc1394_is_color(coding, &iscolor)) { - verbose(1, "[GEM:videoDC1394] videomode %d is%scolor", coding, + logpost(0, 3+1, "[GEM:videoDC1394] videomode %d is%scolor", coding, (iscolor?" ":" NOT ")); } } err=dc1394_video_set_mode(m_dccamera, video_mode); if(DC1394_SUCCESS!=err) { - verbose(0, + logpost(0, 3+0, "[GEM:videoDC1394] unable to set specified mode, using default"); } } @@ -311,12 +310,12 @@ bool videoDC1394 :: openDevice(gem::Properties&props) if(DC1394_SUCCESS==err) { break; } - verbose(1, "[GEM:videoDC1394] failed to set operation mode to %d", + logpost(0, 3+1, "[GEM:videoDC1394] failed to set operation mode to %d", operation_mode); operation_mode--; } if(DC1394_SUCCESS!=err) { - verbose(0, + logpost(0, 3+0, "[GEM:videoDC1394] unable to set operation mode...continuing anyhow"); } } @@ -332,13 +331,13 @@ bool videoDC1394 :: openDevice(gem::Properties&props) if(DC1394_SUCCESS==err) { break; } - verbose(1, "[GEM:videoDC1394] failed to set ISO speed to %d", + logpost(0, 3+1, "[GEM:videoDC1394] failed to set ISO speed to %d", 100*(1<videoDC1394 :: enumerate() return result; } - int i=0; - for(i=0; inum; i++) { - // verbose(1, "[GEM:videoDC1394] IIDC#%02d: %"PRIx64"\t%x\t%s", i, list->ids[i].guid, list->ids[i].unit, buf); + for(int i=0; inum; i++) { + // logpost(0, 3+1, "[GEM:videoDC1394] IIDC#%02d: %"PRIx64"\t%x\t%s", i, list->ids[i].guid, list->ids[i].unit, buf); result.push_back(guid2string(list->ids[i].guid, list->ids[i].unit)); } return result; @@ -533,7 +531,7 @@ bool videoDC1394::enumProperties(gem::Properties&readable, return false; } - for ( int i = 0 ; i < DC1394_FEATURE_NUM ; i++ ) { + for (int i = 0 ; i < DC1394_FEATURE_NUM ; i++ ) { if ( feature_set.feature[i].available ) { // TODO remove space in feature name (eg. "Trigger Delay") key = dc1394_feature_get_string(feature_set.feature[i].id); @@ -572,13 +570,12 @@ void videoDC1394::getProperties(gem::Properties&props) double value; std::string svalue; - int i=0; - for(i=0; i0) { - int s; - for(s=DC1394_ISO_SPEED_MIN; s=(100*(1< #include -#define MARK() printf("%s:%d\t%s\n", __FILE__, __LINE__, __FUNCTION__) +#define MARK() printf("%s:%d\t[%s]\n", __FILE__, __LINE__, __FUNCTION__) #ifdef _WIN32 # include @@ -105,6 +105,11 @@ void free_deckstring(deckstring_t s) static std::map s_connectionstrings; namespace { + enum _gem_BMDPixelFormat { + /* GEM specific */ + gemBmdFormat8BitRGBA = /* 'RGBA' */ 0x52474241, + }; + BMDVideoConnection string2connection(std::string Name) { static bool done = false; @@ -118,7 +123,7 @@ BMDVideoConnection string2connection(std::string Name) s_connectionstrings["svideo"] = bmdVideoConnectionSVideo; #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900) #else - verbose(0, "[GEM:videoDECKLINK] lacking C++11 support requires connections to be lower-case"); + logpost(0, 3+0, "[GEM:videoDECKLINK] lacking C++11 support requires connections to be lower-case"); #endif } done=true; @@ -205,9 +210,10 @@ BMDPixelFormat string2pixformat(std::string Name) s_pixformatstrings["yuv"] = bmdFormat8BitYUV; s_pixformatstrings["argb"] = bmdFormat8BitARGB; s_pixformatstrings["bgra"] = bmdFormat8BitBGRA; + s_pixformatstrings["rgba8"] = (BMDPixelFormat)((int)bmdFormat8BitYUV); #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900) #else - verbose(0, "[GEM:videoDECKLINK] lacking C++11 support requires pixformats to be lower-case"); + logpost(0, 3+0, "[GEM:videoDECKLINK] lacking C++11 support requires pixformats to be lower-case"); #endif } done=true; @@ -259,11 +265,14 @@ class ImageStructWrapper : public IDeckLinkVideoFrame } virtual BMDPixelFormat STDMETHODCALLTYPE GetPixelFormat() { - switch(m_img->csize) { - case 4: - return bmdFormat8BitARGB; - case 2: - return bmdFormat8BitYUV; + bool reverse = false; + switch(m_img->format) { + case GEM_RAW_RGBA: + return (BMDPixelFormat)((int)bmdFormat8BitYUV); + case GEM_RAW_BGRA: + return bmdFormat8BitBGRA; + case GEM_RAW_UYVY: + return (BMDPixelFormat)((int)bmdFormat8BitYUV); default: break; } @@ -333,6 +342,7 @@ int GetRowBytes(BMDPixelFormat pixelFormat, int frameWidth) case bmdFormat8BitARGB: case bmdFormat8BitBGRA: + case gemBmdFormat8BitRGBA: default: bytesPerRow = frameWidth * 4; break; diff --git a/plugins/DECKLINK/recordDECKLINK.cpp b/plugins/DECKLINK/recordDECKLINK.cpp index 7a986df3e..c686ba1fa 100644 --- a/plugins/DECKLINK/recordDECKLINK.cpp +++ b/plugins/DECKLINK/recordDECKLINK.cpp @@ -19,7 +19,7 @@ #include "recordDECKLINK.h" -// for verbose(): +// for logpost(0, 3+): #include "Gem/RTE.h" #include "Gem/Exception.h" @@ -32,12 +32,276 @@ namespace { + static std::map s_name2mode; + static bool name2mode(const std::string&name, BMDDisplayMode&mode) + { + static bool done=false; + if(!done) { + done = true; + /* fourcc-like codes from DeckLink API */ + s_name2mode["ntsc"] = bmdModeNTSC; + s_name2mode["nt23"] = bmdModeNTSC2398; + s_name2mode["pal "] = bmdModePAL; + s_name2mode["ntsp"] = bmdModeNTSCp; + s_name2mode["palp"] = bmdModePALp; + s_name2mode["23ps"] = bmdModeHD1080p2398; + s_name2mode["24ps"] = bmdModeHD1080p24; + s_name2mode["Hp25"] = bmdModeHD1080p25; + s_name2mode["Hp29"] = bmdModeHD1080p2997; + s_name2mode["Hp30"] = bmdModeHD1080p30; + s_name2mode["Hp47"] = bmdModeHD1080p4795; + s_name2mode["Hp48"] = bmdModeHD1080p48; + s_name2mode["Hp50"] = bmdModeHD1080p50; + s_name2mode["Hp59"] = bmdModeHD1080p5994; + s_name2mode["Hp60"] = bmdModeHD1080p6000; + s_name2mode["Hp95"] = bmdModeHD1080p9590; + s_name2mode["Hp96"] = bmdModeHD1080p96; + s_name2mode["Hp10"] = bmdModeHD1080p100; + s_name2mode["Hp11"] = bmdModeHD1080p11988; + s_name2mode["Hp12"] = bmdModeHD1080p120; + s_name2mode["Hi50"] = bmdModeHD1080i50; + s_name2mode["Hi59"] = bmdModeHD1080i5994; + s_name2mode["Hi60"] = bmdModeHD1080i6000; + s_name2mode["hp50"] = bmdModeHD720p50; + s_name2mode["hp59"] = bmdModeHD720p5994; + s_name2mode["hp60"] = bmdModeHD720p60; + s_name2mode["2k23"] = bmdMode2k2398; + s_name2mode["2k24"] = bmdMode2k24; + s_name2mode["2k25"] = bmdMode2k25; + s_name2mode["2d23"] = bmdMode2kDCI2398; + s_name2mode["2d24"] = bmdMode2kDCI24; + s_name2mode["2d25"] = bmdMode2kDCI25; + s_name2mode["2d29"] = bmdMode2kDCI2997; + s_name2mode["2d30"] = bmdMode2kDCI30; + s_name2mode["2d47"] = bmdMode2kDCI4795; + s_name2mode["2d48"] = bmdMode2kDCI48; + s_name2mode["2d50"] = bmdMode2kDCI50; + s_name2mode["2d59"] = bmdMode2kDCI5994; + s_name2mode["2d60"] = bmdMode2kDCI60; + s_name2mode["2d95"] = bmdMode2kDCI9590; + s_name2mode["2d96"] = bmdMode2kDCI96; + s_name2mode["2d10"] = bmdMode2kDCI100; + s_name2mode["2d11"] = bmdMode2kDCI11988; + s_name2mode["2d12"] = bmdMode2kDCI120; + s_name2mode["4k23"] = bmdMode4K2160p2398; + s_name2mode["4k24"] = bmdMode4K2160p24; + s_name2mode["4k25"] = bmdMode4K2160p25; + s_name2mode["4k29"] = bmdMode4K2160p2997; + s_name2mode["4k30"] = bmdMode4K2160p30; + s_name2mode["4k47"] = bmdMode4K2160p4795; + s_name2mode["4k48"] = bmdMode4K2160p48; + s_name2mode["4k50"] = bmdMode4K2160p50; + s_name2mode["4k59"] = bmdMode4K2160p5994; + s_name2mode["4k60"] = bmdMode4K2160p60; + s_name2mode["4k95"] = bmdMode4K2160p9590; + s_name2mode["4k96"] = bmdMode4K2160p96; + s_name2mode["4k10"] = bmdMode4K2160p100; + s_name2mode["4k11"] = bmdMode4K2160p11988; + s_name2mode["4k12"] = bmdMode4K2160p120; + s_name2mode["4d23"] = bmdMode4kDCI2398; + s_name2mode["4d24"] = bmdMode4kDCI24; + s_name2mode["4d25"] = bmdMode4kDCI25; + s_name2mode["4d29"] = bmdMode4kDCI2997; + s_name2mode["4d30"] = bmdMode4kDCI30; + s_name2mode["4d47"] = bmdMode4kDCI4795; + s_name2mode["4d48"] = bmdMode4kDCI48; + s_name2mode["4d50"] = bmdMode4kDCI50; + s_name2mode["4d59"] = bmdMode4kDCI5994; + s_name2mode["4d60"] = bmdMode4kDCI60; + s_name2mode["4d95"] = bmdMode4kDCI9590; + s_name2mode["4d96"] = bmdMode4kDCI96; + s_name2mode["4d10"] = bmdMode4kDCI100; + s_name2mode["4d11"] = bmdMode4kDCI11988; + s_name2mode["4d12"] = bmdMode4kDCI120; + s_name2mode["8k23"] = bmdMode8K4320p2398; + s_name2mode["8k24"] = bmdMode8K4320p24; + s_name2mode["8k25"] = bmdMode8K4320p25; + s_name2mode["8k29"] = bmdMode8K4320p2997; + s_name2mode["8k30"] = bmdMode8K4320p30; + s_name2mode["8k47"] = bmdMode8K4320p4795; + s_name2mode["8k48"] = bmdMode8K4320p48; + s_name2mode["8k50"] = bmdMode8K4320p50; + s_name2mode["8k59"] = bmdMode8K4320p5994; + s_name2mode["8k60"] = bmdMode8K4320p60; + s_name2mode["8d23"] = bmdMode8kDCI2398; + s_name2mode["8d24"] = bmdMode8kDCI24; + s_name2mode["8d25"] = bmdMode8kDCI25; + s_name2mode["8d29"] = bmdMode8kDCI2997; + s_name2mode["8d30"] = bmdMode8kDCI30; + s_name2mode["8d47"] = bmdMode8kDCI4795; + s_name2mode["8d48"] = bmdMode8kDCI48; + s_name2mode["8d50"] = bmdMode8kDCI50; + s_name2mode["8d59"] = bmdMode8kDCI5994; + s_name2mode["8d60"] = bmdMode8kDCI60; + s_name2mode["vga6"] = bmdMode640x480p60; + s_name2mode["svg6"] = bmdMode800x600p60; + s_name2mode["wxg5"] = bmdMode1440x900p50; + s_name2mode["wxg6"] = bmdMode1440x900p60; + s_name2mode["sxg5"] = bmdMode1440x1080p50; + s_name2mode["sxg6"] = bmdMode1440x1080p60; + s_name2mode["uxg5"] = bmdMode1600x1200p50; + s_name2mode["uxg6"] = bmdMode1600x1200p60; + s_name2mode["wux5"] = bmdMode1920x1200p50; + s_name2mode["wux6"] = bmdMode1920x1200p60; + s_name2mode["1945"] = bmdMode1920x1440p50; + s_name2mode["1946"] = bmdMode1920x1440p60; + s_name2mode["wqh5"] = bmdMode2560x1440p50; + s_name2mode["wqh6"] = bmdMode2560x1440p60; + s_name2mode["wqx5"] = bmdMode2560x1600p50; + s_name2mode["wqx6"] = bmdMode2560x1600p60; + s_name2mode["rwci"] = bmdModeCintelRAW; + s_name2mode["rwcc"] = bmdModeCintelCompressedRAW; + s_name2mode["iunk"] = bmdModeUnknown; + + /* GStreamer short names */ + s_name2mode["ntsc2398"] = bmdModeNTSC2398; + s_name2mode["pal"] = bmdModePAL; + s_name2mode["ntsc-p"] = bmdModeNTSCp; + s_name2mode["pal-p"] = bmdModePALp; + s_name2mode["1080p2398"] = bmdModeHD1080p2398; + s_name2mode["1080p24"] = bmdModeHD1080p24; + s_name2mode["1080p25"] = bmdModeHD1080p25; + s_name2mode["1080p2997"] = bmdModeHD1080p2997; + s_name2mode["1080p30"] = bmdModeHD1080p30; + s_name2mode["1080i50"] = bmdModeHD1080i50; + s_name2mode["1080i5994"] = bmdModeHD1080i5994; + s_name2mode["1080i60"] = bmdModeHD1080i6000; + s_name2mode["1080p50"] = bmdModeHD1080p50; + s_name2mode["1080p5994"] = bmdModeHD1080p5994; + s_name2mode["1080p60"] = bmdModeHD1080p6000; + s_name2mode["720p50"] = bmdModeHD720p50; + s_name2mode["720p5994"] = bmdModeHD720p5994; + s_name2mode["720p60"] = bmdModeHD720p60; + s_name2mode["1556p2398"] = bmdMode2k2398; + s_name2mode["1556p24"] = bmdMode2k24; + s_name2mode["1556p25"] = bmdMode2k25; + s_name2mode["2kdcip2398"] = bmdMode2kDCI2398; + s_name2mode["2kdcip24"] = bmdMode2kDCI24; + s_name2mode["2kdcip25"] = bmdMode2kDCI25; + s_name2mode["2kdcip2997"] = bmdMode2kDCI2997; + s_name2mode["2kdcip30"] = bmdMode2kDCI30; + s_name2mode["2kdcip50"] = bmdMode2kDCI50; + s_name2mode["2kdcip5994"] = bmdMode2kDCI5994; + s_name2mode["2kdcip60"] = bmdMode2kDCI60; + s_name2mode["2160p2398"] = bmdMode4K2160p2398; + s_name2mode["2160p24"] = bmdMode4K2160p24; + s_name2mode["2160p25"] = bmdMode4K2160p25; + s_name2mode["2160p2997"] = bmdMode4K2160p2997; + s_name2mode["2160p30"] = bmdMode4K2160p30; + s_name2mode["2160p50"] = bmdMode4K2160p50; + s_name2mode["2160p5994"] = bmdMode4K2160p5994; + s_name2mode["2160p60"] = bmdMode4K2160p60; + s_name2mode["4kdcip2398"] = bmdMode4kDCI2398; + s_name2mode["8kdcip2398"] = bmdMode8kDCI2398; + s_name2mode["4kdcip24"] = bmdMode4kDCI24; + s_name2mode["8kdcip24"] = bmdMode8kDCI24; + s_name2mode["4kdcip25"] = bmdMode4kDCI25; + s_name2mode["8kdcip25"] = bmdMode8kDCI25; + s_name2mode["4kdcip2997"] = bmdMode4kDCI2997; + s_name2mode["8kdcip2997"] = bmdMode8kDCI2997; + s_name2mode["4kdcip30"] = bmdMode4kDCI30; + s_name2mode["8kdcip30"] = bmdMode8kDCI30; + s_name2mode["4kdcip50"] = bmdMode4kDCI50; + s_name2mode["8kdcip50"] = bmdMode8kDCI50; + s_name2mode["4kdcip5994"] = bmdMode4kDCI5994; + s_name2mode["8kdcip5994"] = bmdMode8kDCI5994; + s_name2mode["4kdcip60"] = bmdMode4kDCI60; + s_name2mode["8kdcip60"] = bmdMode8kDCI60; + s_name2mode["8kp2398"] = bmdMode8K4320p2398; + s_name2mode["8kp24"] = bmdMode8K4320p24; + s_name2mode["8kp25"] = bmdMode8K4320p25; + s_name2mode["8kp2997"] = bmdMode8K4320p2997; + s_name2mode["8kp30"] = bmdMode8K4320p30; + s_name2mode["8kp50"] = bmdMode8K4320p50; + s_name2mode["8kp5994"] = bmdMode8K4320p5994; + s_name2mode["8kp60"] = bmdMode8K4320p60; + + /* GStreamer long names */ + s_name2mode["NTSC SD 60i"] = bmdModeNTSC; + s_name2mode["NTSC SD 60i (24 fps)"] = bmdModeNTSC2398; + s_name2mode["PAL SD 50i"] = bmdModePAL; + s_name2mode["NTSC SD 60p"] = bmdModeNTSCp; + s_name2mode["PAL SD 50p"] = bmdModePALp; + s_name2mode["HD1080 23.98p"] = bmdModeHD1080p2398; + s_name2mode["HD1080 24p"] = bmdModeHD1080p24; + s_name2mode["HD1080 25p"] = bmdModeHD1080p25; + s_name2mode["HD1080 29.97p"] = bmdModeHD1080p2997; + s_name2mode["HD1080 30p"] = bmdModeHD1080p30; + s_name2mode["HD1080 50i"] = bmdModeHD1080i50; + s_name2mode["HD1080 59.94i"] = bmdModeHD1080i5994; + s_name2mode["HD1080 60i"] = bmdModeHD1080i6000; + s_name2mode["HD1080 50p"] = bmdModeHD1080p50; + s_name2mode["HD1080 59.94p"] = bmdModeHD1080p5994; + s_name2mode["HD1080 60p"] = bmdModeHD1080p6000; + s_name2mode["HD720 50p"] = bmdModeHD720p50; + s_name2mode["HD720 59.94p"] = bmdModeHD720p5994; + s_name2mode["HD720 60p"] = bmdModeHD720p60; + s_name2mode["2k 23.98p"] = bmdMode2k2398; + s_name2mode["2k 24p"] = bmdMode2k24; + s_name2mode["2k 25p"] = bmdMode2k25; + s_name2mode["2k dci 23.98p"] = bmdMode2kDCI2398; + s_name2mode["2k dci 24p"] = bmdMode2kDCI24; + s_name2mode["2k dci 25p"] = bmdMode2kDCI25; + s_name2mode["2k dci 29.97p"] = bmdMode2kDCI2997; + s_name2mode["2k dci 30p"] = bmdMode2kDCI30; + s_name2mode["2k dci 50p"] = bmdMode2kDCI50; + s_name2mode["2k dci 59.94p"] = bmdMode2kDCI5994; + s_name2mode["2k dci 60p"] = bmdMode2kDCI60; + s_name2mode["4k 23.98p"] = bmdMode4K2160p2398; + s_name2mode["4k 24p"] = bmdMode4K2160p24; + s_name2mode["4k 25p"] = bmdMode4K2160p25; + s_name2mode["4k 29.97p"] = bmdMode4K2160p2997; + s_name2mode["4k 30p"] = bmdMode4K2160p30; + s_name2mode["4k 50p"] = bmdMode4K2160p50; + s_name2mode["4k 59.94p"] = bmdMode4K2160p5994; + s_name2mode["4k 60p"] = bmdMode4K2160p60; + s_name2mode["4k dci 23.98p"] = bmdMode4kDCI2398; + s_name2mode["8k dci 23.98p"] = bmdMode8kDCI2398; + s_name2mode["4k dci 24p"] = bmdMode4kDCI24; + s_name2mode["8k dci 24p"] = bmdMode8kDCI24; + s_name2mode["4k dci 25p"] = bmdMode4kDCI25; + s_name2mode["8k dci 25p"] = bmdMode8kDCI25; + s_name2mode["4k dci 29.97p"] = bmdMode4kDCI2997; + s_name2mode["8k dci 29.97p"] = bmdMode8kDCI2997; + s_name2mode["4k dci 30p"] = bmdMode4kDCI30; + s_name2mode["8k dci 30p"] = bmdMode8kDCI30; + s_name2mode["4k dci 50p"] = bmdMode4kDCI50; + s_name2mode["8k dci 50p"] = bmdMode8kDCI50; + s_name2mode["4k dci 59.94p"] = bmdMode4kDCI5994; + s_name2mode["8k dci 59.94p"] = bmdMode8kDCI5994; + s_name2mode["4k dci 60p"] = bmdMode4kDCI60; + s_name2mode["8k dci 60p"] = bmdMode8kDCI60; + s_name2mode["8k 23.98p"] = bmdMode8K4320p2398; + s_name2mode["8k 24p"] = bmdMode8K4320p24; + s_name2mode["8k 25p"] = bmdMode8K4320p25; + s_name2mode["8k 29.97p"] = bmdMode8K4320p2997; + s_name2mode["8k 30p"] = bmdMode8K4320p30; + s_name2mode["8k 50p"] = bmdMode8K4320p50; + s_name2mode["8k 59.94p"] = bmdMode8K4320p5994; + s_name2mode["8k 60p"] = bmdMode8K4320p60; + + + } + std::map::iterator it = s_name2mode.find(name); + if(s_name2mode.end() != it) { + mode=it->second; + return true; + } + return false; + } + + + + IDeckLinkDisplayMode*getDisplayMode(IDeckLinkOutput*dlo, const std::string&formatname, int formatnum) { IDeckLinkDisplayModeIterator*dmi = NULL; IDeckLinkDisplayMode*displayMode = NULL; int count=formatnum; + BMDDisplayMode mode = bmdModeUnknown; + bool have_mode = name2mode(formatname, mode); + if(S_OK == dlo->GetDisplayModeIterator(&dmi)) { while(S_OK == dmi->Next(&displayMode)) { if (formatnum<0 && formatname.empty()) { @@ -51,11 +315,14 @@ IDeckLinkDisplayMode*getDisplayMode(IDeckLinkOutput*dlo, if (S_OK == displayMode->GetName(&dmn)) { std::string dmns = deckstring2string(dmn); bool found=(formatname == dmns); - verbose(1, "[GEM:videoDECKLINK] checking format '%s'", dmns.c_str()); + logpost(0, 3+1, "[GEM:videoDECKLINK] checking format '%s'", dmns.c_str()); free_deckstring(dmn); if(found) { break; } + if(have_mode && displayMode->GetDisplayMode() == mode) { + break; + } } } // else check the format index @@ -177,10 +444,13 @@ class VideoOutputter : public IDeckLinkVideoOutputCallback #endif if (m_videoFrame->GetPixelFormat() != srcformat) { - if(srcformat != bmdFormatUnspecified) { + result = E_NOTIMPL; + switch(srcformat) { + case bmdFormatUnspecified: + case gemBmdFormat8BitRGBA: + break; + default: result = m_frameConverter?m_frameConverter->ConvertFrame(isw, m_videoFrame):E_NOTIMPL; - } else { - result = E_NOTIMPL; } if (result != S_OK) { @@ -197,6 +467,12 @@ class VideoOutputter : public IDeckLinkVideoOutputCallback } } +#if 0 + post("schedule image %p[%dx%d@%s]" + , isw, (int)isw->GetWidth(), (int)isw->GetHeight(), pixformat2string(isw->GetPixelFormat()).c_str() + ); +#endif + result = m_deckLinkOutput->ScheduleVideoFrame(isw, (m_totalFramesScheduled * m_frameDuration), m_frameDuration, m_frameTimescale); if (result != S_OK) { fprintf(stderr, "Failed to schedule frame: 0x%X\n", (unsigned int)result); @@ -243,7 +519,7 @@ recordDECKLINK :: recordDECKLINK(void) m_pixBlock.image.xsize = 1920; m_pixBlock.image.ysize = 1080; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); m_pixBlock.image.xsize = -1; m_pixBlock.image.ysize = -1; @@ -291,8 +567,7 @@ bool recordDECKLINK :: start(const std::string&filename, gem::Properties&props) BMDVideoConnection vconn = m_connectionType; std::vectorkeys=props.keys(); - int i; - for(i=0; iGetName(&dmn)) { std::string dmns = deckstring2string(dmn); bool found=(formatname == dmns); - verbose(1, "[GEM:videoDECKLINK] checking format '%s'", dmns.c_str()); + logpost(0, 3+1, "[GEM:videoDECKLINK] checking format '%s'", dmns.c_str()); free_deckstring(dmn); if(found) { break; @@ -267,7 +267,7 @@ videoDECKLINK::videoDECKLINK(void) m_pixBlock.image.xsize = 1920; m_pixBlock.image.ysize = 1080; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); m_pixBlock.image.xsize = -1; m_pixBlock.image.ysize = -1; @@ -462,7 +462,7 @@ void videoDECKLINK::setFrame(unsigned int w, unsigned int h, unsigned int format m_mutex.lock(); m_pixBlock.image.xsize=w; m_pixBlock.image.ysize=h; - m_pixBlock.image.setCsizeByFormat(format); + m_pixBlock.image.setFormat(format); m_pixBlock.image.reallocate(); m_pixBlock.image.fromUYVY(data); @@ -557,7 +557,7 @@ bool videoDECKLINK::enumProperties(gem::Properties&readable, void videoDECKLINK::setProperties(gem::Properties&props) { if(trySetProperties(props, true)) { - verbose(1, "[GEM::videoDECKLINK] needs restart"); + logpost(0, 3+1, "[GEM::videoDECKLINK] needs restart"); if(m_dlInput) { stop(); start(); @@ -569,8 +569,7 @@ bool videoDECKLINK::trySetProperties(gem::Properties&props, bool canrestart) { bool needrestart = false; std::vectorkeys=props.keys(); - int i=0; - for(i=0; ikeys=props.keys(); - unsigned int i; - for(i=0; i=ports) { closeDevice(); @@ -230,12 +228,12 @@ bool videoDV4L :: openDevice(gem::Properties&props) m_dvfd = raw1394_get_fd(m_raw); if(m_dvfd<0) { - verbose(0, "[GEM:videoDV4L] illegal filedescriptor"); + logpost(0, 3+0, "[GEM:videoDV4L] illegal filedescriptor"); closeDevice(); return false; } - verbose(1, "[GEM:videoDV4L] successfully opened device %d", devnum); + logpost(0, 3+1, "[GEM:videoDV4L] successfully opened device %d", devnum); setProperties(props); @@ -270,7 +268,7 @@ bool videoDV4L :: startTransfer() m_image.image.data=0; m_image.image.xsize=720; m_image.image.ysize=576; - m_image.image.setCsizeByFormat(m_reqFormat); + m_image.image.setFormat(m_reqFormat); m_image.image.reallocate(); if(NULL==m_raw) { @@ -290,7 +288,7 @@ bool videoDV4L :: startTransfer() } m_decoder->quality=m_quality; - verbose(1, "[GEM:videoDV4L] DV decoding quality %d ", m_decoder->quality); + logpost(0, 3+1, "[GEM:videoDV4L] DV decoding quality %d ", m_decoder->quality); m_iec = iec61883_dv_fb_init(m_raw, iec_frame, this); if(NULL==m_iec) { @@ -331,8 +329,7 @@ bool videoDV4L :: stopTransfer() m_decoder=NULL; } - int i=0; - for(i=0; i<3; i++) { + for(int i=0; i<3; i++) { if(m_frame[i]) { delete[]m_frame[i]; } @@ -356,7 +353,7 @@ bool videoDV4L :: setColor(int format) } m_reqFormat=format; lock(); - m_image.image.setCsizeByFormat(m_reqFormat); + m_image.image.setFormat(m_reqFormat); unlock(); return true; } @@ -399,8 +396,7 @@ std::vector videoDV4L::enumerate() struct raw1394_portinfo*pinf=new struct raw1394_portinfo[num_pinf]; int ports = raw1394_get_port_info(handle, pinf, num_pinf); - int i=0; - for(i=0; iseek2any = 1; if ((ret = avformat_find_stream_info(m_avformat, NULL)) < 0) { - verbose(0, "[GEM:filmFFMPEG] Unable to find stream information in %s", filename); + logpost(0, 3+0, "[GEM:filmFFMPEG] Unable to find stream information in %s", filename); show_error(ret); close(); return false; @@ -129,7 +129,7 @@ bool filmFFMPEG :: open(const std::string&sfilename, ret = av_find_best_stream(m_avformat, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); int stream_index = ret; if(ret < 0) { - verbose(0, "[GEM:filmFFMPEG] Could not find video stream in %s", filename); + logpost(0, 3+0, "[GEM:filmFFMPEG] Could not find video stream in %s", filename); show_error(ret); close(); return false; @@ -147,27 +147,27 @@ bool filmFFMPEG :: open(const std::string&sfilename, if(!dec) dec = avcodec_find_decoder(st->codecpar->codec_id); if(!dec) { - verbose(0, "[GEM:filmFFMPEG] Failed to find video codec for %s", filename); + logpost(0, 3+0, "[GEM:filmFFMPEG] Failed to find video codec for %s", filename); close(); return false; } m_avdecoder = avcodec_alloc_context3(dec); if(!m_avdecoder) { - verbose(0, "[GEM:filmFFMPEG] Failed to allocate the video codec context"); + logpost(0, 3+0, "[GEM:filmFFMPEG] Failed to allocate the video codec context"); close(); return false; } /* Copy codec parameters from input stream to output codec context */ if ((ret = avcodec_parameters_to_context(m_avdecoder, st->codecpar)) < 0) { - verbose(0, "[GEM:filmFFMPEG] Failed to copy video codec parameters to decoder context"); + logpost(0, 3+0, "[GEM:filmFFMPEG] Failed to copy video codec parameters to decoder context"); show_error(ret); close(); return false; } /* Init the decoders */ if ((ret = avcodec_open2(m_avdecoder, dec, NULL)) < 0) { - verbose(0, "[GEM:filmFFMPEG] Failed to open codec"); + logpost(0, 3+0, "[GEM:filmFFMPEG] Failed to open codec"); show_error(ret); close(); return false; @@ -179,7 +179,7 @@ bool filmFFMPEG :: open(const std::string&sfilename, m_numFrames = m_avstream->nb_frames; m_image.image.xsize = m_avdecoder->width; m_image.image.ysize = m_avdecoder->height; - m_image.image.setCsizeByFormat(GEM_RGBA); + m_image.image.setFormat(GEM_RGBA); m_image.image.reallocate(); m_image.newfilm = true; @@ -269,7 +269,7 @@ void filmFFMPEG :: initConverter(const int width, const int height, const int fo ) { m_image.image.xsize = width; m_image.image.ysize = height; - m_image.image.setCsizeByFormat(gformat); + m_image.image.setFormat(gformat); m_image.image.reallocate(); m_image.newfilm = true; } @@ -307,7 +307,7 @@ int filmFFMPEG :: decodePacket(void) // submit the packet to the decoder int ret = avcodec_send_packet(m_avdecoder, m_avpacket); if (ret < 0) { - verbose(0, "[GEM:filmFFMPEG] Error submitting packet for decoding (%d)", ret); + logpost(0, 3+0, "[GEM:filmFFMPEG] Error submitting packet for decoding (%d)", ret); show_error(ret); return ret; } @@ -321,7 +321,7 @@ int filmFFMPEG :: decodePacket(void) if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) return 0; - verbose(0, "[GEM:filmFFMPEG] Error during decoding (%d)", ret); + logpost(0, 3+0, "[GEM:filmFFMPEG] Error during decoding (%d)", ret); show_error(ret); return ret; } @@ -331,7 +331,7 @@ int filmFFMPEG :: decodePacket(void) #if 0 if(1) { enum AVPixelFormat pix_fmt = (AVPixelFormat)m_avframe->format; - verbose(0, "[GEM:filmFFMPEG] decoded VIDEO for %lu/%lu: %dx%d@%s!" + logpost(0, 3+0, "[GEM:filmFFMPEG] decoded VIDEO for %lu/%lu: %dx%d@%s!" , (unsigned long)m_avframe->pts, (unsigned long)m_avframe->pkt_dts , m_avframe->width, m_avframe->height, av_get_pix_fmt_name(pix_fmt) ); @@ -339,7 +339,7 @@ int filmFFMPEG :: decodePacket(void) #endif ret = convertFrame(); } else { - verbose(0, "[GEM:filmFFMPEG] ouch. unexpected type %s", av_get_media_type_string(m_avdecoder->codec->type)); + logpost(0, 3+0, "[GEM:filmFFMPEG] ouch. unexpected type %s", av_get_media_type_string(m_avdecoder->codec->type)); } av_frame_unref(m_avframe); @@ -471,8 +471,7 @@ void filmFFMPEG::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i %s", i, + logpost(0, 3+1, "[GEM:filmGMERLIN] Found redirector:"); + for(int i = 0; i < num_urls; i++) { + logpost(0, 3+1, "[GEM:filmGMERLIN] #%d: '%s' -> %s", i, bgav_redirector_get_name(m_file, i), bgav_redirector_get_url(m_file, i)); } - for(i = 0; i < num_urls; i++) { + for(int i = 0; i < num_urls; i++) { filename=(char*)bgav_redirector_get_url(m_file, i); close(); if (open(filename, wantProps)) { @@ -245,7 +249,7 @@ bool filmGMERLIN :: open(const std::string&sfilename, if(numvstreams) { bgav_select_track(m_file, m_track); } else { - verbose(1, + logpost(0, 3+1, "[GEM:filmGMERLIN] track %d does not contain a video-stream: skipping", m_track); } @@ -262,6 +266,12 @@ bool filmGMERLIN :: open(const std::string&sfilename, m_gframe = gavl_video_frame_create_nopad(gformat); + /* check if we have a valid dimension */ + if(!gformat->frame_width || !gformat->frame_height) { + close(); + return false; + } + gavl_video_format_t finalformat[1]; finalformat->frame_width = gformat->frame_width; finalformat->frame_height = gformat->frame_height; @@ -286,14 +296,13 @@ bool filmGMERLIN :: open(const std::string&sfilename, #endif m_finalframe = gavl_video_frame_create_nopad(finalformat); - m_doConvert= (gavl_video_converter_init (m_gconverter, gformat, - finalformat)>0); + m_doConvert = (gavl_video_converter_init (m_gconverter, gformat, finalformat)>0); m_image.image.xsize=gformat->frame_width; m_image.image.ysize=gformat->frame_height; #ifdef __APPLE__ - m_image.image.setCsizeByFormat(GEM_YUV); + m_image.image.setFormat(GEM_YUV); #else - m_image.image.setCsizeByFormat(GEM_RGBA); + m_image.image.setFormat(GEM_RGBA); #endif m_image.image.not_owned=true; m_image.image.upsidedown=true; @@ -309,7 +318,8 @@ bool filmGMERLIN :: open(const std::string&sfilename, m_fps_denum=gformat->frame_duration; m_numFrames=-1; -#ifdef USE_FRAMETABLE + +#if USE_FRAMETABLE m_frametable=bgav_get_frame_table(m_file, m_track); if(m_frametable) { m_numFrames=gavl_frame_table_num_frames (m_frametable); @@ -374,11 +384,11 @@ film::errCode filmGMERLIN :: changeImage(int imgNum, int trackNum) m_numTracks); } else { int numvstreams=bgav_num_video_streams (m_file, m_track); - verbose(1, "[GEM:filmGMERLIN] track %d contains %d video streams", m_track, + logpost(0, 3+1, "[GEM:filmGMERLIN] track %d contains %d video streams", m_track, numvstreams); if(numvstreams) { bgav_select_track(m_file, m_track); -#ifdef USE_FRAMETABLE +#if USE_FRAMETABLE if(m_frametable) { gavl_frame_table_destroy(m_frametable); m_frametable=bgav_get_frame_table(m_file, m_track); @@ -397,7 +407,11 @@ film::errCode filmGMERLIN :: changeImage(int imgNum, int trackNum) if(bgav_can_seek(m_file)) { if(0) { -#ifdef USE_FRAMETABLE +#if HAVE_BGAV_SEEK_TO_VIDEO_FRAME + } else if (1) { + bgav_seek_to_video_frame(m_file, m_track, imgNum); + return film::SUCCESS; +#elif USE_FRAMETABLE } else if(m_frametable) { // no assumptions about fixed framerate int64_t seekpos = gavl_frame_table_frame_to_time(m_frametable, imgNum, @@ -464,8 +478,7 @@ void filmGMERLIN::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i # include -# if BGAV_BUILD >= BGAV_MAKE_BUILD(1,0,2) -# define USE_FRAMETABLE +# if BGAV_BUILD >= BGAV_MAKE_BUILD(1,0,2) && !HAVE_BGAV_SEEK_TO_VIDEO_FRAME +# define USE_FRAMETABLE 1 # else -# undef USE_FRAMETABLE +# define USE_FRAMETABLE 0 # endif # ifdef HAVE_GAVL_LOG_H diff --git a/plugins/HALCON/halcon.m4 b/plugins/HALCON/halcon.m4 index c0d2651c0..75ce82409 100644 --- a/plugins/HALCON/halcon.m4 +++ b/plugins/HALCON/halcon.m4 @@ -12,9 +12,9 @@ AC_DEFUN([GEM_CHECK_HALCON], AC_ARG_VAR([HALCONROOT], [root-directory where you installed HALCON (override this with '--with-halcon=${HALCONROOT}'])dnl AC_ARG_VAR([HALCONARCH], [architecture for you HALCON-installation (e.g. 'x86-linux2.4-gcc40'])dnl AC_ARG_WITH([halcon], - AC_HELP_STRING([--with-halcon], [enable HALCON video capturing (overrides $HALCONROOT)])) + AS_HELP_STRING([--with-halcon], [enable HALCON video capturing (overrides $HALCONROOT)])) AC_ARG_WITH([halconarch], - AC_HELP_STRING([--with-halconarch], [set halcon-arch (overrides $HALCONARCH])) + AS_HELP_STRING([--with-halconarch], [set halcon-arch (overrides $HALCONARCH])) have_halcon="no" if test "x$with_halcon" != "xno"; then diff --git a/plugins/HALCON/videoHALCON.cpp b/plugins/HALCON/videoHALCON.cpp index 37b0f02ac..307ca6a3f 100644 --- a/plugins/HALCON/videoHALCON.cpp +++ b/plugins/HALCON/videoHALCON.cpp @@ -63,8 +63,7 @@ static std::vectorgetBackends(void) +GemDylib::getDefaultExtension(); std::vectorlisting=gem::files::getFilenameListing(pattern); - int i=0; - for(i=0; igetBackends(void) s_backends.push_back(backend); } } catch (Halcon::HException &except) { - verbose(1, + logpost(0, 3+1, "[GEM::videoHALCON] trying to get framegraber info returned: %s", except.message); } @@ -111,9 +110,7 @@ videoHALCON :: videoHALCON() : videoBase("halcon"), Halcon::HException::InstallHHandler(&MyHalconExceptionHandler); m_backends=getBackends(); if(m_backends.size()>0) { - int i=0; - - for(i=0; i parsed = split(devicename, ':'); switch(parsed.size()) { default: - verbose(0, "[GEM:videoHALCON] could not parse '%s'", devicename.c_str()); + logpost(0, 3+0, "[GEM:videoHALCON] could not parse '%s'", devicename.c_str()); return name; case 3: if(parsed[2].size()>0) { @@ -247,9 +243,9 @@ static std::string parsedevicename(std::string devicename, case 1: name=parsed[0]; } - verbose(1, "[GEM:videoHALCON] name ='%s'", name.c_str()); - verbose(1, "[GEM:videoHALCON] camera='%s'", cameratype.c_str()); - verbose(1, "[GEM:videoHALCON] device='%s'", device.c_str()); + logpost(0, 3+1, "[GEM:videoHALCON] name ='%s'", name.c_str()); + logpost(0, 3+1, "[GEM:videoHALCON] camera='%s'", cameratype.c_str()); + logpost(0, 3+1, "[GEM:videoHALCON] device='%s'", device.c_str()); return name; } @@ -260,9 +256,7 @@ static std::string parsedevicename(std::string devicename, static void printtuple(Halcon::HTuple t) { - int i=0; - for(i=0; i< t.Num(); i++) { - + for(int i=0; i< t.Num(); i++) { Halcon::HCtrlVal v=t[i]; std::cerr<<"["< videoHALCON::enumerate() backends.push_back(m_backendname); } - int i=0; - - for(i=0; i videoHALCON::enumerate() continue; } - int j=0; - for(j=0; j videoHALCON::enumerate() bool videoHALCON::enumProperties(gem::Properties&readable, gem::Properties&writeable) { - int i=0; gem::any typeval; (void*)0; @@ -537,7 +527,7 @@ bool videoHALCON::enumProperties(gem::Properties&readable, &Information, &ValueList); if(ValueList.Num()>0) { - for(i=0; i< ValueList.Num(); i++) { + for(int i=0; i< ValueList.Num(); i++) { Halcon::HCtrlVal v=ValueList[i]; if(v.ValType() == Halcon::StringVal) { readable.set(v.S(), typeval); @@ -549,7 +539,7 @@ bool videoHALCON::enumProperties(gem::Properties&readable, } } } catch (Halcon::HException &except) { - verbose(0, "[GEM:videoHALCON] enumProperties %s", except.message); + logpost(0, 3+0, "[GEM:videoHALCON] enumProperties %s", except.message); } try { @@ -560,7 +550,7 @@ bool videoHALCON::enumProperties(gem::Properties&readable, &Information, &ValueList); if(ValueList.Num()>0) { - for(i=0; i< ValueList.Num(); i++) { + for(int i=0; i< ValueList.Num(); i++) { Halcon::HCtrlVal v=ValueList[i]; if(v.ValType() == Halcon::StringVal) { readable.set(v.S(), typeval); @@ -574,7 +564,7 @@ bool videoHALCON::enumProperties(gem::Properties&readable, } } } catch (Halcon::HException &except) { - verbose(0, "[GEM:videoHALCON] enumProperties[R/O] %s", except.message); + logpost(0, 3+0, "[GEM:videoHALCON] enumProperties[R/O] %s", except.message); } try { @@ -585,7 +575,7 @@ bool videoHALCON::enumProperties(gem::Properties&readable, &Information, &ValueList); if(ValueList.Num()>0) { - for(i=0; i< ValueList.Num(); i++) { + for(int i=0; i< ValueList.Num(); i++) { Halcon::HCtrlVal v=ValueList[i]; if(v.ValType() == Halcon::StringVal) { writeable.set(v.S(), typeval); @@ -599,7 +589,7 @@ bool videoHALCON::enumProperties(gem::Properties&readable, } } } catch (Halcon::HException &except) { - verbose(0, "[GEM:videoHALCON] enumProperties[W/O] %s", except.message); + logpost(0, 3+0, "[GEM:videoHALCON] enumProperties[W/O] %s", except.message); } return true; @@ -611,8 +601,7 @@ void videoHALCON::setProperties(gem::Properties&props) return; } std::vectorkeys=props.keys(); - int i=0; - for(i=0; ikeys=props.keys(); - int i=0; - for(i=0; iGetFramegrabberParam(key.c_str()); gem::any nonetype; - int j=0; - for(j=0; j< hresult.Num(); j++) { + for(int j=0; j< hresult.Num(); j++) { Halcon::HCtrlVal v=hresult[j]; switch(v.ValType()) { case Halcon::LongVal: diff --git a/plugins/JPEG/Makefile.am b/plugins/JPEG/Makefile.am index 7c5b456a4..1ee798399 100644 --- a/plugins/JPEG/Makefile.am +++ b/plugins/JPEG/Makefile.am @@ -7,9 +7,14 @@ EXTRA_DIST += win-vs2003/imageJPEG.sln win-vs2003/imageJPEG.vcproj EXTRA_DIST += win-vs2008/imageJPEG.sln win-vs2008/imageJPEG.vcproj EXTRA_DIST += win-vs2008/JPEG.vsprops + +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = pkglib_LTLIBRARIES= + if HAVE_LIB_JPEG pkglib_LTLIBRARIES+= gem_imageJPEG.la +dist_gemhelp_DATA += jpeg-imageloaderplugin.pd jpeg-imagesaverplugin.pd endif gem_imageJPEG_la_CXXFLAGS = diff --git a/plugins/JPEG/imageJPEG.cpp b/plugins/JPEG/imageJPEG.cpp index e7211e6b7..ad6e36ddd 100644 --- a/plugins/JPEG/imageJPEG.cpp +++ b/plugins/JPEG/imageJPEG.cpp @@ -150,13 +150,13 @@ bool imageJPEG :: load(std::string filename, imageStruct&result, // do we have an RGB image? if (cinfo.jpeg_color_space == JCS_RGB) { - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); } else if (cinfo.jpeg_color_space == JCS_GRAYSCALE) { // do we have a gray8 image? - result.setCsizeByFormat(GEM_GRAY); + result.setFormat(GEM_GRAY); } else { // something else, so decompress as RGB - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); cinfo.out_color_space = JCS_RGB; } diff --git a/plugins/JPEG/jpeg-imageloaderplugin.pd b/plugins/JPEG/jpeg-imageloaderplugin.pd new file mode 100644 index 000000000..738f2b794 --- /dev/null +++ b/plugins/JPEG/jpeg-imageloaderplugin.pd @@ -0,0 +1,4 @@ +#N canvas 977 251 588 226 12; +#X text 21 44 The JPEG plugin can load JPEG images.; +#X text 29 78 Note that any orientation metadata embedded into the image (like an upside-down flag) will be *ignored*.; +#X text 34 143 This plugins requires libJPEG.; diff --git a/plugins/JPEG/jpeg-imagesaverplugin.pd b/plugins/JPEG/jpeg-imagesaverplugin.pd new file mode 100644 index 000000000..0144b5a53 --- /dev/null +++ b/plugins/JPEG/jpeg-imagesaverplugin.pd @@ -0,0 +1,5 @@ +#N canvas 1042 282 588 226 12; +#X text 31 173 This plugins requires libJPEG.; +#X text 21 44 The JPEG plugin can write JPEG images.; +#X text 29 78 All images will be converted to RGB before saving.; +#X text 29 101 You can set the 'quality' property to adjust the compression level.; diff --git a/plugins/MPEG1/filmMPEG1.cpp b/plugins/MPEG1/filmMPEG1.cpp index 2fd3fdfd9..16a198aad 100644 --- a/plugins/MPEG1/filmMPEG1.cpp +++ b/plugins/MPEG1/filmMPEG1.cpp @@ -102,7 +102,7 @@ bool filmMPEG1 :: open(const std::string&filename, int format) goto unsupported; } - m_image.image.setCsizeByFormat(wantedFormat); + m_image.image.setFormat(wantedFormat); m_image.image.reallocate(); int length=m_image.image.xsize*m_image.image.ysize; @@ -222,8 +222,7 @@ void filmMPEG1::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; iversion()); + logpost(0, 3+1, "[GEM::%s] %s", prefix, result->version()); } return result; } notfound: if(firsttime) { - verbose(1, "[GEM:%s] Please (re)install the NewTek NDI Runtimes to use this plugin.", prefix); - verbose(1, " need to find the library '%s'", NDILIB_LIBRARY_NAME); + logpost(0, 3+1, "[GEM:%s] Please (re)install the NewTek NDI Runtimes to use this plugin.", prefix); + logpost(0, 3+1, " need to find the library '%s'", NDILIB_LIBRARY_NAME); if (std::string("") != NDILIB_REDIST_URL) - verbose(1, " get the NewTek Runtimes from %s", NDILIB_REDIST_URL); - verbose(1, " use the '%s' environment variable to set the path to the library.", NDILIB_REDIST_FOLDER); + logpost(0, 3+1, " get the NewTek Runtimes from %s", NDILIB_REDIST_URL); + logpost(0, 3+1, " use the '%s' environment variable to set the path to the library.", NDILIB_REDIST_FOLDER); if(p_NDI_runtime_folder) - verbose(1, " (currently set to '%s').", p_NDI_runtime_folder); + logpost(0, 3+1, " (currently set to '%s').", p_NDI_runtime_folder); } return 0; } diff --git a/plugins/NDI/recordNDI.cpp b/plugins/NDI/recordNDI.cpp index 301f5095d..5faf96ef5 100644 --- a/plugins/NDI/recordNDI.cpp +++ b/plugins/NDI/recordNDI.cpp @@ -19,7 +19,7 @@ #include "recordNDI.h" -// for verbose(): +// for logpost(0, 3+): #include "Gem/RTE.h" #include "Gem/Exception.h" diff --git a/plugins/NDI/recordNDI.h b/plugins/NDI/recordNDI.h index 258e69940..3f75c4b66 100644 --- a/plugins/NDI/recordNDI.h +++ b/plugins/NDI/recordNDI.h @@ -90,10 +90,8 @@ class GEM_EXPORT recordNDI : public record virtual const std::string getCodecDescription(const std::string&); virtual bool enumProperties(gem::Properties&); - virtual bool dialog(void) - { - return false; - } + virtual void getProperties(gem::Properties&props) {;}; + virtual bool dialog(void) { return false; } private: diff --git a/plugins/NDI/videoNDI.cpp b/plugins/NDI/videoNDI.cpp index c57faceff..d0d328d2b 100644 --- a/plugins/NDI/videoNDI.cpp +++ b/plugins/NDI/videoNDI.cpp @@ -156,7 +156,7 @@ std::vector videoNDI::enumerate() for(uint32_t i=0; i= no_srcs) { - verbose(1, "[GEM:videoNDI] device '%s' does not exist, skipping", m_devicename.c_str()); + logpost(0, 3+1, "[GEM:videoNDI] device '%s' does not exist, skipping", m_devicename.c_str()); return false; } } - verbose(1, "[GEM:videoNDI] opening device '%s'", m_devicename.c_str()); + logpost(0, 3+1, "[GEM:videoNDI] opening device '%s'", m_devicename.c_str()); m_ndi_recv = NDI->recv_create_v3(NULL); @@ -266,7 +266,7 @@ bool videoNDI :: stop() bool videoNDI :: reset() { MARK(); - verbose(0, "[GEM:videoNDI] 'reset' not implemented"); + logpost(0, 3+0, "[GEM:videoNDI] 'reset' not implemented"); return false; } @@ -293,18 +293,18 @@ pixBlock*videoNDI::getFrame(void) break; case NDIlib_FourCC_video_type_P216: case NDIlib_FourCC_video_type_PA16: - verbose(1, "[GEM:videoNDI] unknown format P..."); + logpost(0, 3+1, "[GEM:videoNDI] unknown format P..."); return NULL; case NDIlib_FourCC_video_type_YV12: case NDIlib_FourCC_video_type_I420: case NDIlib_FourCC_video_type_NV12: - verbose(1, "[GEM:videoNDI] unknown format Y..."); + logpost(0, 3+1, "[GEM:videoNDI] unknown format Y..."); return NULL; default: - verbose(1, "[GEM:videoNDI] unknown format..."); + logpost(0, 3+1, "[GEM:videoNDI] unknown format..."); return NULL; } - m_pixBlock.image.setCsizeByFormat(); + m_pixBlock.image.setFormat(); m_pixBlock.image.data = m_ndi_frame.p_data; m_pixBlock.image.not_owned = 1; m_pixBlock.newimage = 1; @@ -316,7 +316,7 @@ pixBlock*videoNDI::getFrame(void) pd_error(0, "[GEM:videoNDI] lost connection"); return NULL; case NDIlib_frame_type_audio: - verbose(2, "[GEM:videoNDI] got audio frame"); + logpost(0, 3+2, "[GEM:videoNDI] got audio frame"); break; case NDIlib_frame_type_none: default: diff --git a/plugins/OBJ/Makefile.am b/plugins/OBJ/Makefile.am index 4dab23070..9e4e3c3a2 100644 --- a/plugins/OBJ/Makefile.am +++ b/plugins/OBJ/Makefile.am @@ -8,6 +8,10 @@ EXTRA_DIST += win-vs2008/modelOBJ.sln win-vs2008/modelOBJ.vcproj pkglib_LTLIBRARIES= gem_modelOBJ.la +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = +dist_gemhelp_DATA += OBJ-modelplugin.pd + gem_modelOBJ_la_CXXFLAGS = gem_modelOBJ_la_LDFLAGS = -module -avoid-version -shared if WINDOWS diff --git a/plugins/OBJ/OBJ-modelplugin.pd b/plugins/OBJ/OBJ-modelplugin.pd new file mode 100644 index 000000000..976bcd611 --- /dev/null +++ b/plugins/OBJ/OBJ-modelplugin.pd @@ -0,0 +1,14 @@ +#N canvas 242 133 450 499 12; +#X text 26 30 With the OBJ backend \, you can load Alias Wavefront OBJ files.; +#X text 21 74 This is a simple text-based format \, and the loader does not require any additional dependencies (so should be available on all installations of Gem).; +#X obj 95 416 s \$1-ctl; +#X text 178 232 smoothing (0..1); +#X msg 112 302 reverse \$1; +#X obj 112 278 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X msg 104 233 smooth \$1; +#X obj 107 207 hsl 170 20 0 1 0 0 empty empty empty -2 -10 0 12 #fcfcfc #000000 #000000 0 1; +#X text 143 281 reverse winding; +#X connect 4 0 2 0; +#X connect 5 0 4 0; +#X connect 6 0 2 0; +#X connect 7 0 6 0; diff --git a/plugins/OBJ/modelOBJ.cpp b/plugins/OBJ/modelOBJ.cpp index 7bfc3aafb..ec132fa63 100644 --- a/plugins/OBJ/modelOBJ.cpp +++ b/plugins/OBJ/modelOBJ.cpp @@ -60,9 +60,8 @@ bool modelOBJ :: open(const std::string&name, #if 0 std::vectorkeys=requestprops.keys(); - unsigned int i; - for(i=0; ikeys=props.keys(); - unsigned int i; props.clear(); - for(i=0; imaterials[nummaterials].name = std::string(buf); } else { - verbose(0, "[GEM:modelOBJ] _glmReadMTL() failed reading material"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadMTL() failed reading material"); } break; case 'N': @@ -469,7 +469,7 @@ _glmReadMTL(GLMmodel* model, const std::string&name) model->materials[nummaterials].shininess /= 1000.0; model->materials[nummaterials].shininess *= 128.0; } else { - verbose(0, + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadMTL() failed reading material shininess"); } break; @@ -481,7 +481,7 @@ _glmReadMTL(GLMmodel* model, const std::string&name) &model->materials[nummaterials].diffuse[1], &model->materials[nummaterials].diffuse[2])) { } else { - verbose(0, "[GEM:modelOBJ] _glmReadMTL() failed reading diffuse material"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadMTL() failed reading diffuse material"); } break; case 's': @@ -490,7 +490,7 @@ _glmReadMTL(GLMmodel* model, const std::string&name) &model->materials[nummaterials].specular[1], &model->materials[nummaterials].specular[2])) { } else { - verbose(0, + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadMTL() failed reading specular material"); } break; @@ -500,13 +500,13 @@ _glmReadMTL(GLMmodel* model, const std::string&name) &model->materials[nummaterials].ambient[1], &model->materials[nummaterials].ambient[2])) { } else { - verbose(0, "[GEM:modelOBJ] _glmReadMTL() failed reading ambient material"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadMTL() failed reading ambient material"); } break; default: /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmReadMTL() really failed reading K"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmReadMTL() really failed reading K"); continue; } break; @@ -515,7 +515,7 @@ _glmReadMTL(GLMmodel* model, const std::string&name) default: /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmReadMTL() really failed reading"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmReadMTL() really failed reading"); continue; } break; @@ -551,7 +551,7 @@ _glmWriteMTL(const GLMmodel* model, const char* modelpath, /* open the file */ file = fopen(filename.c_str(), "w"); if (!file) { - verbose(0, "[GEM:modelOBJ] _glmWriteMTL() failed: can't open file \"%s\".", + logpost(0, 3+0, "[GEM:modelOBJ] _glmWriteMTL() failed: can't open file \"%s\".", filename.c_str()); return GL_FALSE; } @@ -608,7 +608,7 @@ _glmFirstPass(GLMmodel* model, FILE* file) case '#': /* comment */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass failed reading comment"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass failed reading comment"); continue; } break; @@ -617,7 +617,7 @@ _glmFirstPass(GLMmodel* model, FILE* file) case '\0': /* vertex */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmFirstPass failed reading vertex"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass failed reading vertex"); return GL_FALSE; } numvertices++; @@ -625,7 +625,7 @@ _glmFirstPass(GLMmodel* model, FILE* file) case 'n': /* normal */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmFirstPass failed reading normals"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass failed reading normals"); return GL_FALSE; } numnormals++; @@ -633,45 +633,45 @@ _glmFirstPass(GLMmodel* model, FILE* file) case 't': /* texcoord */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmFirstPass failed reading texcoords"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass failed reading texcoords"); return GL_FALSE; } numtexcoords++; break; default: - verbose(0, "[GEM:modelOBJ] _glmFirstPass: Unknown token \"%s\".", buf); + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass: Unknown token \"%s\".", buf); return GL_FALSE; } break; case 'm': if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmFirstPass failed reading material"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass failed reading material"); return GL_FALSE; } if(EOF != sscanf(buf, "%s %s", buf, buf)) { model->mtllibname = buf; _glmReadMTL(model, buf); } else { - verbose(0, "[GEM:modelOBJ] glmFirstPass failed reading material lib"); + logpost(0, 3+0, "[GEM:modelOBJ] glmFirstPass failed reading material lib"); } break; case 'u': /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass failed reading u"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass failed reading u"); continue; } break; case 'g': /* group */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmFirstPass failed reading groups"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass failed reading groups"); return GL_FALSE; } #if SINGLE_STRING_GROUP_NAMES if(EOF != sscanf(buf, "%s", buf)) { } else { - verbose(0, + logpost(0, 3+0, "[GEM:modelOBJ] _glmFirstPass failed reading single-string group name"); return GL_FALSE; } @@ -688,13 +688,13 @@ _glmFirstPass(GLMmodel* model, FILE* file) if (strstr(buf, "//")) { /* v//n */ if(EOF == sscanf(buf, "%d//%d", &v, &n)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/n."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/n."); } if(EOF == fscanf(file, "%d//%d", &v, &n)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/n.."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/n.."); } if(EOF == fscanf(file, "%d//%d", &v, &n)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/n..."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/n..."); } numtriangles++; group->numtriangles++; @@ -705,10 +705,10 @@ _glmFirstPass(GLMmodel* model, FILE* file) } else if (sscanf(buf, "%d/%d/%d", &v, &t, &n) == 3) { /* v/t/n */ if(EOF == fscanf(file, "%d/%d/%d", &v, &t, &n)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t/n."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t/n."); } if(EOF == fscanf(file, "%d/%d/%d", &v, &t, &n)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t/n.."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t/n.."); } numtriangles++; group->numtriangles++; @@ -719,10 +719,10 @@ _glmFirstPass(GLMmodel* model, FILE* file) } else if (sscanf(buf, "%d/%d", &v, &t) == 2) { /* v/t */ if(EOF == fscanf(file, "%d/%d", &v, &t)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t."); } if(EOF == fscanf(file, "%d/%d", &v, &t)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t.."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v/t.."); } numtriangles++; group->numtriangles++; @@ -733,10 +733,10 @@ _glmFirstPass(GLMmodel* model, FILE* file) } else { /* v */ if(EOF == fscanf(file, "%d", &v)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v."); } if(EOF == fscanf(file, "%d", &v)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass: failed reading v.."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass: failed reading v.."); } numtriangles++; group->numtriangles++; @@ -746,14 +746,14 @@ _glmFirstPass(GLMmodel* model, FILE* file) } } } else { - verbose(1, "[GEM:modelOBJ] _glmFirstPass failed reading facet..."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass failed reading facet..."); } break; default: /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmFirstPass failed reading"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmFirstPass failed reading"); continue; } break; @@ -793,7 +793,7 @@ static GLuint fixIndex(GLint current, GLuint baseindex) if(idx>0) { return (GLuint)idx; } else { - verbose(1, "[GEM:modelOBJ] unable to fix negative index %d @ %d", current, + logpost(0, 3+1, "[GEM:modelOBJ] unable to fix negative index %d @ %d", current, baseindex); return baseindex; } @@ -837,7 +837,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) case '#': /* comment */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmSecondPass() failed reading"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmSecondPass() failed reading"); continue; } break; @@ -850,7 +850,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) &vertices[3 * numvertices + 2])) { numvertices++; } else { - verbose(1, "[GEM:modelOBJ] _glmSecondPass failed reading vertex %d", + logpost(0, 3+1, "[GEM:modelOBJ] _glmSecondPass failed reading vertex %d", numvertices); } break; @@ -861,7 +861,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) &normals[3 * numnormals + 2])) { numnormals++; } else { - verbose(1, "[GEM:modelOBJ] _glmSecondPass failed reading normal %d", + logpost(0, 3+1, "[GEM:modelOBJ] _glmSecondPass failed reading normal %d", numnormals); } break; @@ -871,7 +871,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) &texcoords[2 * numtexcoords + 1])) { numtexcoords++; } else { - verbose(1, "[GEM:modelOBJ] _glmSecondPass failed reading texcoord %d", + logpost(0, 3+1, "[GEM:modelOBJ] _glmSecondPass failed reading texcoord %d", numtexcoords); } break; @@ -879,25 +879,25 @@ _glmSecondPass(GLMmodel* model, FILE* file) break; case 'u': if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading material"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading material"); return GL_FALSE; } if(EOF != sscanf(buf, "%s %s", buf, buf)) { group->material = material = _glmFindMaterial(model, buf); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed finding material"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed finding material"); return GL_FALSE; } break; case 'g': /* group */ /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading group"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading group"); return GL_FALSE; } #if SINGLE_STRING_GROUP_NAMES if(EOF == sscanf(buf, "%s", buf)) { - verbose(0, + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading single-string group name"); return GL_FALSE; } @@ -918,19 +918,19 @@ _glmSecondPass(GLMmodel* model, FILE* file) T(numtriangles).vindices[0] = fixIndex(v,numvertices); T(numtriangles).nindices[0] = fixIndex(n,numnormals); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/n."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/n."); } if(EOF != fscanf(file, "%d//%d", &v, &n)) { T(numtriangles).vindices[1] = fixIndex(v,numvertices); T(numtriangles).nindices[1] = fixIndex(n, numnormals); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/n.."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/n.."); } if(EOF != fscanf(file, "%d//%d", &v, &n)) { T(numtriangles).vindices[2] = fixIndex(v,numvertices); T(numtriangles).nindices[2] = fixIndex(n, numnormals); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/n..."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/n..."); } group->triangles[group->numtriangles++] = numtriangles; numtriangles++; @@ -954,14 +954,14 @@ _glmSecondPass(GLMmodel* model, FILE* file) T(numtriangles).uvtindices[1] = fixIndex(t, numtexcoords); T(numtriangles).nindices[1] = fixIndex(n, numnormals); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t/n."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t/n."); } if(EOF != fscanf(file, "%d/%d/%d", &v, &t, &n)) { T(numtriangles).vindices[2] = fixIndex(v, numvertices); T(numtriangles).uvtindices[2] = fixIndex(t, numtexcoords); T(numtriangles).nindices[2] = fixIndex(n, numnormals); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t/n.."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t/n.."); } group->triangles[group->numtriangles++] = numtriangles; numtriangles++; @@ -986,13 +986,13 @@ _glmSecondPass(GLMmodel* model, FILE* file) T(numtriangles).vindices[1] = fixIndex(v, numvertices); T(numtriangles).uvtindices[1] = fixIndex(t, numtexcoords); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t."); } if(EOF != fscanf(file, "%d/%d", &v, &t)) { T(numtriangles).vindices[2] = fixIndex(v, numvertices); T(numtriangles).uvtindices[2] = fixIndex(t, numtexcoords); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t.."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v/t.."); } group->triangles[group->numtriangles++] = numtriangles; numtriangles++; @@ -1011,17 +1011,17 @@ _glmSecondPass(GLMmodel* model, FILE* file) if(EOF != sscanf(buf, "%d", &v)) { T(numtriangles).vindices[0] = fixIndex(v, numvertices); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v."); } if(EOF != fscanf(file, "%d", &v)) { T(numtriangles).vindices[1] = fixIndex(v, numvertices); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v.."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v.."); } if(EOF != fscanf(file, "%d", &v)) { T(numtriangles).vindices[2] = fixIndex(v, numvertices); } else { - verbose(0, "[GEM:modelOBJ] _glmSecondPass() failed reading v..."); + logpost(0, 3+0, "[GEM:modelOBJ] _glmSecondPass() failed reading v..."); } group->triangles[group->numtriangles++] = numtriangles; numtriangles++; @@ -1034,7 +1034,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) } } } else { - verbose(1, "[GEM:modelOBJ] _glmSecondPass() failed reading..."); + logpost(0, 3+1, "[GEM:modelOBJ] _glmSecondPass() failed reading..."); continue; } break; @@ -1042,7 +1042,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) default: /* eat up rest of line */ if(NULL==fgets(buf, sizeof(buf), file)) { - verbose(1, "[GEM:modelOBJ] _glmSecondPass() failed reading"); + logpost(0, 3+1, "[GEM:modelOBJ] _glmSecondPass() failed reading"); continue; } break; @@ -1050,7 +1050,7 @@ _glmSecondPass(GLMmodel* model, FILE* file) } /* announce the memory requirements */ - verbose(1, "[GEM:modelOBJ] Memory: %d bytes", (int)( + logpost(0, 3+1, "[GEM:modelOBJ] Memory: %d bytes", (int)( numvertices * 3*sizeof(GLfloat) + numnormals * 3*sizeof(GLfloat) + numtexcoords * 3*sizeof(GLfloat) + @@ -1386,7 +1386,7 @@ glmVertexNormals(GLMmodel* model, GLfloat angle) facet normal of every triangle this vertex is in */ node = members[i]; if (!node) { - verbose(0, "[GEM:modelOBJ] glmVertexNormals(): vertex w/o a triangle"); + logpost(0, 3+0, "[GEM:modelOBJ] glmVertexNormals(): vertex w/o a triangle"); } average[0] = 0.0; average[1] = 0.0; @@ -1524,7 +1524,7 @@ glmUVTexture(GLMmodel* model, float h, float w) } group = group->next; } - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmUVTexture(): generated %d UV texture coordinates", model->numtexcoords); } @@ -1576,7 +1576,7 @@ glmLinearTexture(GLMmodel* model, float h, float w) group = group->next; } - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmLinearTexture(): generated %d linear texture coordinates", model->numtexcoords); } @@ -1651,7 +1651,7 @@ glmSpheremapTexture(GLMmodel* model, float h, float w) group = group->next; } - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmSpheremapTexture(): generated %d spheremap texture coordinates", model->numtexcoords); } @@ -1805,7 +1805,7 @@ glmReadOBJ(const char* filename) /* open the file */ file = fopen(filename, "r"); if (!file) { - verbose(0, + logpost(0, 3+0, "[GEM:modelOBJ] glmReadOBJ() failed: can't open data file \"%s\".", filename); return NULL; @@ -1838,7 +1838,7 @@ glmReadOBJ(const char* filename) /* make a first pass through the file to get a count of the number of vertices, normals, texcoords & triangles */ if(GL_FALSE==_glmFirstPass(model, file)) { - verbose(0, "[GEM:modelOBJ] glmReadOBJ() failed: can't parse file \"%s\".", + logpost(0, 3+0, "[GEM:modelOBJ] glmReadOBJ() failed: can't parse file \"%s\".", filename); goto readobj_failed; } @@ -1857,7 +1857,7 @@ glmReadOBJ(const char* filename) rewind(file); if(GL_FALSE==_glmSecondPass(model, file)) { - verbose(0, "[GEM:modelOBJ] glmReadOBJ() failed: can't parse file \"%s\".", + logpost(0, 3+0, "[GEM:modelOBJ] glmReadOBJ() failed: can't parse file \"%s\".", filename); goto readobj_failed; } @@ -1905,42 +1905,42 @@ glmWriteOBJ(const GLMmodel* model, const char* filename, GLuint mode) /* do a bit of warning */ if (mode & GLM_FLAT && !model->facetnorms) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: flat normal output requested " "with no facet normals defined."); mode &= ~GLM_FLAT; } if (mode & GLM_SMOOTH && !model->normals) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: smooth normal output requested " "with no normals defined."); mode &= ~GLM_SMOOTH; } if (mode & GLM_TEXTURE && !model->texcoords) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: texture coordinate output requested " "with no texture coordinates defined."); mode &= ~GLM_TEXTURE; } if (mode & GLM_FLAT && mode & GLM_SMOOTH) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: flat normal output requested " "and smooth normal output requested (using smooth)."); mode &= ~GLM_FLAT; } if (mode & GLM_COLOR && !model->materials) { - verbose(1, "[GEM:modelOBJ] glmWriteOBJ() warning: color output requested " + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: color output requested " "with no colors (materials) defined."); mode &= ~GLM_COLOR; } if (mode & GLM_MATERIAL && !model->materials) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: material output requested " "with no materials defined."); mode &= ~GLM_MATERIAL; } if (mode & GLM_COLOR && mode & GLM_MATERIAL) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmWriteOBJ() warning: color and material output requested " "outputting only materials."); mode &= ~GLM_COLOR; @@ -1950,7 +1950,7 @@ glmWriteOBJ(const GLMmodel* model, const char* filename, GLuint mode) /* open the file */ file = fopen(filename, "w"); if (!file) { - verbose(0, + logpost(0, 3+0, "[GEM:modelOBJ] glmWriteOBJ() failed: can't open file \"%s\" to write.", filename); return -1; @@ -2088,40 +2088,40 @@ glmWriteOBJ(const GLMmodel* model, const char* filename, GLuint mode) static GLuint checkMode(const GLMmodel* model, GLuint mode) { if (mode & GLM_FLAT && !model->facetnorms) { - verbose(1, "[GEM:modelOBJ] glmDraw() warning: flat render mode requested " + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: flat render mode requested " "with no facet normals defined."); mode &= ~GLM_FLAT; } if (mode & GLM_SMOOTH && !model->normals) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: smooth render mode requested " "with no normals defined."); mode &= ~GLM_SMOOTH; } if (mode & GLM_TEXTURE && !model->texcoords) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: texture render mode requested " "with no texture coordinates defined."); mode &= ~GLM_TEXTURE; } if (mode & GLM_FLAT && mode & GLM_SMOOTH) { - verbose(1, "[GEM:modelOBJ] glmDraw() warning: flat render mode requested " + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: flat render mode requested " "and smooth render mode requested (using smooth)."); mode &= ~GLM_FLAT; } if (mode & GLM_COLOR && !model->materials) { - verbose(1, "[GEM:modelOBJ] glmDraw() warning: color render mode requested " + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: color render mode requested " "with no materials defined."); mode &= ~GLM_COLOR; } if (mode & GLM_MATERIAL && !model->materials) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: material render mode requested " "with no materials defined."); mode &= ~GLM_MATERIAL; } if (mode & GLM_COLOR && mode & GLM_MATERIAL) { - verbose(1, + logpost(0, 3+1, "[GEM:modelOBJ] glmDraw() warning: color and material render mode requested " "using only material mode."); mode &= ~GLM_COLOR; @@ -2256,7 +2256,7 @@ glmWeld(GLMmodel* model, GLfloat epsilon) vectors = model->vertices; copies = _glmWeldVectors(vectors, &numvectors, epsilon); - verbose(1, "[GEM:modelOBJ] glmWeld(): %d redundant vertices.", + logpost(0, 3+1, "[GEM:modelOBJ] glmWeld(): %d redundant vertices.", model->numvertices - numvectors - 1); for (i = 0; i < model->numtriangles; i++) { @@ -2328,12 +2328,12 @@ glmReadPPM(const char* filename, int* width, int* height) /* grab first two chars of the file and make sure that it has the correct magic cookie for a raw PPM file. */ if(NULL==fgets(head, 70, fp)) { - verbose(0, "[GEM:modelOBJ] _glmReadPPM() failed reading header"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadPPM() failed reading header"); fclose(fp); return NULL; } if (strncmp(head, "P6", 2)) { - verbose(0, "[GEM:modelOBJ] %s: Not a raw PPM file", filename); + logpost(0, 3+0, "[GEM:modelOBJ] %s: Not a raw PPM file", filename); fclose(fp); return NULL; } @@ -2342,7 +2342,7 @@ glmReadPPM(const char* filename, int* width, int* height) i = 0; while(i < 3) { if(NULL==fgets(head, 70, fp)) { - verbose(0, "[GEM:modelOBJ] _glmReadPPM() failed header info"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadPPM() failed header info"); fclose(fp); return NULL; } @@ -2370,7 +2370,7 @@ glmReadPPM(const char* filename, int* width, int* height) size_t count = fread(image, sizeof(unsigned char), imagesize, fp); fclose(fp); if(count!=imagesize) { - verbose(0, "[GEM:modelOBJ] _glmReadPPM failed to read all bytes"); + logpost(0, 3+0, "[GEM:modelOBJ] _glmReadPPM failed to read all bytes"); *width=*height=0; delete[]image; image=NULL; diff --git a/plugins/OptiTrack/videoOptiTrack.cpp b/plugins/OptiTrack/videoOptiTrack.cpp index 1637f985b..e1b49292e 100644 --- a/plugins/OptiTrack/videoOptiTrack.cpp +++ b/plugins/OptiTrack/videoOptiTrack.cpp @@ -77,7 +77,7 @@ videoOptiTrack::videoOptiTrack(void) : { m_pixBlock.image.xsize = 320; m_pixBlock.image.ysize = 240; - m_pixBlock.image.setCsizeByFormat(GEM_GRAY); + m_pixBlock.image.setFormat(GEM_GRAY); m_pixBlock.image.allocate(); } @@ -178,8 +178,7 @@ std::vectorvideoOptiTrack::enumerate(void) } CameraList list; - int i; - for(i=0; i -REGISTER_RECORDFACTORY("PIPEWIRE", recordPIPEWIRE); +REGISTER_RECORDFACTORY("pipewire", recordPIPEWIRE); namespace { @@ -103,7 +103,7 @@ recordPIPEWIRE :: recordPIPEWIRE(void) //::post("%s:%d@%s", __FILE__, __LINE__, __FUNCTION__); m_image.xsize = 640; m_image.ysize = 480; - m_image.setCsizeByFormat(GEM_RGBA); + m_image.setFormat(GEM_RGBA); recordPIPEWIRE_init(); m_stream_events = { PW_VERSION_STREAM_EVENTS, @@ -147,6 +147,8 @@ bool recordPIPEWIRE :: start(const std::string&filename, gem::Properties&props) stop(); //::post("%s:%d@%s", __FILE__, __LINE__, __FUNCTION__); m_filename = filename; + if (m_filename.empty()) + m_filename = "gem-output"; if(!m_image.xsize) { m_image.xsize = 640; } @@ -154,7 +156,7 @@ bool recordPIPEWIRE :: start(const std::string&filename, gem::Properties&props) m_image.ysize = 480; } if(!m_image.csize) { - m_image.setCsizeByFormat(GEM_RAW_RGBA); + m_image.setFormat(GEM_RAW_RGBA); } m_image.reallocate(); @@ -166,7 +168,7 @@ bool recordPIPEWIRE :: start(const std::string&filename, gem::Properties&props) pw_thread_loop_lock(s_loop); m_stream = pw_stream_new_simple( pw_thread_loop_get_loop(s_loop), - "gem-output", + m_filename.c_str(), pw_properties_new( PW_KEY_MEDIA_CLASS, "Video/Source", PW_KEY_MEDIA_TYPE, "Video", diff --git a/plugins/PIPEWIRE/recordPIPEWIRE.h b/plugins/PIPEWIRE/recordPIPEWIRE.h index c5e71fb29..b3cb69a41 100644 --- a/plugins/PIPEWIRE/recordPIPEWIRE.h +++ b/plugins/PIPEWIRE/recordPIPEWIRE.h @@ -78,10 +78,8 @@ class GEM_EXPORT recordPIPEWIRE : public record // properties virtual bool enumProperties(gem::Properties&props); - virtual bool dialog(void) - { - return false; - } + virtual void getProperties(gem::Properties&props) {;}; + virtual bool dialog(void) { return false; } void on_process(void); void on_param_changed(uint32_t id, const struct spa_pod *param); private: diff --git a/plugins/PIPEWIRE/videoPIPEWIRE.cpp b/plugins/PIPEWIRE/videoPIPEWIRE.cpp index ffba8e8f4..c450e91a4 100644 --- a/plugins/PIPEWIRE/videoPIPEWIRE.cpp +++ b/plugins/PIPEWIRE/videoPIPEWIRE.cpp @@ -76,7 +76,7 @@ videoPIPEWIRE::videoPIPEWIRE(void) { m_pixBlock.image.xsize = 1; m_pixBlock.image.ysize = 1; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); m_pixBlock.image.setBlack(); videoPIPEWIRE_init(); @@ -266,7 +266,7 @@ pixBlock*videoPIPEWIRE::getFrame(void) } return &m_pixBlock; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); const unsigned int count = m_pixBlock.image.xsize * m_pixBlock.image.ysize; unsigned int i=0; @@ -491,16 +491,16 @@ void videoPIPEWIRE::on_param_changed(uint32_t id, const struct spa_pod *param) case(SPA_VIDEO_FORMAT_BGR): case(SPA_VIDEO_FORMAT_BGRA): case(SPA_VIDEO_FORMAT_RGB16): - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); break; case(SPA_VIDEO_FORMAT_YUY2): case(SPA_VIDEO_FORMAT_UYVY): - m_pixBlock.image.setCsizeByFormat(GEM_YUV); + m_pixBlock.image.setFormat(GEM_YUV); break; case(SPA_VIDEO_FORMAT_GRAY8): case(SPA_VIDEO_FORMAT_GRAY16_BE): case(SPA_VIDEO_FORMAT_GRAY16_LE): - m_pixBlock.image.setCsizeByFormat(GEM_GRAY); + m_pixBlock.image.setFormat(GEM_GRAY); break; default: m_pixBlock.image.csize = 0; diff --git a/plugins/PNM/Makefile.am b/plugins/PNM/Makefile.am index a4ecead01..4870639b3 100644 --- a/plugins/PNM/Makefile.am +++ b/plugins/PNM/Makefile.am @@ -5,7 +5,11 @@ AM_CXXFLAGS = pkglib_LTLIBRARIES= +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = + pkglib_LTLIBRARIES+= gem_recordPNM.la +dist_gemhelp_DATA += PNM-recordplugin.pd AM_LDFLAGS = -module -avoid-version -shared if WINDOWS diff --git a/plugins/PNM/PNM-recordplugin.pd b/plugins/PNM/PNM-recordplugin.pd new file mode 100644 index 000000000..c18baae6e --- /dev/null +++ b/plugins/PNM/PNM-recordplugin.pd @@ -0,0 +1,43 @@ +#N canvas 714 348 549 449 10; +#X text 69 27 recordPNM - PPM/PGM image stream output; +#X text 69 37 =======================================; +#X text 60 78 PNM is a family of lowest common denominator image formats \, with an ASCII header containing metadata \, followed by raw uncompressed image data.; +#X msg 217 116 https://netpbm.sourceforge.net/doc/pnm.html; +#X text 84 129 Specification:; +#X text 76 167 The 'PNM' backend writes a single file containing a concatenated stream of PNM images.; +#X text 78 201 The following codecs are currently supported:; +#X text 103 217 - ppm (rgb888 PPM P6 binary format); +#X text 103 232 - pgm (gray8 PGM P5 binary format); +#X obj 32 260 cnv 18 420 60 empty empty empty 20 12 0 10 #ffe3c6 #404040 0; +#X text 36 277 NOTE:; +#N canvas 735 459 450 300 URL 0; +#X obj 37 37 inlet; +#X obj 37 60 symbol; +#X obj 37 106 pdcontrol; +#X msg 37 83 browse \$1; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X restore 217 139 pd URL; +#X text 75 289 You need special software (such as FFMPEG) in order to correctly decode it., f 62; +#N canvas 735 459 450 300 example 0; +#X text 75 91 1- select the backend; +#X obj 232 163 s \$1-ctl; +#X msg 261 132 record 1; +#X text 75 111 2- name the NDI-stream; +#X text 75 131 3- start sending out stream; +#X text 28 20 Example use case:; +#X text 51 42 I. create a named pipe (in the terminal): 'mkfifo fifo.ppm'; +#X text 49 67 II. record frames into the named pipe using this backend:; +#X text 52 200 III. encode the video with FFMPEG:; +#X text 84 221 'ffmpeg -f image2pipe -i fifo.ppm ...'; +#X text 71 254 note that the [pix_record] may block if data is not read fast enough by the encoder.; +#X msg 261 92 codec ppm; +#X msg 261 112 file /tmp/fifo.ppm; +#X connect 2 0 1 0; +#X connect 11 0 1 0; +#X connect 12 0 1 0; +#X restore 200 330 pd example; +#X text 45 397 This plugin does not require any external libraries \, and should therefore be available on all platforms., f 52; +#X text 75 261 The file created by this backend is not a valid video file and CANNOT be played directly., f 62; +#X connect 3 0 11 0; diff --git a/plugins/PNM/recordPNM.cpp b/plugins/PNM/recordPNM.cpp index 772fe44ad..30e0b11e2 100644 --- a/plugins/PNM/recordPNM.cpp +++ b/plugins/PNM/recordPNM.cpp @@ -80,7 +80,7 @@ static int guess_channels(const std::string&filename) unsigned int i=0; if(!extension) { - verbose(0, + logpost(0, 3+0, "[GEM:recordPNM] no extension given: encoding will be PPM"); return 3; } @@ -94,7 +94,7 @@ static int guess_channels(const std::string&filename) return 3; } - verbose(0, + logpost(0, 3+0, "[GEM:recordPNM] unknown extension: encoding will be PPM"); return 3; } diff --git a/plugins/PNM/recordPNM.h b/plugins/PNM/recordPNM.h index e6f9f5d5a..48408c5d2 100644 --- a/plugins/PNM/recordPNM.h +++ b/plugins/PNM/recordPNM.h @@ -80,10 +80,8 @@ class GEM_EXPORT recordPNM : public record // properties virtual bool enumProperties(gem::Properties&props); - virtual bool dialog(void) - { - return false; - } + virtual void getProperties(gem::Properties&props) {;}; + virtual bool dialog(void) { return false; } private: diff --git a/plugins/PYLON/pylon.m4 b/plugins/PYLON/pylon.m4 index 1089c22ad..295cf163e 100644 --- a/plugins/PYLON/pylon.m4 +++ b/plugins/PYLON/pylon.m4 @@ -11,7 +11,7 @@ AC_DEFUN([GEM_CHECK_PYLON], [ AC_ARG_VAR([PYLON_ROOT], [root-directory where you installed PYLON (override this with '--with-pylon=${PYLON_ROOT}'])dnl AC_ARG_WITH([pylon], - AC_HELP_STRING([--with-pylon], [enable PYLON video capturing (overrides $PYLON_ROOT)])) + AS_HELP_STRING([--with-pylon], [enable PYLON video capturing (overrides $PYLON_ROOT)])) tmp_pylon_rpath="" have_pylon="no" diff --git a/plugins/PYLON/videoPYLON.cpp b/plugins/PYLON/videoPYLON.cpp index af6e47206..f456d945e 100644 --- a/plugins/PYLON/videoPYLON.cpp +++ b/plugins/PYLON/videoPYLON.cpp @@ -55,7 +55,7 @@ class gem::plugins::videoPYLON::ImageEventHandler : public Pylon::CImageEventHan m_pix.newimage = true; m_pix.image.xsize = ptrGrabResult->GetWidth(); m_pix.image.ysize = ptrGrabResult->GetHeight(); - m_pix.image.setCsizeByFormat(m_color); + m_pix.image.setFormat(m_color); m_pix.image.reallocate(); m_converter.Convert (m_pix.image.data, m_pix.image.xsize*m_pix.image.ysize*m_pix.image.csize, ptrGrabResult); } else { @@ -213,7 +213,7 @@ gem::any node2any(GenApi::INode*node) break; } } catch (GenICam::GenericException &e) { - verbose(0, "[GEM:videoPYLON] %s", e.GetDescription()); + logpost(0, 3+0, "[GEM:videoPYLON] %s", e.GetDescription()); result.reset(); } return result; @@ -285,7 +285,7 @@ bool any2node(GenApi::INode*node, const gem::any&value) break; } } catch (GenICam::GenericException &e) { - verbose(0, "[GEM:videoPYLON] %s", e.GetDescription()); + logpost(0, 3+0, "[GEM:videoPYLON] %s", e.GetDescription()); return false; } return true; @@ -425,7 +425,7 @@ std::vector videoPYLON::enumerate() Pylon::DeviceInfoList_t devices; if (!m_factory->EnumerateDevices(devices)) { - verbose(1, "[GEM:videoPYLON] could not enumerate %d", devices.size()); + logpost(0, 3+1, "[GEM:videoPYLON] could not enumerate %d", devices.size()); return result; } @@ -433,7 +433,7 @@ std::vector videoPYLON::enumerate() std::string name; bool added=false; #if 0 -#define SHOWNAME(x, s) if(!s.empty())verbose(1, "[GEM::videoPYLON] device#%d['%s']\t%s", device - devices.begin(), x, s.c_str()) +#define SHOWNAME(x, s) if(!s.empty())logpost(0, 3+1, "[GEM::videoPYLON] device#%d['%s']\t%s", device - devices.begin(), x, s.c_str()) #else #define SHOWNAME(x, s) #endif @@ -514,14 +514,14 @@ bool videoPYLON :: open(gem::Properties&props) } } } catch (GenICam::GenericException &e) { - verbose(0, "[GEM:videoPYLON] %s", e.GetDescription()); + logpost(0, 3+0, "[GEM:videoPYLON] %s", e.GetDescription()); return false; } if(device) { - verbose(0, "[GEM:videoPYLON] found device '%s'", device->GetDeviceInfo().GetFullName().c_str()); + logpost(0, 3+0, "[GEM:videoPYLON] found device '%s'", device->GetDeviceInfo().GetFullName().c_str()); } else { - verbose(1, "[GEM:videoPYLON] creating device failed!"); + logpost(0, 3+1, "[GEM:videoPYLON] creating device failed!"); return false; } @@ -529,11 +529,11 @@ bool videoPYLON :: open(gem::Properties&props) m_camera.Attach(device); m_camera.Open(); } catch (GenICam::GenericException &e) { - verbose(0, "[GEM:videoPYLON] %s", e.GetDescription()); + logpost(0, 3+0, "[GEM:videoPYLON] %s", e.GetDescription()); close(); return false; } catch (std::exception &e) { - verbose(0, "[GEM:videoPYLON] %s", e.what()); + logpost(0, 3+0, "[GEM:videoPYLON] %s", e.what()); close(); return false; } @@ -597,7 +597,7 @@ bool videoPYLON :: stop() bool videoPYLON :: reset() { MARK(); - verbose(0, "[GEM:videoPYLON] 'reset' not implemented"); + logpost(0, 3+0, "[GEM:videoPYLON] 'reset' not implemented"); return false; } diff --git a/plugins/QT4L/Makefile.am b/plugins/QT4L/Makefile.am index 9f586d2a6..b8b04fdee 100644 --- a/plugins/QT4L/Makefile.am +++ b/plugins/QT4L/Makefile.am @@ -4,14 +4,19 @@ AM_CPPFLAGS = -I$(top_srcdir)/src $(GEM_EXTERNAL_CPPFLAGS) AM_CXXFLAGS = pkglib_LTLIBRARIES= +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = if HAVE_LIB_LIBQUICKTIME pkglib_LTLIBRARIES+= gem_filmQT4L.la pkglib_LTLIBRARIES+= gem_recordQT4L.la -endif +dist_gemhelp_DATA += quicktime4linux-recordplugin.pd +else if HAVE_LIB_LQT pkglib_LTLIBRARIES+= gem_filmQT4L.la pkglib_LTLIBRARIES+= gem_recordQT4L.la +dist_gemhelp_DATA += quicktime4linux-recordplugin.pd +endif endif AM_LDFLAGS = -module -avoid-version -shared diff --git a/plugins/QT4L/filmQT4L.cpp b/plugins/QT4L/filmQT4L.cpp index 10540b4e0..521a53291 100644 --- a/plugins/QT4L/filmQT4L.cpp +++ b/plugins/QT4L/filmQT4L.cpp @@ -94,7 +94,7 @@ bool filmQT4L :: open(const std::string&filename, char*cfilename=const_cast(filename.c_str()); if (quicktime_check_sig(cfilename)) { /* ok, this is quicktime */ if (!(m_quickfile = quicktime_open(filename.c_str(), 1, 0))) { - verbose(0, "[GEM:filmQT4L] Unable to open file: %s", filename.c_str()); + logpost(0, 3+0, "[GEM:filmQT4L] Unable to open file: %s", filename.c_str()); return false; } m_curFrame = -1; @@ -111,17 +111,17 @@ bool filmQT4L :: open(const std::string&filename, m_image.image.ysize = quicktime_video_height(m_quickfile, m_curTrack); if (!quicktime_supported_video(m_quickfile, m_curTrack)) { char *codec = quicktime_video_compressor(m_quickfile, m_curTrack); - verbose(0, "[GEM:filmQT4L] unsupported CODEC '%s'!", codec); + logpost(0, 3+0, "[GEM:filmQT4L] unsupported CODEC '%s'!", codec); quicktime_close(m_quickfile); m_quickfile=0; return false; } - m_image.image.setCsizeByFormat(wantedFormat); + m_image.image.setFormat(wantedFormat); m_image.image.reallocate(); m_qtimage.xsize=m_image.image.xsize; m_qtimage.ysize=m_image.image.ysize; - m_qtimage.setCsizeByFormat(GEM_RGB); + m_qtimage.setFormat(GEM_RGB); m_qtimage.reallocate(); m_newfilm = true; @@ -146,7 +146,7 @@ pixBlock* filmQT4L :: getFrame() return &m_image; } - m_image.image.setCsizeByFormat(m_wantedFormat); + m_image.image.setFormat(m_wantedFormat); m_image.image.reallocate(); pixBlock* pimage = 0; @@ -234,8 +234,7 @@ void filmQT4L::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i 2GB); +#X text 64 516 avi - AVI (< 2GB); +#X text 64 536 mp4 - ISO MPEG-4; +#X text 64 556 m4a - m4a (iTunes compatible); +#X text 300 456 <- "*.mov"; +#X text 300 496 <- "*.avi"; +#X text 300 536 <- "*.mp4"; +#X text 300 556 <- "*.m4a"; +#X text 271 178 2 set the output file; +#X msg 95 138 codec x264; +#X msg 49 612 set lqtformat avi_odml; +#X obj 49 635 s \$1-ctl; +#X text 502 414 While there are a number of codec-specific properties \, you can also set some generic metadata:; +#X msg 519 468 set name my\ first\ video; +#X msg 519 528 set copyright public-domain; +#X msg 519 488 set info just\ a\ test; +#X msg 519 548 set album first\ things\ first; +#X msg 519 568 set genre experimental; +#X msg 519 608 set comment nothing\ to\ say\ (and\ saying\ it); +#X msg 519 508 set author N.N.; +#X obj 519 631 s \$1-ctl; +#X msg 519 588 set track #9; +#X connect 1 0 0 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 23 0 1 0; +#X connect 24 0 25 0; +#X connect 27 0 34 0; +#X connect 28 0 34 0; +#X connect 29 0 34 0; +#X connect 30 0 34 0; +#X connect 31 0 34 0; +#X connect 32 0 34 0; +#X connect 33 0 34 0; +#X connect 35 0 34 0; diff --git a/plugins/QT4L/recordQT4L.cpp b/plugins/QT4L/recordQT4L.cpp index 3ac87e41a..a987d6f5e 100644 --- a/plugins/QT4L/recordQT4L.cpp +++ b/plugins/QT4L/recordQT4L.cpp @@ -33,7 +33,7 @@ using namespace gem::plugins; #ifdef GEM_USE_RECORDQT4L #include -REGISTER_RECORDFACTORY("QT4L", recordQT4L); +REGISTER_RECORDFACTORY("quicktime4linux", recordQT4L); #endif ///////////////////////////////////////////////////////// // @@ -62,7 +62,7 @@ recordQT4L :: recordQT4L(void) : std::vectorcodecs=getCodecs(); if(codecs.size()>0) { setCodec(codecs[0]); - verbose(1, "[GEM:recordQT4L] default codec is: '%s'", m_codecname.c_str()); + logpost(0, 3+1, "[GEM:recordQT4L] default codec is: '%s'", m_codecname.c_str()); } } #else @@ -106,32 +106,45 @@ static struct { } qtformats[] = { { "qt", LQT_FILE_QT, "mov", "Quicktime (QT7 compatible)", "yuv2" }, /* ffmpeg_mpg4 */ { "qtold", LQT_FILE_QT_OLD, "mov", "Quicktime (qt4l and old lqt)", "yuv2" }, /* mjpa */ - { "avi", LQT_FILE_AVI, "avi", "AVI (< 2G)", "yuv2" }, /* ffmpeg_msmpeg4v3 */ { "avi_odml", LQT_FILE_AVI_ODML, "avi", "AVI (> 2G)", "yuv2" }, /* ffmpeg_msmpeg4v3 */ + { "avi", LQT_FILE_AVI, "avi", "AVI (< 2G)", "yuv2" }, /* ffmpeg_msmpeg4v3 */ { "mp4", LQT_FILE_MP4, "mp4", "ISO MPEG-4", "yuv2" }, /* ffmpeg_mpg4 */ - { "m4a", LQT_FILE_M4A, "m4a", "m4a (iTunes compatible)", "yuv2" }, /* ffmpeg_mpg4 */ + { "m4a", LQT_FILE_M4A, "m4a", "m4a (iTunes compatible)", "yuv2" }, /* ffmpeg_mpg4 */ }; +/* get the filetype from the short name */ +static lqt_file_type_t get_qtformat(const char*name) +{ + for(unsigned int i = 0; i < sizeof(qtformats)/sizeof(*qtformats); i++) { + if(!strcasecmp(name, qtformats[i].name)) { + logpost(0, 3+1, "[GEM:recordQT4L] using format '%s'", qtformats[i].description); + return qtformats[i].type; + } + } + + logpost(0, 3+0, + "[GEM:recordQT4L] unknown extension: encoding will be QuickTime"); + return LQT_FILE_QT; /* should be save for now */ +} /* guess the file-format by inspecting the extension */ static lqt_file_type_t guess_qtformat(const std::string&filename) { const char * extension = strrchr(filename.c_str(), '.'); - unsigned int i=0; if(!extension) { - verbose(0, - "[GEM:recordQT4L] no extension given: encoding will be QuickTime"); + logpost(0, 3+0, "[GEM:recordQT4L] no extension given: encoding will be QuickTime"); return LQT_FILE_QT; } extension++; - for(i = 0; i < sizeof(qtformats)/sizeof(qtformats[0]); i++) { + for(unsigned int i = 0; i < sizeof(qtformats)/sizeof(*qtformats); i++) { if(!strcasecmp(extension, qtformats[i].extension)) { + logpost(0, 3+1, "[GEM:recordQT4L] detected format '%s'", qtformats[i].description); return qtformats[i].type; } } - verbose(0, + logpost(0, 3+0, "[GEM:recordQT4L] unknown extension: encoding will be QuickTime"); return LQT_FILE_QT; /* should be save for now */ } @@ -140,15 +153,40 @@ bool recordQT4L :: start(const std::string&filename, gem::Properties&props) { stop(); - lqt_file_type_t type = guess_qtformat(filename); + lqt_file_type_t format = LQT_FILE_NONE; + std::string s; + if (props.get("lqtformat", s)) { + format = get_qtformat(s.c_str()); + } + + if (LQT_FILE_NONE == format) { + format = guess_qtformat(filename); + } - m_qtfile = lqt_open_write(filename.c_str(), type); + m_curTrack = -1; + m_qtfile = lqt_open_write(filename.c_str(), format); if(m_qtfile==NULL) { pd_error(0, "[GEM:recordQT4L] starting to record to %s failed", filename.c_str()); return false; } +#define prop2quicktime(qtfile, propname) \ + if (props.get(#propname, s)) { quicktime_set_##propname(qtfile, (char*)s.c_str()); } +#define prop2lqt(qtfile, propname) \ + if (props.get(#propname, s)) { lqt_set_##propname(qtfile, (char*)s.c_str()); } + + prop2quicktime(m_qtfile, name); + prop2quicktime(m_qtfile, copyright); + prop2quicktime(m_qtfile, info); + + prop2lqt(m_qtfile, album); + prop2lqt(m_qtfile, artist); + prop2lqt(m_qtfile, genre); + prop2lqt(m_qtfile, track); + prop2lqt(m_qtfile, comment); + prop2lqt(m_qtfile, author); + m_props=props; m_restart=true; @@ -171,12 +209,11 @@ static void applyProperties(quicktime_t*file, int track, std::vectorkeys=props.keys(); std::mapproptypes; - int i=0; - for(i=0; inum_encoding_parameters; i++) { + for(int i=0; inum_encoding_parameters; i++) { proptypes[codec->encoding_parameters[i].name]= codec->encoding_parameters[i].type; } - for(i=0; i::iterator it = proptypes.find( key); @@ -240,8 +277,7 @@ static int try_colormodel(quicktime_t * file, int track, std::vector colormodel) { - int i=0; - for(i=0; itrycolormodels; @@ -304,7 +339,7 @@ bool recordQT4L :: init(const imageStruct*img, double fps) trycolormodels.push_back(BC_RGB888); trycolormodels.push_back(BC_YUV422); - m_colormodel=try_colormodel(m_qtfile, track, trycolormodels); + m_colormodel=try_colormodel(m_qtfile, m_curTrack, trycolormodels); if(!m_colormodel) { return false; } @@ -321,7 +356,6 @@ bool recordQT4L :: init(const imageStruct*img, double fps) return true; } - ///////////////////////////////////////////////////////// // do the actual encoding and writing to file // @@ -349,6 +383,11 @@ bool recordQT4L :: write(imageStruct*img) m_restart=false; } + if(m_curTrack<0) { + pd_error(0, "[GEM:recordQt4L] detected invalid track %d", m_curTrack); + return false; + } + double timestamp_d=(m_useTimeStamp ?(clock_gettimesince(m_startTime)*TIMEBASE/1000.) :m_curFrame*m_timeTick); @@ -385,7 +424,7 @@ bool recordQT4L :: write(imageStruct*img) } } - lqt_encode_video(m_qtfile, rowpointers, 0, timestamp); + lqt_encode_video(m_qtfile, rowpointers, m_curTrack, timestamp); delete[]rowpointers; return true; } @@ -440,14 +479,13 @@ bool recordQT4L :: setCodec(const std::string&name) if(codecname.empty() && m_qtfile) { /* LATER figure out automatically which codec to use */ lqt_file_type_t type = lqt_get_file_type(m_qtfile); - unsigned int i=0; - for(i = 0; i < sizeof(qtformats)/sizeof(qtformats[0]); i++) { + for(unsigned int i = 0; i < sizeof(qtformats)/sizeof(qtformats[0]); i++) { if(type == qtformats[i].type) { codecname = qtformats[i].default_video_codec; } } if(codecname.empty()) { - verbose(0, "[GEM:recordQT4L] couldn't find default codec for this format"); + logpost(0, 3+0, "[GEM:recordQT4L] couldn't find default codec for this format"); return false; } } @@ -470,12 +508,24 @@ bool recordQT4L :: enumProperties(gem::Properties&props) return false; } + props.set("lqtformat", std::string("auto")); + + props.set("name", std::string("")); + props.set("copyright", std::string("")); + props.set("info", std::string("")); + + props.set("album", std::string("")); + props.set("artist", std::string("")); + props.set("genre", std::string("")); + props.set("track", std::string("")); + props.set("comment", std::string("")); + props.set("author", std::string("")); + props.set("framerate", 0.f); const int paramcount=m_codec->num_encoding_parameters; lqt_parameter_info_t*params=m_codec->encoding_parameters; - int i=0; - for(i=0; i keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i(filename.c_str()), spec, 0); if (err != noErr && err != -37) { - verbose(0, "[GEM:imageQT] error#%d in NativePathNameToFSSpec()", err); + logpost(0, 3+0, "[GEM:imageQT] error#%d in NativePathNameToFSSpec()", err); } else { err = noErr; } @@ -138,7 +138,8 @@ static void InvertGLImage( unsigned char *imageData, // FIXXME use a flip function in GemPixUtils for this // Copy rows into tmp buffer one at a time, reversing their order - for (i = 0, j = imageSize - rowBytes; i < imageSize; + for (i = 0, j = imageSize - rowBytes; + i < imageSize; i += rowBytes, j -= rowBytes) { memcpy( &outData[j], &imageData[i], static_cast(rowBytes) ); } @@ -225,7 +226,7 @@ imageQT :: imageQT(void) if (err = EnterMovies()) { throw(GemException("unable to initialize QuickTime/Movies")); } - verbose(1, "[GEM:imageQT] QT init done"); + logpost(0, 3+1, "[GEM:imageQT] QT init done"); #endif // WINDOWS firsttime=false; } @@ -267,14 +268,14 @@ static bool QuickTimeImage2mem(GraphicsImportComponent inImporter, #ifdef k8GrayPixelFormat /* from the docs on "depth": what depth is this data (1-32) or ( 33-40 grayscale ) */ if ((*imageDescH)->depth <= 32) { - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); pixelformat = IMAGEQT_RGBA_PIXELFORMAT; } else { - result.setCsizeByFormat(GEM_GRAY); + result.setFormat(GEM_GRAY); pixelformat = k8GrayPixelFormat; } #else - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); pixelformat = IMAGEQT_RGBA_PIXELFORMAT; #endif @@ -282,10 +283,10 @@ static bool QuickTimeImage2mem(GraphicsImportComponent inImporter, imageDescH = NULL; result.reallocate(); - verbose(1, "[GEM:imageQT] QuickTimeImage2mem() allocate %d bytes", + logpost(0, 3+1, "[GEM:imageQT] QuickTimeImage2mem() allocate %d bytes", result.xsize*result.ysize*result.csize); if (result.data == NULL) { - verbose(0, "[GEM:imageQT] Can't allocate memory for an image."); + logpost(0, 3+0, "[GEM:imageQT] Can't allocate memory for an image."); return false; } @@ -300,7 +301,7 @@ static bool QuickTimeImage2mem(GraphicsImportComponent inImporter, result.data, static_cast(result.xsize * result.csize)); if (err) { - verbose(0, "[GEM:imageQT] Can't create QTNewWorld"); + logpost(0, 3+0, "[GEM:imageQT] Can't create QTNewWorld"); } ::GraphicsImportSetGWorld(inImporter, gw, NULL); @@ -317,7 +318,7 @@ bool imageQT :: load(std::string filename, imageStruct&result, OSErr err; GraphicsImportComponent importer = NULL; - ::verbose(1, "[GEM:imageQT] reading '%s' with QuickTime", + ::logpost(0, 3+1, "[GEM:imageQT] reading '%s' with QuickTime", filename.c_str()); std::string myfilename=filename; // does the file even exist? @@ -325,13 +326,13 @@ bool imageQT :: load(std::string filename, imageStruct&result, FSSpec spec; err = ::FSPathMakeFSSpec(myfilename, &spec); if (err) { - verbose(0, "[GEM:imageQT] Unable to find file: %s", filename.c_str()); - verbose(1, "[GEM:imageQT] parID : %d", spec.parID); + logpost(0, 3+0, "[GEM:imageQT] Unable to find file: %s", filename.c_str()); + logpost(0, 3+1, "[GEM:imageQT] parID : %d", spec.parID); return false; } err = ::GetGraphicsImporterForFile(&spec, &importer); if (err) { - verbose(0, "[GEM:imageQT] GemImageLoad: Unable to import image '%s'", + logpost(0, 3+0, "[GEM:imageQT] GemImageLoad: Unable to import image '%s'", filename.c_str()); return false; } @@ -395,14 +396,14 @@ bool imageQT::save(const imageStruct&constimage, } if (err != noErr) { - verbose(1, "[GEM:imageQT] error#%d in FSPathMakeRef()", err); + logpost(0, 3+1, "[GEM:imageQT] error#%d in FSPathMakeRef()", err); } err = ::FSGetCatalogInfo(&ref, kFSCatInfoNodeFlags, NULL, NULL, &spec, NULL); if (err != noErr) { - verbose(1, "[GEM:imageQT] error#%d in FSGetCatalogInfo()", err); + logpost(0, 3+1, "[GEM:imageQT] error#%d in FSGetCatalogInfo()", err); } err = FSMakeFSSpec(spec.vRefNum, spec.parID, filename8, @@ -413,13 +414,13 @@ bool imageQT::save(const imageStruct&constimage, err = ::NativePathNameToFSSpec (const_cast(myfilename.c_str()), &spec, 0); #endif if (err != noErr && err != -37) { - verbose(1, "[GEM:imageQT] error#%d in FSMakeFSSpec()", err); + logpost(0, 3+1, "[GEM:imageQT] error#%d in FSMakeFSSpec()", err); } err = OpenADefaultComponent(GraphicsExporterComponentType, osFileType, &geComp); if (err != noErr) { - verbose(0, "[GEM:imageQT] error#%d in OpenADefaultComponent()", err); + logpost(0, 3+0, "[GEM:imageQT] error#%d in OpenADefaultComponent()", err); return false; // FIXME: } @@ -451,14 +452,14 @@ bool imageQT::save(const imageStruct&constimage, // i don't know, whether quicktime still needs the buffer... if (err != noErr) { - verbose(0, "[GEM:imageQT] error#%d in QTNewGWorldFromPtr()", err); + logpost(0, 3+0, "[GEM:imageQT] error#%d in QTNewGWorldFromPtr()", err); goto cleanup; } // Set the input GWorld for the exporter cErr = GraphicsExportSetInputGWorld(geComp, img); if (cErr != noErr) { - verbose(0, "[GEM:imageQT] error#%d in GraphicsExportSetInputGWorld()", + logpost(0, 3+0, "[GEM:imageQT] error#%d in GraphicsExportSetInputGWorld()", cErr); goto cleanup; } @@ -466,7 +467,7 @@ bool imageQT::save(const imageStruct&constimage, // Set the output file to our FSSpec cErr = GraphicsExportSetOutputFile(geComp, &spec); if (cErr != noErr) { - verbose(0, "[GEM:imageQT] error#%d in GraphicsExportSetOutputFile()", + logpost(0, 3+0, "[GEM:imageQT] error#%d in GraphicsExportSetOutputFile()", cErr); goto cleanup; } @@ -506,7 +507,7 @@ bool imageQT::save(const imageStruct&constimage, // Export it cErr = GraphicsExportDoExport(geComp, NULL); if (cErr != noErr) { - verbose(0, "[GEM:imageQT] ERROR: %i in GraphicsExportDoExport()", cErr); + logpost(0, 3+0, "[GEM:imageQT] ERROR: %i in GraphicsExportDoExport()", cErr); goto cleanup; } diff --git a/plugins/QuickTime/recordQT.cpp b/plugins/QuickTime/recordQT.cpp index a1f9481f4..1f9a8f646 100644 --- a/plugins/QuickTime/recordQT.cpp +++ b/plugins/QuickTime/recordQT.cpp @@ -69,7 +69,7 @@ static bool touch(const std::string&filename) return false; } -REGISTER_RECORDFACTORY("QT", recordQT); +REGISTER_RECORDFACTORY("QuickTime", recordQT); ///////////////////////////////////////////////////////// // // recordQT @@ -108,21 +108,20 @@ recordQT :: recordQT(void) if (err = EnterMovies()) { throw(GemException("unable to initialize QuickTime/Movies")); } - verbose(1, "[GEM:recordQT] QT init done"); + logpost(0, 3+1, "[GEM:recordQT] QT init done"); firsttime=false; } //get list of codecs installed -- useful later CodecNameSpecListPtr codecList; CodecNameSpec codecName; - int i; int count; GetCodecNameList(&codecList,1); count=codecList->count; codecContainer.clear(); - verbose(0, "[GEM:recordQT] %i codecs installed",codecList->count); - for (i = 0; i < count; i++) { + logpost(0, 3+0, "[GEM:recordQT] %i codecs installed",codecList->count); + for (int i = 0; i < count; i++) { codecName = codecList->list[i]; std::string typeName = std::string((char*)codecName.typeName + 1, ((char*)codecName.typeName)[0]); codecListStorage cod = {i, codecName.cType, typeName, codecName.codec}; @@ -135,10 +134,10 @@ recordQT :: recordQT(void) nResID = movieInDataForkResID; m_codecType = kJPEGCodecType; - for(i = 0; i < count; i++) { + for(int i = 0; i < count; i++) { if (codecContainer[i].ctype == kJPEGCodecType) { m_codec = codecContainer[i].codec; - verbose(1, "[GEM:recordQT] found pjpeg codec %i %lu %p ctype", + logpost(0, 3+1, "[GEM:recordQT] found pjpeg codec %i %lu %p ctype", i, m_codecType, m_codec); break; } @@ -147,7 +146,7 @@ recordQT :: recordQT(void) stdComponent = OpenDefaultComponent(StandardCompressionType, StandardCompressionSubType); if (stdComponent == NULL) { - verbose(0, "[GEM:recordQT] failed to open compressor component"); + logpost(0, 3+0, "[GEM:recordQT] failed to open compressor component"); } } @@ -161,7 +160,7 @@ recordQT :: ~recordQT(void) if (stdComponent != NULL) { compErr = CloseComponent(stdComponent); if (compErr != noErr) { - verbose(0, "[GEM:recordQT] CloseComponent failed with error %ld", compErr); + logpost(0, 3+0, "[GEM:recordQT] CloseComponent failed with error %ld", compErr); } } } @@ -263,11 +262,11 @@ void recordQT :: setupQT( m_srcRect.right = m_width; if (m_compressImage->format == GEM_YUV) { - verbose(0, "[GEM:recordQT] using YUV"); + logpost(0, 3+0, "[GEM:recordQT] using YUV"); colorspace = k422YpCbCr8CodecType; } if (m_compressImage->format == GEM_RGBA) { - verbose(0, "[GEM:recordQT] using BGRA"); + logpost(0, 3+0, "[GEM:recordQT] using BGRA"); colorspace = k32ARGBPixelFormat; } #ifdef _WIN32 @@ -314,7 +313,7 @@ void recordQT :: setupQT( if (m_compressImage->upsidedown && m_compressImage->format == GEM_RGBA) { MatrixRecord aMatrix; GetMovieMatrix(m_movie,&aMatrix); - verbose(1, "[GEM:recordQT] upside down"); + logpost(0, 3+1, "[GEM:recordQT] upside down"); ScaleMatrix(&aMatrix,Long2Fix(1),Long2Fix(-1),0,0); SetMovieMatrix(m_movie,&aMatrix); } @@ -419,7 +418,7 @@ void recordQT :: stop(void) m_recordSetup = false; m_firstRun = 1; - verbose(0, "[GEM:recordQT] movie written to %s",m_filename.c_str()); + logpost(0, 3+0, "[GEM:recordQT] movie written to %s",m_filename.c_str()); m_filename.clear(); } @@ -464,7 +463,7 @@ void recordQT :: compressFrame(void) startTime.QuadPart)/countFreq * 1000.f); seconds = (static_cast(endTime.QuadPart - startTime.QuadPart)/countFreq * 1.f); - verbose(1, + logpost(0, 3+1, "[GEM:recordQT] freq %f countFreq %f startTime %d endTime %d fps %f seconds %f", freq, countFreq, static_cast(startTime.QuadPart), static_cast(endTime.QuadPart), fps, seconds); @@ -577,7 +576,7 @@ bool recordQT :: dialog(void) compErr = CloseComponent(stdComponent); } if (compErr != noErr) { - verbose(0, "[GEM:recordQT] CloseComponent failed with error %ld", compErr); + logpost(0, 3+0, "[GEM:recordQT] CloseComponent failed with error %ld", compErr); } //open a new component from scratch @@ -592,7 +591,7 @@ bool recordQT :: dialog(void) compErr = SCRequestSequenceSettings(stdComponent); if (compErr != noErr) { - verbose(0, "[GEM:recordQT] SCRequestSequenceSettings failed with error %ld", + logpost(0, 3+0, "[GEM:recordQT] SCRequestSequenceSettings failed with error %ld", compErr); } @@ -601,7 +600,7 @@ bool recordQT :: dialog(void) compErr = SCGetInfo(stdComponent, scSpatialSettingsType, &SpatialSettings); if (compErr != noErr) { - verbose(0, "[GEM:recordQT] SCGetInfo failed with error %ld", compErr); + logpost(0, 3+0, "[GEM:recordQT] SCGetInfo failed with error %ld", compErr); } m_codecType = SpatialSettings.codecType; @@ -611,14 +610,14 @@ bool recordQT :: dialog(void) m_frameRate = TemporalSettings.frameRate; m_keyFrameRate = TemporalSettings.keyFrameRate; - verbose(1, "[GEM:recordQT] Dialog returned SpatialSettings\n" + logpost(0, 3+1, "[GEM:recordQT] Dialog returned SpatialSettings\n" "\tcodecType %lX\n" "\tcodec %p\n" "\tdepth %d\n" "\tspatialQuality %ld", SpatialSettings.codecType, SpatialSettings.codec, SpatialSettings.depth, SpatialSettings.spatialQuality); - verbose(1, "[GEM:recordQT] Dialog returned TemporalSettings\n" + logpost(0, 3+1, "[GEM:recordQT] Dialog returned TemporalSettings\n" "\ttemporalQualitye %ld\n" "\tframeRate %ld\n" "\tkeyFrameRate %ld", @@ -650,8 +649,7 @@ const char*recordQT :: getCodecName(int i) std::vectorrecordQT::getCodecs(void) { std::vectorresult; - int i; - for(i=0; i(codecContainer[i].ctype) == 'icod') { - verbose(0, "[GEM:recordQT] found Apple Intermediate Codec"); + logpost(0, 3+0, "[GEM:recordQT] found Apple Intermediate Codec"); resetCodecSettings(); m_codecType = codecContainer[i].ctype; m_codec = codecContainer[i].codec; @@ -719,7 +716,7 @@ bool recordQT :: setCodec(const std::string&codecName) break; case 3: /* Animation */ if (codecContainer[i].ctype == kAnimationCodecType) { - verbose(0, "[GEM:recordQT] found Animation"); + logpost(0, 3+0, "[GEM:recordQT] found Animation"); resetCodecSettings(); m_codecType = codecContainer[i].ctype; m_codec = codecContainer[i].codec; @@ -728,7 +725,7 @@ bool recordQT :: setCodec(const std::string&codecName) break; case 4: /* DV NTSC */ if (codecContainer[i].ctype == kDVCNTSCCodecType) { - verbose(0, "[GEM:recordQT] found DV NTSC"); + logpost(0, 3+0, "[GEM:recordQT] found DV NTSC"); resetCodecSettings(); m_codecType = codecContainer[i].ctype; m_codec = codecContainer[i].codec; @@ -737,7 +734,7 @@ bool recordQT :: setCodec(const std::string&codecName) break; case 5: /* DV PAL */ if (codecContainer[i].ctype == kDVCPALCodecType) { - verbose(0, "[GEM:recordQT] found DV PAL"); + logpost(0, 3+0, "[GEM:recordQT] found DV PAL"); resetCodecSettings(); m_codecType = codecContainer[i].ctype; m_codec = codecContainer[i].codec; @@ -747,7 +744,7 @@ bool recordQT :: setCodec(const std::string&codecName) default: /* hmmm... */ if(gensym(codecName.c_str())==gensym(codecContainer[i].name.c_str())) { - verbose(0, "[GEM:recordQT] found '%s'", codecName.c_str()); + logpost(0, 3+0, "[GEM:recordQT] found '%s'", codecName.c_str()); resetCodecSettings(); m_codecType = codecContainer[i].ctype; m_codec = codecContainer[i].codec; diff --git a/plugins/QuickTime/recordQT.h b/plugins/QuickTime/recordQT.h index 14c3b7941..20a1acc3d 100644 --- a/plugins/QuickTime/recordQT.h +++ b/plugins/QuickTime/recordQT.h @@ -92,6 +92,7 @@ class GEM_EXPORT recordQT : public record virtual std::vectorgetCodecs(void); virtual const std::string getCodecDescription(const std::string&codecname); virtual bool enumProperties(gem::Properties&props); + virtual void getProperties(gem::Properties&props) {;}; private: diff --git a/plugins/SGI/Makefile.am b/plugins/SGI/Makefile.am index 4d95ae6b2..be982972c 100644 --- a/plugins/SGI/Makefile.am +++ b/plugins/SGI/Makefile.am @@ -9,6 +9,10 @@ EXTRA_DIST += win-vs2008/imageSGI.sln win-vs2008/imageSGI.vcproj pkglib_LTLIBRARIES= gem_imageSGI.la +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = +dist_gemhelp_DATA += sgi-imageloaderplugin.pd sgi-imagesaverplugin.pd + gem_imageSGI_la_CXXFLAGS = gem_imageSGI_la_LDFLAGS = -module -avoid-version -shared if WINDOWS diff --git a/plugins/SGI/imageSGI.cpp b/plugins/SGI/imageSGI.cpp index e64017107..569c73982 100644 --- a/plugins/SGI/imageSGI.cpp +++ b/plugins/SGI/imageSGI.cpp @@ -26,8 +26,8 @@ using namespace gem::plugins; -REGISTER_IMAGELOADERFACTORY("SGI", imageSGI); -REGISTER_IMAGESAVERFACTORY ("SGI", imageSGI); +REGISTER_IMAGELOADERFACTORY("sgi", imageSGI); +REGISTER_IMAGESAVERFACTORY ("sgi", imageSGI); ///////////////////////////////////////////////////////// // @@ -60,9 +60,9 @@ bool imageSGI :: load(std::string filename, imageStruct&result, result.ysize=ysize; if (csize == 4 || csize == 3) { - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); } else if (csize == 1) { - result.setCsizeByFormat(GEM_GRAY); + result.setFormat(GEM_GRAY); } else { fprintf(stderr, "[GEM:imageSGI] unknown color components in SGI file: %s\n", diff --git a/plugins/SGI/sgi-imageloaderplugin.pd b/plugins/SGI/sgi-imageloaderplugin.pd new file mode 100644 index 000000000..b4e792325 --- /dev/null +++ b/plugins/SGI/sgi-imageloaderplugin.pd @@ -0,0 +1,5 @@ +#N canvas 242 133 450 309 12; +#X text 21 74 The SGI plugin loads SGI images \, typically with extensions: .sgi \, .rgba \, .rgb \, .bw; +#X text 23 119 SGI images were popular in the 90ies on the SGI workstations.; +#X text 22 162 These days they are rather seldom.; +#X text 20 187 However \, the SGI plugin is the oldest image reader in Gem that does not require any external libraries \, so it should be available on all platforms supported by Gem (These days there's also the STB plugin \, which can read more common formats).; diff --git a/plugins/SGI/sgi-imagesaverplugin.pd b/plugins/SGI/sgi-imagesaverplugin.pd new file mode 100644 index 000000000..47b894b95 --- /dev/null +++ b/plugins/SGI/sgi-imagesaverplugin.pd @@ -0,0 +1,6 @@ +#N canvas 242 133 489 314 12; +#X text 43 79 SGI images were popular in the 90ies on the SGI workstations.; +#X text 42 122 These days they are rather seldom.; +#X text 22 42 The SGI plugin writes SGI images.; +#X text 47 174 All images are converted to RGBA before saving.; +#X text 49 205 You can pass the 'imagename' property to set the metadata in the image.; diff --git a/plugins/STB/Makefile.am b/plugins/STB/Makefile.am index bca600073..26c052802 100644 --- a/plugins/STB/Makefile.am +++ b/plugins/STB/Makefile.am @@ -12,6 +12,10 @@ EXTRA_DIST+= \ pkglib_LTLIBRARIES= gem_imageSTB.la +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = +dist_gemhelp_DATA += stb-imageloaderplugin.pd stb-imagesaverplugin.pd + gem_imageSTB_la_CXXFLAGS = gem_imageSTB_la_LDFLAGS = -module -avoid-version -shared if WINDOWS diff --git a/plugins/STB/imageSTB.cpp b/plugins/STB/imageSTB.cpp index 24512e7f8..29e81c53c 100644 --- a/plugins/STB/imageSTB.cpp +++ b/plugins/STB/imageSTB.cpp @@ -36,8 +36,8 @@ using namespace gem::plugins; -REGISTER_IMAGELOADERFACTORY("STB", imageSTB); -REGISTER_IMAGESAVERFACTORY ("STB", imageSTB); +REGISTER_IMAGELOADERFACTORY("stb", imageSTB); +REGISTER_IMAGESAVERFACTORY ("stb", imageSTB); ///////////////////////////////////////////////////////// // @@ -70,7 +70,7 @@ bool imageSTB :: load(std::string filename, imageStruct&result, result.xsize=xsize; result.ysize=ysize; - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); result.reallocate(); result.fromRGBA(data); diff --git a/plugins/STB/stb-imageloaderplugin.pd b/plugins/STB/stb-imageloaderplugin.pd new file mode 100644 index 000000000..3962e761a --- /dev/null +++ b/plugins/STB/stb-imageloaderplugin.pd @@ -0,0 +1,12 @@ +#N canvas 678 202 588 374 12; +#X text 37 110 - TGA (unknown subset); +#X text 37 130 - PSD (composited view only \, no extra channels \, 8/16 bpc); +#X text 37 170 - PIC (Softimage PIC); +#X text 37 190 - PNM (PPM and PGM binary only); +#X text 37 150 - GIF (unknown subset); +#X text 21 44 The STB plugin can load the following formats:; +#X text 29 280 Not all variants of the given formats might be supported!; +#X text 30 307 However \, STB does not require any additional dependencies \, so it should be available (with the same capabilities) on all platforms supported by Gem., f 77; +#X text 39 91 - PNG¹ ( 1/2/4/8/16-bpc); +#X text 39 71 - JPEG¹ (baseline & progressive. 12 bpc/arithmetic NOT supported), f 66; +#X text 30 227 ¹ Note that (at least) JPEG and PNG images that have the upside-down flag set will not be automatically corrected., f 77; diff --git a/plugins/STB/stb-imagesaverplugin.pd b/plugins/STB/stb-imagesaverplugin.pd new file mode 100644 index 000000000..fe7623524 --- /dev/null +++ b/plugins/STB/stb-imagesaverplugin.pd @@ -0,0 +1,8 @@ +#N canvas 702 134 529 313 12; +#X text 21 74 The STB plugin can write the following formats:; +#X text 37 120 - PNG; +#X text 37 100 - JPEG, f 69; +#X text 37 140 - TGA; +#X text 37 160 - BMP; +#X text 32 249 All images are converted to RGBA before saving.; +#X text 29 200 Typically only some baseline subset is supported for each format. JPEG saving takes a 'quality' property (1..100).; diff --git a/plugins/TEST/Makefile.am b/plugins/TEST/Makefile.am index dc6da82a4..052de2658 100644 --- a/plugins/TEST/Makefile.am +++ b/plugins/TEST/Makefile.am @@ -8,11 +8,10 @@ AM_LDFLAGS = -module -avoid-version -shared gemhelpdir=$(pkglibdir) dist_gemhelp_DATA = - - pkglib_LTLIBRARIES = pkglib_LTLIBRARIES+=gem_filmTEST.la +dist_gemhelp_DATA +=test-filmplugin.pd pkglib_LTLIBRARIES+=gem_videoTEST.la dist_gemhelp_DATA +=test-videoplugin.pd diff --git a/plugins/TEST/filmTEST.cpp b/plugins/TEST/filmTEST.cpp index 6712d2b6c..762bd273c 100644 --- a/plugins/TEST/filmTEST.cpp +++ b/plugins/TEST/filmTEST.cpp @@ -40,7 +40,7 @@ filmTEST :: filmTEST(void) : m_fps(20) , m_numFrames(100) { - m_image.image.setCsizeByFormat(GEM_RGBA); + m_image.image.setFormat(GEM_RGBA); m_image.image.xsize=320; m_image.image.ysize=240; m_image.image.reallocate(); diff --git a/plugins/TEST/test-filmplugin.pd b/plugins/TEST/test-filmplugin.pd new file mode 100644 index 000000000..c15a0c8c5 --- /dev/null +++ b/plugins/TEST/test-filmplugin.pd @@ -0,0 +1,6 @@ +#N canvas 856 26 505 263 10; +#X obj 143 227 s \$1-ctl; +#X msg 143 184 backend test \, open test; +#X text 51 50 a test backend for [pix_film]; +#X text 55 111 This pretends to open a 'test' video file that contains a simple test-pattern.; +#X connect 1 0 0 0; diff --git a/plugins/TEST/test-videoplugin.pd b/plugins/TEST/test-videoplugin.pd index 1c88a7de2..df214036c 100644 --- a/plugins/TEST/test-videoplugin.pd +++ b/plugins/TEST/test-videoplugin.pd @@ -1,2 +1,18 @@ -#N canvas 8 49 505 112 10; -#X text 89 47 Nothing special about this backend...; +#N canvas 856 26 505 389 10; +#X obj 142 347 s \$1-ctl; +#X msg 143 144 backend test \, device test; +#X msg 179 185 dimen 720 480; +#X obj 180 299 t a; +#X text 51 50 a test backend for [pix_video]; +#X text 55 111 This backend creates simple test patterns:; +#X msg 210 236 set type noise; +#X msg 210 256 set type red; +#X msg 210 276 set type green; +#X msg 210 296 set type blue; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X connect 9 0 3 0; diff --git a/plugins/TEST/videoTEST.cpp b/plugins/TEST/videoTEST.cpp index 35d64a6d4..c06dc8a58 100644 --- a/plugins/TEST/videoTEST.cpp +++ b/plugins/TEST/videoTEST.cpp @@ -18,7 +18,7 @@ videoTEST::videoTEST(void) : { m_pixBlock.image.xsize = 64; m_pixBlock.image.ysize = 64; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); } @@ -34,8 +34,7 @@ bool videoTEST::open(gem::Properties&props) static void setNoise(unsigned char*data, unsigned int count) { - unsigned int i=0; - for(i=0; ikeys=props.keys(); - unsigned int i; - for(i=0; ifourcc); if(ILLEGAL==format) { - verbose(1, "[GEM:videoUNICAP] unsupported format '%s'", fmt->identifier); + logpost(0, 3+1, "[GEM:videoUNICAP] unsupported format '%s'", fmt->identifier); return; } @@ -374,7 +373,7 @@ void videoUNICAP::newFrame (unicap_handle_t handle, m_pix.image.fromYU12(data); break; default: - verbose(1, "[GEM:videoUNICAP] cannot convert from given format"); + logpost(0, 3+1, "[GEM:videoUNICAP] cannot convert from given format"); break; } m_pix.newimage=1; @@ -405,8 +404,8 @@ bool videoUNICAP :: start(void) std::string s; if(m_props.get("format", s)) { - for( unsigned i = 0; - SUCCESS( unicap_enumerate_formats( m_handle, NULL, &format, i ) ); i++) { + for(unsigned i = 0; + SUCCESS( unicap_enumerate_formats( m_handle, NULL, &format, i ) ); i++) { count_format++; if(s == format.identifier) { default_format=i; @@ -443,7 +442,7 @@ bool videoUNICAP :: start(void) int format_index=formatid[formatid_index]; if( !SUCCESS( unicap_enumerate_formats( m_handle, &format_spec, &format, format_index) ) ) { - verbose(1, "[GEM:videoUNICAP] Failed to get video format %d", + logpost(0, 3+1, "[GEM:videoUNICAP] Failed to get video format %d", format_index); continue; } @@ -565,7 +564,6 @@ std::vector videoUNICAP::enumerate(void) std::vector result; int devcount=0; unicap_status_t status = 0; - int i=0; m_providers.clear(); m_providers.push_back(s_name); @@ -581,7 +579,7 @@ std::vector videoUNICAP::enumerate(void) m_name2devices.clear(); - for(i=0; i videoUNICAP::enumerate(void) if(SUCCESS(status)) { const unsigned int cur=m_devices.size(); #if 0 - verbose(1, + logpost(0, 3+1, "[GEM:videoUNICAP] ID='%s'\tmodel='%s'\tvendor='%s'\tdevice='%s'\tCPI='%s'", device.identifier, device.model_name, @@ -682,8 +680,7 @@ bool videoUNICAP :: enumProperties(gem::Properties&readable, return false; } - int id=0; - for(id=0; id keys=props.keys(); bool getwidth=false, getheight=false; - int i=0; - for(i=0; i keys=props.keys(); - int i=0; - for(i=0; i #include -REGISTER_RECORDFACTORY("V4L", recordV4L); +REGISTER_RECORDFACTORY("v4l", recordV4L); ///////////////////////////////////////////////////////// // // recordV4L @@ -54,8 +54,8 @@ recordV4L :: recordV4L(void): { m_image.xsize=720; m_image.ysize=576; - m_image.setCsizeByFormat(GEM_YUV); - m_image.setCsizeByFormat(GEM_RGBA); + m_image.setFormat(GEM_YUV); + m_image.setFormat(GEM_RGBA); m_image.reallocate(); switch(m_image.format) { @@ -190,7 +190,7 @@ bool recordV4L :: write(imageStruct*img) return false; } } - m_image.setCsizeByFormat(); + m_image.setFormat(); m_image.convertFrom(img); // m_image.upsidedown=!m_image.upsidedown; diff --git a/plugins/V4L/recordV4L.h b/plugins/V4L/recordV4L.h index b821e66a0..cac719aaf 100644 --- a/plugins/V4L/recordV4L.h +++ b/plugins/V4L/recordV4L.h @@ -103,10 +103,8 @@ class GEM_EXPORT recordV4L : public record virtual const std::string getCodecDescription(const std::string&); virtual bool enumProperties(gem::Properties&); - virtual bool dialog(void) - { - return false; - } + virtual void getProperties(gem::Properties&props) {;}; + virtual bool dialog(void) { return false; } private: int m_fd; diff --git a/plugins/V4L/v4l-recordplugin.pd b/plugins/V4L/v4l-recordplugin.pd new file mode 100644 index 000000000..ad51be662 --- /dev/null +++ b/plugins/V4L/v4l-recordplugin.pd @@ -0,0 +1,3 @@ +#N canvas 8 49 528 177 10; +#X text 89 76 Note however \, that V4L(1) has been deprecated in the linux-kernel for many years now \, and you should probably use the V4L2 backend instead.; +#X text 89 47 This backend allows you to write to V4L(1) output devices.; diff --git a/plugins/V4L/v4l-videoplugin.pd b/plugins/V4L/v4l-videoplugin.pd index 1c88a7de2..8fcf011a2 100644 --- a/plugins/V4L/v4l-videoplugin.pd +++ b/plugins/V4L/v4l-videoplugin.pd @@ -1,2 +1,3 @@ -#N canvas 8 49 505 112 10; +#N canvas 8 49 528 177 10; #X text 89 47 Nothing special about this backend...; +#X text 89 76 Note however \, that V4L(1) has been deprecated in the linux-kernel for many years now \, and you should probably use the V4L2 backend instead.; diff --git a/plugins/V4L/videoV4L.cpp b/plugins/V4L/videoV4L.cpp index 787bca3c4..7ad285405 100644 --- a/plugins/V4L/videoV4L.cpp +++ b/plugins/V4L/videoV4L.cpp @@ -97,13 +97,12 @@ videoV4L :: videoV4L() : videoBase("v4l") m_channel(V4L_COMPOSITEIN), errorcount(0) { - unsigned int i; memset(&vtuner, 0, sizeof(vtuner)); memset(&vpicture, 0, sizeof(vpicture)); memset(&vcap, 0, sizeof(vcap)); memset(&vchannel, 0, sizeof(vchannel)); memset(&vmbuf, 0, sizeof(vmbuf)); - for(i=0; i vcap.minheight) ? m_height : vcap.minheight; height =(height > vcap.maxheight) ? vcap.maxheight : height; - for (i = 0; i < V4L_NBUF; i++) { + for (int i = 0; i < V4L_NBUF; i++) { switch(m_reqFormat) { case GEM_RAW_GRAY: vmmap[i].format = VIDEO_PALETTE_GREY; @@ -385,7 +382,7 @@ bool videoV4L :: startTransfer() } if (v4l1_ioctl(tvfd, VIDIOCMCAPTURE, &vmmap[frame]) < 0) { - for (i = 0; i < V4L_NBUF; i++) { + for (int i = 0; i < V4L_NBUF; i++) { vmmap[i].format = vpicture.palette; } if (v4l1_ioctl(tvfd, VIDIOCMCAPTURE, &vmmap[frame]) < 0) { @@ -400,7 +397,7 @@ bool videoV4L :: startTransfer() just used RGB, I wonder? */ m_image.image.xsize = vmmap[frame].width; m_image.image.ysize = vmmap[frame].height; - m_image.image.setCsizeByFormat(m_reqFormat); + m_image.image.setFormat(m_reqFormat); m_image.image.reallocate(); switch((m_gotFormat=vmmap[frame].format)) { @@ -429,7 +426,7 @@ bool videoV4L :: startTransfer() m_haveVideo = 1; - verbose(1, "[GEM:videoV4L] startTransfer opened video connection %X", + logpost(0, 3+1, "[GEM:videoV4L] startTransfer opened video connection %X", tvfd); return true; } @@ -462,22 +459,21 @@ std::vector videoV4L::enumerate() { std::vector result; std::vector glob, allglob; - int i=0; glob=gem::files::getFilenameListing("/dev/video*"); - for(i=0; i videoV4L::enumerate() if (vcap.type & VID_TYPE_CAPTURE) { result.push_back(dev); } else { - verbose(1, "[GEM:videoV4L] %s is v4l1 but cannot capture", dev.c_str()); + logpost(0, 3+1, "[GEM:videoV4L] %s is v4l1 but cannot capture", dev.c_str()); } } else { - verbose(1, "[GEM:videoV4L] %s is no v4l1 device", dev.c_str()); + logpost(0, 3+1, "[GEM:videoV4L] %s is no v4l1 device", dev.c_str()); } v4l1_close(fd); @@ -500,7 +496,6 @@ std::vector videoV4L::enumerate() bool videoV4L::enumProperties(gem::Properties&readable, gem::Properties&writeable) { - int i=0; std::vectorkeys; gem::any type; @@ -521,7 +516,7 @@ bool videoV4L::enumProperties(gem::Properties&readable, keys.push_back("frequency"); type=0; - for(i=0; ikeys=props.keys(); bool restart=false; bool do_s_chan=false, do_s_pict=false; - int i=0; double d; std::string s; @@ -554,7 +548,7 @@ void videoV4L::setProperties(gem::Properties&props) perror("[GEM:videoV4L] VDIOCGCHAN"); } - for(i=0; i #include -REGISTER_RECORDFACTORY("V4L2", recordV4L2); +REGISTER_RECORDFACTORY("v4l2", recordV4L2); ///////////////////////////////////////////////////////// // // recordV4L2 @@ -56,8 +56,8 @@ recordV4L2 :: recordV4L2(void): { m_image.xsize=720; m_image.ysize=576; - m_image.setCsizeByFormat(GEM_YUV); - //m_image.setCsizeByFormat(GEM_RGBA); /* RGBA works with Gem, but not with GStreamer and xawtv */ + m_image.setFormat(GEM_YUV); + //m_image.setFormat(GEM_RGBA); /* RGBA works with Gem, but not with GStreamer and xawtv */ m_image.reallocate(); switch(m_image.format) { @@ -153,7 +153,7 @@ bool recordV4L2::init(const imageStruct* dummyImage, const int framedur) vid_format.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB; int format= vid_format.fmt.pix.pixelformat; - verbose(1, "[GEM:recordV4L2] v4l2-output requested %dx%d @ '%c%c%c%c'", + logpost(0, 3+1, "[GEM:recordV4L2] v4l2-output requested %dx%d @ '%c%c%c%c'", vid_format.fmt.pix.width, vid_format.fmt.pix.height, (char)(format), (char)(format>>8), @@ -165,7 +165,7 @@ bool recordV4L2::init(const imageStruct* dummyImage, const int framedur) return false; } - verbose(1, "[GEM:recordV4L2] v4l2-output returned %dx%d @ '%c%c%c%c'", + logpost(0, 3+1, "[GEM:recordV4L2] v4l2-output returned %dx%d @ '%c%c%c%c'", vid_format.fmt.pix.width, vid_format.fmt.pix.height, (char)(format), (char)(format>>8), @@ -198,7 +198,7 @@ bool recordV4L2 :: write(imageStruct*img) return true; } } - m_image.setCsizeByFormat(); + m_image.setFormat(); m_image.convertFrom(img); // m_image.upsidedown=!m_image.upsidedown; diff --git a/plugins/V4L2/recordV4L2.h b/plugins/V4L2/recordV4L2.h index 5e5d2d628..cceb26caa 100644 --- a/plugins/V4L2/recordV4L2.h +++ b/plugins/V4L2/recordV4L2.h @@ -97,10 +97,8 @@ class GEM_EXPORT recordV4L2 : public record virtual const std::string getCodecDescription(const std::string&); virtual bool enumProperties(gem::Properties&); - virtual bool dialog(void) - { - return false; - } + virtual void getProperties(gem::Properties&props) {;}; + virtual bool dialog(void) { return false; } private: diff --git a/plugins/V4L2/v4l2-recordplugin.pd b/plugins/V4L2/v4l2-recordplugin.pd new file mode 100644 index 000000000..e12994c61 --- /dev/null +++ b/plugins/V4L2/v4l2-recordplugin.pd @@ -0,0 +1,26 @@ +#N canvas 712 348 578 574 10; +#X text 75 101 1- select the backend; +#X obj 232 253 s \$1-ctl; +#X msg 261 212 record 1; +#X text 75 211 3- start sending out stream; +#X text 89 47 recordV4L2 - output pixes with the video4linux2 framework; +#X text 89 57 =========================================================; +#X msg 261 102 codec v4l2; +#X msg 261 162 file /dev/video1; +#X text 75 161 2- select a V4L2 output device; +#X msg 135 369 https://github.com/umlaeute/v4l2loopback; +#N canvas 0 0 204 175 URL 0; +#X obj 37 37 inlet; +#X obj 37 60 symbol; +#X msg 37 83 browse \$1; +#X obj 37 106 pdcontrol; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X restore 135 392 pd URL; +#X text 86 315 This is mostly useful for sharing pix-streams between applications using "virtual cameras" \, e.g. via the v4l2loopback kernel module:; +#X text 83 443 While writing to a v4l2 OUTPUT device \, you can read the video-frames from the corresponding CAPTURE device with a different application (e.g. a video-encoder \, or your favourite teleconferencing software); +#X connect 2 0 1 0; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 9 0 10 0; diff --git a/plugins/V4L2/videoV4L2.cpp b/plugins/V4L2/videoV4L2.cpp index 4e25995e4..cb9fb184c 100644 --- a/plugins/V4L2/videoV4L2.cpp +++ b/plugins/V4L2/videoV4L2.cpp @@ -42,14 +42,14 @@ using namespace gem::plugins; #undef debugIOCTL #if 0 -# define debugPost ::startpost("%s:%s[%d]", __FILE__, __FUNCTION__, __LINE__); ::post +# define debugPost ::startpost("%s:%s[%d] v4l2@%p/%d:", __FILE__, __FUNCTION__, __LINE__, this, this->m_tvfd); ::post #else # include "Utils/nop.h" # define debugPost nop_post #endif #if 0 -# define debugThread ::startpost("%s:%s[%d]", __FILE__, __FUNCTION__, __LINE__); ::post +# define debugThread ::startpost("%s:%s[%d] v4l2@%p/%d: ", __FILE__, __FUNCTION__, __LINE__, this, this->m_tvfd); ::post #else # include "Utils/nop.h" # define debugThread nop_post @@ -83,7 +83,7 @@ REGISTER_VIDEOFACTORY("v4l2", videoV4L2); videoV4L2 :: videoV4L2() : videoBase("v4l2", 0) , m_gotFormat(0), m_colorConvert(0), - m_tvfd(0), + m_tvfd(-1), m_buffers(NULL), m_nbuffers(0), m_currentBuffer(NULL), m_frame(0), m_last_frame(0), @@ -192,7 +192,7 @@ int videoV4L2::init_mmap (void) buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = m_nbuffers; - debugPost("v4l2: buf.index==%d", buf.index); + debugPost("buf.index==%d", buf.index); if (-1 == xioctl (m_tvfd, VIDIOC_QUERYBUF, &buf)) { perror("[GEM:videoV4L2] VIDIOC_QUERYBUF"); @@ -244,7 +244,7 @@ void *videoV4L2 :: capturing(void) m_capturing=true; - debugThread("V4L2: memset"); + debugThread("memset", this); memset(&(buf), 0, sizeof (buf)); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; @@ -255,7 +255,7 @@ void *videoV4L2 :: capturing(void) FD_ZERO (&fds); FD_SET (m_tvfd, &fds); - debugThread("V4L2: grab"); + debugThread("grab", this); m_frame++; m_frame%=nbuf; @@ -265,7 +265,7 @@ void *videoV4L2 :: capturing(void) tv.tv_sec = 0; tv.tv_usec = 100; int r = select(0,0,0,0,&tv); - debugThread("V4L2: waited..."); + debugThread("waited...", this); if (-1 == r) { @@ -276,7 +276,7 @@ void *videoV4L2 :: capturing(void) } memset(&(buf), 0, sizeof (buf)); - debugThread("V4L2: memset..."); + debugThread("memset...", this); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; @@ -298,7 +298,7 @@ void *videoV4L2 :: capturing(void) } } - debugThread("V4L2: grabbed %d", buf.index); + debugThread("grabbed %d", this, buf.index); gotSize=buf.bytesused; currentBuffer=buffers[buf.index].start; @@ -309,7 +309,7 @@ void *videoV4L2 :: capturing(void) captureerror=true; } - debugThread("V4L2: dequeueued"); + debugThread("dequeueued", this); if(expectedSize<=gotSize) { m_frame_ready = 1; @@ -336,7 +336,7 @@ void *videoV4L2 :: capturing(void) // stop capturing m_capturing=false; - debugThread("V4L2: thread finished"); + debugThread("thread finished"); return NULL; } @@ -353,7 +353,7 @@ pixBlock *videoV4L2 :: getFrame() m_rendering=rendering; return NULL; } - //debugPost("v4l2: getting frame %d", m_frame_ready); + //debugPost("getting frame %d", m_frame_ready); m_image.newfilm=0; if (!m_frame_ready) { m_image.newimage = 0; @@ -430,12 +430,12 @@ bool videoV4L2 :: openDevice(gem::Properties&props) '/') { // assuming all v4l2 device's paths starts with '/' std::vector alldev = enumerate(); - int i; + int i=0; for(i=0; i= alldev.size() ) { - verbose(0, "[GEM:videoV4L2] no v4l2 input device on bus %s\n", + logpost(0, 3+0, "[GEM:videoV4L2] no v4l2 input device on bus %s\n", devname.c_str()); devname = ""; } @@ -461,13 +461,13 @@ bool videoV4L2 :: openDevice(gem::Properties&props) const char*dev_name=devname.c_str(); - debugPost("v4l2: device: %s", dev_name); + debugPost("device: %s", dev_name); // try to open the device m_tvfd = v4l2_open (dev_name, O_RDWR /* required */, 0); if (-1 == m_tvfd) { - verbose(0, "[GEM:videoV4L2] Cannot open '%s': %d, %s", dev_name, errno, + logpost(0, 3+0, "[GEM:videoV4L2] Cannot open '%s': %d, %s", dev_name, errno, strerror (errno)); closeDevice(); return false; @@ -475,14 +475,14 @@ bool videoV4L2 :: openDevice(gem::Properties&props) struct stat st; if (-1 == fstat (m_tvfd, &st)) { - verbose(0, "[GEM:videoV4L2] Cannot identify '%s': %d, %s", dev_name, errno, + logpost(0, 3+0, "[GEM:videoV4L2] Cannot identify '%s': %d, %s", dev_name, errno, strerror (errno)); closeDevice(); return false; } if (!S_ISCHR (st.st_mode)) { - verbose(0, "[GEM:videoV4L2] %s is no device", dev_name); + logpost(0, 3+0, "[GEM:videoV4L2] %s is no device", dev_name); closeDevice(); return false; } @@ -492,7 +492,7 @@ bool videoV4L2 :: openDevice(gem::Properties&props) struct v4l2_capability cap; if (-1 == xioctl (m_tvfd, VIDIOC_QUERYCAP, &cap)) { if (EINVAL == errno) { - verbose(0, "[GEM:videoV4L2] %s is no V4L2 device", dev_name); + logpost(0, 3+0, "[GEM:videoV4L2] %s is no V4L2 device", dev_name); closeDevice(); return false; } else { @@ -503,26 +503,26 @@ bool videoV4L2 :: openDevice(gem::Properties&props) } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - verbose(0, "[GEM:videoV4L2] %s is no video capture device", dev_name); + logpost(0, 3+0, "[GEM:videoV4L2] %s is no video capture device", dev_name); closeDevice(); return false; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - verbose(0, "[GEM:videoV4L2] %s does not support streaming i/o", dev_name); + logpost(0, 3+0, "[GEM:videoV4L2] %s does not support streaming i/o", dev_name); closeDevice(); return false; } #if defined V4L2_CAP_DEVICE_CAPS && defined V4L2_CAP_META_CAPTURE if (cap.capabilities & V4L2_CAP_DEVICE_CAPS && V4L2_CAP_META_CAPTURE & cap.device_caps) { - verbose(0, "[GEM:videoV4L2] %s is a metadata device", dev_name); + logpost(0, 3+0, "[GEM:videoV4L2] %s is a metadata device", dev_name); closeDevice(); return false; } #endif - verbose(1, "[GEM:videoV4L2] successfully opened %s", dev_name); + logpost(0, 3+1, "[GEM:videoV4L2] successfully opened %s", dev_name); setProperties(props); @@ -530,7 +530,7 @@ bool videoV4L2 :: openDevice(gem::Properties&props) } void videoV4L2 :: closeDevice() { - verbose(1, "[GEM:videoV4L2] closing device %d", m_tvfd); + logpost(0, 3+1, "[GEM:videoV4L2] closing device %d", m_tvfd); if (m_tvfd>=0) { v4l2_close(m_tvfd); } @@ -545,15 +545,15 @@ void videoV4L2 :: closeDevice() bool videoV4L2 :: restartTransfer() { bool rendering=m_rendering; - debugPost("v4l2: restart transfer"); + debugPost("restart transfer"); if(m_capturing) { stopTransfer(); } - debugPost("v4l2: restart stopped"); + debugPost("restart stopped"); if (rendering) { startTransfer(); } - debugPost("v4l2: restart started"); + debugPost("restart started"); return true; } @@ -567,14 +567,14 @@ bool videoV4L2 :: startTransfer() if(m_tvfd<0) { return false; } - debugPost("v4l2: startTransfer: %d", m_capturing); + debugPost("startTransfer: %d", m_capturing); if(m_capturing) { stopTransfer(); // just in case we are already running! } - debugPost("v4l2: start transfer"); + debugPost("start transfer"); m_stopTransfer=false; m_rendering=true; - verbose(1, "[GEM:videoV4L2] starting transfer"); + logpost(0, 3+1, "[GEM:videoV4L2] starting transfer"); int i; __u32 pixelformat=0; @@ -613,7 +613,7 @@ bool videoV4L2 :: startTransfer() if(fmt.fmt.pix.pixelformat != pixelformat) { fmt.fmt.pix.pixelformat = pixelformat; - verbose(1, "[GEM:videoV4L2] want 0x%X == '%c%c%c%c' ", m_reqFormat, + logpost(0, 3+1, "[GEM:videoV4L2] want 0x%X == '%c%c%c%c' ", m_reqFormat, (char)(fmt.fmt.pix.pixelformat), (char)(fmt.fmt.pix.pixelformat>>8), (char)(fmt.fmt.pix.pixelformat>>16), @@ -637,19 +637,19 @@ bool videoV4L2 :: startTransfer() m_gotFormat=fmt.fmt.pix.pixelformat; switch(m_gotFormat) { case V4L2_PIX_FMT_RGB32: - debugPost("v4l2: ARGB"); + debugPost("ARGB"); break; case V4L2_PIX_FMT_RGB24: - debugPost("v4l2: RGB"); + debugPost("RGB"); break; case V4L2_PIX_FMT_UYVY: - debugPost("v4l2: YUV "); + debugPost("YUV "); break; case V4L2_PIX_FMT_GREY: - debugPost("v4l2: gray"); + debugPost("gray"); break; case V4L2_PIX_FMT_YUV420: - debugPost("v4l2: YUV 4:2:0"); + debugPost("YUV 4:2:0"); break; default: /* hmm, we don't know how to handle this @@ -691,9 +691,10 @@ bool videoV4L2 :: startTransfer() (char)(m_gotFormat>>16), (char)(m_gotFormat>>24)); /* we should really return here! */ + goto closit; } - verbose(1, "[GEM:videoV4L2] got '%c%c%c%c'", + logpost(0, 3+1, "[GEM:videoV4L2] got '%c%c%c%c'", (char)(m_gotFormat), (char)(m_gotFormat>>8), (char)(m_gotFormat>>16), @@ -703,7 +704,7 @@ bool videoV4L2 :: startTransfer() goto closit; } - for (i = 0; i < m_nbuffers; ++i) { + for (int i = 0; i < m_nbuffers; ++i) { struct v4l2_buffer buf; memset (&(buf), 0, sizeof (buf)); @@ -720,6 +721,7 @@ bool videoV4L2 :: startTransfer() type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl (m_tvfd, VIDIOC_STREAMON, &type)) { perror("[GEM:videoV4L2] VIDIOC_STREAMON");//exit + goto closit; } m_frameSize=fmt.fmt.pix.sizeimage; @@ -728,10 +730,10 @@ bool videoV4L2 :: startTransfer() just used RGB, I wonder? */ m_image.image.xsize = fmt.fmt.pix.width; m_image.image.ysize = fmt.fmt.pix.height; - m_image.image.setCsizeByFormat(m_reqFormat); + m_image.image.setFormat(m_reqFormat); m_image.image.reallocate(); - debugPost("v4l2: format: %c%c%c%c -> 0x%X", + debugPost("format: %c%c%c%c -> 0x%X", (char)(m_gotFormat), (char)(m_gotFormat>>8), (char)(m_gotFormat>>16), @@ -757,7 +759,7 @@ bool videoV4L2 :: startTransfer() m_colorConvert=true; } - debugPost("v4l2: colorconvert=%d", m_colorConvert); + debugPost("colorconvert=%d", m_colorConvert); /* create thread */ m_continue_thread = 1; @@ -765,17 +767,18 @@ bool videoV4L2 :: startTransfer() pthread_create(&m_thread_id, 0, capturing_, this); while(!m_capturing) { usleep(10); - debugPost("v4l2: waiting for thread to come up"); + debugPost("waiting for thread to come up"); } + debugPost("thread running"); - verbose(1, "[GEM:videoV4L2] Opened video connection 0x%X", m_tvfd); + logpost(0, 3+1, "[GEM:videoV4L2] Opened video connection 0x%X", m_tvfd); return(1); closit: - debugPost("v4l2: closing it!"); + debugPost("closing it!"); stopTransfer(); - debugPost("v4l2: closed it"); + debugPost("closed it"); return(0); } @@ -785,7 +788,7 @@ bool videoV4L2 :: startTransfer() ///////////////////////////////////////////////////////// bool videoV4L2 :: stopTransfer() { - debugPost("v4l2: stoptransfer"); + debugPost("stoptransfer: %d/%d", m_capturing, m_continue_thread); if(!m_capturing) { return false; } @@ -796,23 +799,24 @@ bool videoV4L2 :: stopTransfer() m_continue_thread = 0; pthread_join (m_thread_id, &dummy); } + debugPost("thread wait %d", m_capturing); while(m_capturing) { usleep(10); - debugPost("v4l2: waiting for thread to finish"); + debugPost("waiting for thread to finish"); } // unmap the mmap - debugPost("v4l2: unmapping %d buffers: %x", m_nbuffers, m_buffers); + debugPost("unmapping %d buffers: %x", m_nbuffers, m_buffers); if(m_buffers) { for (int i = 0; i < m_nbuffers; ++i) if (-1 == v4l2_munmap (m_buffers[i].start, m_buffers[i].length)) { // oops: couldn't unmap the memory } - debugPost("v4l2: freeing buffers: %x", m_buffers); + debugPost("freeing buffers: %x", m_buffers); free (m_buffers); } m_buffers=NULL; - debugPost("v4l2: freed"); + debugPost("freed"); // stop streaming if(m_tvfd) { @@ -822,12 +826,12 @@ bool videoV4L2 :: stopTransfer() } } - debugPost("v4l2: de-requesting buffers"); + debugPost("de-requesting buffers"); reqbufs(m_tvfd, 0); m_frame_ready = 0; m_rendering=false; - debugPost("v4l2: stoppedTransfer"); + debugPost("stoppedTransfer"); return true; } @@ -857,9 +861,9 @@ std::vector videoV4L2::enumerate() for(int i=0; i videoV4L2::enumerate() memset (&cap, 0, sizeof (cap)); if (-1 != xioctl (fd, VIDIOC_QUERYCAP, &cap)) { if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - verbose(1, "[GEM:videoV4L2] %s is v4l2 but cannot capture", dev.c_str()); + logpost(0, 3+1, "[GEM:videoV4L2] %s is v4l2 but cannot capture", dev.c_str()); #if defined V4L2_CAP_DEVICE_CAPS && defined V4L2_CAP_META_CAPTURE } else if (cap.capabilities & V4L2_CAP_DEVICE_CAPS && V4L2_CAP_META_CAPTURE & cap.device_caps) { - verbose(1, "[GEM:videoV4L2] %s is a v4l2 meta device", dev.c_str()); + logpost(0, 3+1, "[GEM:videoV4L2] %s is a v4l2 meta device", dev.c_str()); #endif } else { result.push_back(dev); } } else { - verbose(1, "[GEM:videoV4L2] %s is no v4l2 device", dev.c_str()); + logpost(0, 3+1, "[GEM:videoV4L2] %s is no v4l2 device", dev.c_str()); } v4l2_close(fd); } @@ -931,7 +935,6 @@ bool videoV4L2 :: enumProperties(gem::Properties&readable, gem::Properties&writeable) { struct v4l2_queryctrl queryctrl; - __u32 id=0; std::string dummy_s; if(m_tvfd<0) { @@ -946,7 +949,7 @@ bool videoV4L2 :: enumProperties(gem::Properties&readable, memset (&queryctrl, 0, sizeof (queryctrl)); - for (id = V4L2_CID_BASE; + for (__u32 id = V4L2_CID_BASE; id < V4L2_CID_LASTP1; id++) { queryctrl.id = id; @@ -960,13 +963,25 @@ bool videoV4L2 :: enumProperties(gem::Properties&readable, } } - for (id = V4L2_CID_PRIVATE_BASE;; - id++) { + for (__u32 id = V4L2_CID_PRIVATE_BASE;;id++) { + int ret = 0; queryctrl.id = id; - if (0 == xioctl (m_tvfd, VIDIOC_QUERYCTRL, &queryctrl)) { + ret = xioctl (m_tvfd, VIDIOC_QUERYCTRL, &queryctrl); + if (0 == ret) { addProperties(queryctrl, readable, writeable); } else { - if (errno == EINVAL) { + /* we practically always fail here and could just 'break' + * https://github.com/gjasny/v4l-utils/blob/371537d1bcf03146682005a858af1b3e02900cc1/utils/v4l2-compliance/v4l2-test-controls.cpp#L344-L350 + */ + if (errno == ENOTTY) { + break; + } + if (errno && errno != EINVAL) { + /* invalid return code */ + break; + } + if (errno) { + /* EINVAL */ break; } } diff --git a/plugins/VFW/videoVFW.cpp b/plugins/VFW/videoVFW.cpp index b4bb52dda..92b155de2 100644 --- a/plugins/VFW/videoVFW.cpp +++ b/plugins/VFW/videoVFW.cpp @@ -72,7 +72,7 @@ bool videoVFW :: openDevice(gem::Properties&props) char driverName[256]; char driverDesc[256]; if (capGetDriverDescription(0, driverName, 256, driverDesc, 256)) { - verbose(1, "[GEM:videoVFW] driver '%s'", driverName); + logpost(0, 3+1, "[GEM:videoVFW] driver '%s'", driverName); } @@ -96,19 +96,19 @@ bool videoVFW :: openDevice(gem::Properties&props) 0, 0, m_width, m_height,// window position and dimensions GetDesktopWindow(), 0); if (!m_hWndC) { - verbose(0, "[GEM:videoVFW] Unable to create capture window"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to create capture window"); return false; } if (!capDriverConnect(m_hWndC, 0)) { - verbose(0, "[GEM:videoVFW] Unable to connect to video driver"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to connect to video driver"); closeDevice(); return false; } CAPTUREPARMS params; if (!capCaptureGetSetup(m_hWndC, ¶ms, sizeof(CAPTUREPARMS))) { - verbose(0, "[GEM:videoVFW] Unable to get capture parameters"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to get capture parameters"); closeDevice(); return false; } @@ -122,25 +122,25 @@ bool videoVFW :: openDevice(gem::Properties&props) params.fAbortLeftMouse = FALSE; params.fAbortRightMouse = FALSE; if (!capCaptureSetSetup(m_hWndC, ¶ms, sizeof(CAPTUREPARMS))) { - verbose(0, "[GEM:videoVFW] Unable to set capture parameters"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to set capture parameters"); closeDevice(); return false; } if (!capSetCallbackOnVideoStream(m_hWndC, videoVFW::videoFrameCallback)) { - verbose(0, "[GEM:videoVFW] Unable to set frame callback"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to set frame callback"); closeDevice(); return false; } if (!capSetUserData(m_hWndC, this)) { - verbose(0, "[GEM:videoVFW] Unable to set user data"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to set user data"); closeDevice(); return false; } DWORD formSize = capGetVideoFormat(m_hWndC, NULL, 0); BITMAPINFO *videoFormat = (BITMAPINFO *)(new char[formSize]); if (!capGetVideoFormat(m_hWndC, videoFormat, formSize)) { - verbose(0, "[GEM:videoVFW] Unable to get video format"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to get video format"); closeDevice(); return false; } @@ -153,7 +153,7 @@ bool videoVFW :: openDevice(gem::Properties&props) videoFormat->bmiHeader.biClrImportant = 0; videoFormat->bmiHeader.biSizeImage = 0; if (!capSetVideoFormat(m_hWndC, videoFormat, formSize)) { - verbose(0, "[GEM:videoVFW] Unable to set video format"); + logpost(0, 3+0, "[GEM:videoVFW] Unable to set video format"); delete[]videoFormat; closeDevice(); return false; @@ -164,7 +164,7 @@ bool videoVFW :: openDevice(gem::Properties&props) m_width=static_cast(videoFormat->bmiHeader.biWidth); m_height=static_cast(videoFormat->bmiHeader.biHeight); - verbose(1, "[GEM:videoVFW] Connected with %dx%d @ %d", + logpost(0, 3+1, "[GEM:videoVFW] Connected with %dx%d @ %d", m_width, m_height, static_cast(videoFormat->bmiHeader.biBitCount)); @@ -172,7 +172,7 @@ bool videoVFW :: openDevice(gem::Properties&props) m_image.image.xsize = m_width; m_image.image.ysize = m_height; - m_image.image.setCsizeByFormat(GEM_RGBA); + m_image.image.setFormat(GEM_RGBA); m_image.image.reallocate(); m_image.image.setBlack(); @@ -259,7 +259,7 @@ bool videoVFW :: stopTransfer(void) bool videoVFW :: setColor(int format) { if(format) { - m_image.image.setCsizeByFormat(format); + m_image.image.setFormat(format); } return true; } diff --git a/plugins/VIDS/videoVIDS.cpp b/plugins/VIDS/videoVIDS.cpp index a3bfa1ec5..355a32f02 100644 --- a/plugins/VIDS/videoVIDS.cpp +++ b/plugins/VIDS/videoVIDS.cpp @@ -139,7 +139,7 @@ static inline void getVideoFilter(videoInput&vi, int device, return; } double d=((double)(cur-min))/((double)(max-min)); - verbose(1, "[GEM::videoVIDS] gotFilterSetting '%s' to %f (%d in %d..%d)", + logpost(0, 3+1, "[GEM::videoVIDS] gotFilterSetting '%s' to %f (%d in %d..%d)", propName.c_str(), d, (int)cur, (int)min, (int)max); props.set(propName, d); } @@ -164,7 +164,7 @@ static inline void getVideoCamera(videoInput&vi, int device, return; } double d=((double)(cur-min))/((double)(max-min)); - verbose(1, "[GEM::videoVIDS] gotCameraSetting '%s' to %f (%d in %d..%d)\n", + logpost(0, 3+1, "[GEM::videoVIDS] gotCameraSetting '%s' to %f (%d in %d..%d)\n", propName.c_str(), d, (int)cur, (int)min, (int)max); props.set(propName, d); } @@ -226,7 +226,7 @@ bool videoVIDS::enumProperties(gem::Properties&readable, void videoVIDS::setProperties(gem::Properties&props) { if(trySetProperties(props, true)) { - verbose(1, "[GEM::videoVIDS] needs restart"); + logpost(0, 3+1, "[GEM::videoVIDS] needs restart"); if(m_vi) { stop(); start(); @@ -483,7 +483,7 @@ pixBlock*videoVIDS::getFrame(void) unsigned char*data=m_pixBlock.image.data; m_pixBlock.image.xsize=m_width; m_pixBlock.image.ysize=m_height; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); m_pixBlock.newimage=(data==m_pixBlock.image.data); diff --git a/plugins/VLC/videoVLC.cpp b/plugins/VLC/videoVLC.cpp index 6256a1000..d262a3791 100644 --- a/plugins/VLC/videoVLC.cpp +++ b/plugins/VLC/videoVLC.cpp @@ -117,8 +117,7 @@ bool videoVLC::open(gem::Properties&props) std::vectorkeys=props.keys(); - unsigned int i; - for(i=0; ikeys=props.keys(); double d; - int i; - for(i=0; ikeys=props.keys(); - unsigned int i; - for(i=0; ibitsPerPixel/8; int row_stride=client->width*bpp; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.xsize=client->width; m_pixBlock.image.ysize=client->height; m_pixBlock.image.reallocate(); diff --git a/plugins/filmAVF/Makefile.am b/plugins/filmAVF/Makefile.am index 543bfdfec..3a5b24bcd 100644 --- a/plugins/filmAVF/Makefile.am +++ b/plugins/filmAVF/Makefile.am @@ -1,6 +1,7 @@ ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4 AM_CPPFLAGS = -I$(top_srcdir)/src $(GEM_EXTERNAL_CPPFLAGS) +AM_LIBTOOLFLAGS = --tag=CXX EXTRA_DIST = diff --git a/plugins/filmAVF/filmAVF.mm b/plugins/filmAVF/filmAVF.mm index 475b4fc10..74ddfe38b 100644 --- a/plugins/filmAVF/filmAVF.mm +++ b/plugins/filmAVF/filmAVF.mm @@ -41,7 +41,7 @@ { close(); // default values m_wantedFormat = FILMAVF_DEFAULT_PIXELFORMAT; - m_image.image.setCsizeByFormat(m_wantedFormat); + m_image.image.setFormat(m_wantedFormat); } ///////////////////////////////////////////////////////// @@ -297,7 +297,7 @@ } } m_image.image.format = m_wantedFormat; - m_image.image.setCsizeByFormat(); + m_image.image.setFormat(); if(m_image.image.data) { m_image.image.reallocate(); } else { diff --git a/plugins/filmDS/filmDS.cpp b/plugins/filmDS/filmDS.cpp index bc0da737c..1ca3d77ae 100644 --- a/plugins/filmDS/filmDS.cpp +++ b/plugins/filmDS/filmDS.cpp @@ -561,7 +561,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB mt.subtype = MEDIASUBTYPE_RGB32; break; default: - verbose(1, + logpost(0, 3+1, "[GEM:videoDS] Trying to set unsupported format this is an internal bug, using default RGBA"); mt.subtype = MEDIASUBTYPE_RGB32; } @@ -586,7 +586,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB //Set Params - One Shot should be false unless you want to capture just one buffer hr = m_pGrabber->SetOneShot(FALSE); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] unable to set one shot"); + logpost(0, 3+1, "[GEM:videoDS] unable to set one shot"); tearDown(); return false; } @@ -594,7 +594,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB //apparently setting to TRUE causes a small memory leak hr = m_pGrabber->SetBufferSamples(FALSE); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] unable to set buffer samples"); + logpost(0, 3+1, "[GEM:videoDS] unable to set buffer samples"); tearDown(); return false; } @@ -604,14 +604,14 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB hr = CoCreateInstance(CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)(&m_pNullRenderer)); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] null renderer error"); + logpost(0, 3+1, "[GEM:videoDS] null renderer error"); tearDown(); return false; } hr = m_pGraph->AddFilter(m_pNullRenderer, L"Render"); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] unable to add null renderer"); + logpost(0, 3+1, "[GEM:videoDS] unable to add null renderer"); tearDown(); return false; } @@ -621,7 +621,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB hr = m_pGrabber->GetConnectedMediaType(&mt); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] unable to call GetConnectedMediaType"); + logpost(0, 3+1, "[GEM:videoDS] unable to call GetConnectedMediaType"); tearDown(); return false; } @@ -632,7 +632,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB averageTimePerFrame = infoheader->AvgTimePerFrame / 10000000.0; pix.image.xsize = width; pix.image.ysize = height; - pix.image.setCsizeByFormat(pixelFormat); + pix.image.setFormat(pixelFormat); pix.image.reallocate(); //we need to manually change the output from the renderer window to the null renderer @@ -642,7 +642,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB hr = m_pGraph->FindFilterByName(L"Video Renderer", &m_pVideoRenderer); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] failed to find the video renderer"); + logpost(0, 3+1, "[GEM:videoDS] failed to find the video renderer"); tearDown(); return false; } @@ -650,14 +650,14 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB //we disconnect the video renderer window by finding the output pin of the sample grabber hr = m_pGrabberF->FindPin(L"Out", &pinOut); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] failed to find the sample grabber output pin"); + logpost(0, 3+1, "[GEM:videoDS] failed to find the sample grabber output pin"); tearDown(); return false; } hr = pinOut->Disconnect(); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] failed to disconnect grabber output pin"); + logpost(0, 3+1, "[GEM:videoDS] failed to disconnect grabber output pin"); tearDown(); return false; } @@ -665,7 +665,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB //we have to remove it as well otherwise the graph builder will reconnect it hr = m_pGraph->RemoveFilter(m_pVideoRenderer); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] failed to remove the default renderer"); + logpost(0, 3+1, "[GEM:videoDS] failed to remove the default renderer"); tearDown(); return false; } else { @@ -675,7 +675,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB //now connect the null renderer to the grabber output, if we don't do this not frames will be captured hr = m_pNullRenderer->FindPin(L"In", &pinIn); if (FAILED(hr)) { - verbose(1, + logpost(0, 3+1, "[GEM:videoDS] failed to find the input pin of the null renderer"); tearDown(); return false; @@ -683,7 +683,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB hr = pinOut->Connect(pinIn, NULL); if (FAILED(hr)) { - verbose(1, "[GEM:videoDS] failed to connect the null renderer"); + logpost(0, 3+1, "[GEM:videoDS] failed to connect the null renderer"); tearDown(); return false; } @@ -703,13 +703,13 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB if( FAILED(hr) || width == 0 || height == 0 ) { tearDown(); - verbose(1, + logpost(0, 3+1, "[GEM:videoDS] Error occurred while playing or pausing or opening the file"); return false; } } else { tearDown(); - verbose(1, + logpost(0, 3+1, "[GEM:videoDS] Error occurred while playing or pausing or opening the file"); return false; } @@ -1036,7 +1036,7 @@ class gem::plugins::filmDS::DirectShowVideo : public ISampleGrabberCB if(pix.image.xsize != getWidth() || pix.image.ysize != getHeight()) { pix.image.xsize = getWidth(); pix.image.ysize = getHeight(); - pix.image.setCsizeByFormat(GEM_RGBA); + pix.image.setFormat(GEM_RGBA); pix.image.reallocate(); pix.newfilm = true; } diff --git a/plugins/filmDSATL/filmDS.cpp b/plugins/filmDSATL/filmDS.cpp index a27c3bfd3..146008278 100644 --- a/plugins/filmDSATL/filmDS.cpp +++ b/plugins/filmDSATL/filmDS.cpp @@ -245,7 +245,7 @@ bool filmDS :: open(const std::string&filename, BOOL bFrameTime = TRUE; GUID Guid; - verbose(1, "Trying DirectShow"); + logpost(0, 3+1, "Trying DirectShow"); // Convert c-string to Wide string. memset(&WideFileName, 0, MAXPDSTRING * 2); @@ -253,7 +253,7 @@ bool filmDS :: open(const std::string&filename, if (0 == MultiByteToWideChar(CP_ACP, 0, filename.c_str(), filename.length(), WideFileName, MAXPDSTRING)) { - verbose(0, "[GEM:filmDS:legacy]Unable to load %s", filename.c_str()); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to load %s", filename.c_str()); return false; } @@ -262,7 +262,7 @@ bool filmDS :: open(const std::string&filename, &VideoFilter); if (RetVal != S_OK || NULL == VideoFilter) { - verbose(0, "[GEM:filmDS:legacy]Unable to render %s", filename.c_str()); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to render %s", filename.c_str()); return false; } @@ -273,7 +273,7 @@ bool filmDS :: open(const std::string&filename, IID_IBaseFilter, (void**)&SampleFilter); if (RetVal != S_OK || NULL == SampleFilter) { - verbose(0, "[GEM:filmDS:legacy]Unable to create SampleFilter interface %d", + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to create SampleFilter interface %d", RetVal); return false; } @@ -282,7 +282,7 @@ bool filmDS :: open(const std::string&filename, RetVal = FilterGraph->AddFilter(SampleFilter, L"Sample Grabber"); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to add SampleFilter %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to add SampleFilter %d", RetVal); return false; } @@ -294,7 +294,7 @@ bool filmDS :: open(const std::string&filename, (void **)&SampleGrabber); if (RetVal != S_OK || NULL == SampleGrabber) { - verbose(0, + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to create SampleGrabber interface %d", RetVal); return false; } @@ -316,7 +316,7 @@ bool filmDS :: open(const std::string&filename, RetVal = SampleGrabber->SetOneShot(FALSE); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to setup sample grabber %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to setup sample grabber %d", RetVal); return false; } @@ -325,7 +325,7 @@ bool filmDS :: open(const std::string&filename, RetVal = SampleGrabber->SetBufferSamples(TRUE); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to setup sample grabber %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to setup sample grabber %d", RetVal); return false; } @@ -336,7 +336,7 @@ bool filmDS :: open(const std::string&filename, IID_IBaseFilter, (void**)&NullFilter); if (RetVal != S_OK || NULL == NullFilter) { - verbose(0, "[GEM:filmDS:legacy]Unable to create NullFilter interface %d", + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to create NullFilter interface %d", RetVal); return false; } @@ -345,7 +345,7 @@ bool filmDS :: open(const std::string&filename, RetVal = FilterGraph->AddFilter(NullFilter, L"NullRenderer"); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to add NullFilter %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to add NullFilter %d", RetVal); return false; } @@ -357,7 +357,7 @@ bool filmDS :: open(const std::string&filename, RetVal = filmConnectFilters(FilterGraph, VideoFilter, SampleFilter); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to connect filters %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to connect filters %d", RetVal); return false; } @@ -365,7 +365,7 @@ bool filmDS :: open(const std::string&filename, RetVal = filmConnectFilters(FilterGraph, SampleFilter, NullFilter); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to connect filters %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to connect filters %d", RetVal); return false; } @@ -383,7 +383,7 @@ bool filmDS :: open(const std::string&filename, RetVal = MediaSeeking->SetTimeFormat(&Guid); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to set video time format %d", + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to set video time format %d", RetVal); return false; } @@ -394,7 +394,7 @@ bool filmDS :: open(const std::string&filename, RetVal = MediaSeeking->GetDuration(&m_Duration); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to get video duration %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to get video duration %d", RetVal); return false; } @@ -420,7 +420,7 @@ bool filmDS :: open(const std::string&filename, RetVal = SampleGrabber->GetConnectedMediaType(&MediaType); if (RetVal != S_OK) { - verbose(0, "[GEM:filmDS:legacy]Unable to get media type %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to get media type %d", RetVal); return false; } @@ -438,7 +438,7 @@ bool filmDS :: open(const std::string&filename, } else { - verbose(0, "[GEM:filmDS:legacy]Invalid media type returned %s", + logpost(0, 3+0, "[GEM:filmDS:legacy]Invalid media type returned %s", filename.c_str()); return false; } @@ -452,7 +452,7 @@ bool filmDS :: open(const std::string&filename, m_frame = new BYTE[m_xsize * m_ysize * m_csize]; if (NULL == m_frame) { - verbose(0, + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to allocate memory for the video buffer %s", filename.c_str()); return false; @@ -490,14 +490,14 @@ bool filmDS :: open(const std::string&filename, // this is a guess at the fast past for pixels on Windows m_image.image.xsize = m_xsize; m_image.image.ysize = m_ysize; - m_image.image.setCsizeByFormat((m_csize==3)?GEM_RAW_BGR:GEM_RAW_BGRA); + m_image.image.setFormat((m_csize==3)?GEM_RAW_BGR:GEM_RAW_BGRA); m_image.image.upsidedown=false; // Start the video stream RetVal = MediaControl->Run(); if (RetVal != S_OK && RetVal != S_FALSE) { - verbose(0, "[GEM:filmDS:legacy]Unable to start video %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to start video %d", RetVal); return false; } @@ -509,7 +509,7 @@ bool filmDS :: open(const std::string&filename, RetVal = MediaControl->GetState(0, &FilterState); if (RetVal != S_OK && RetVal != VFW_S_STATE_INTERMEDIATE) { - verbose(0, "[GEM:filmDS:legacy]Unable to run video %d", RetVal); + logpost(0, 3+0, "[GEM:filmDS:legacy]Unable to run video %d", RetVal); return false; } @@ -529,7 +529,7 @@ bool filmDS :: open(const std::string&filename, #ifdef REGISTER_FILTERGRAPH if (FAILED(RetVal = filmAddGraphToRot(FilterGraph, &m_GraphRegister))) { - verbose(0, + logpost(0, 3+0, "[GEM:filmDS:legacy]failed to register filter graph with ROT! hr=0x%X", RetVal); m_GraphRegister = 0; @@ -697,8 +697,7 @@ void filmDS::setProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i(movieScale)/m_fps; } - verbose(1, "[GEM:filmDarwin] %d frames @ %f", (int)m_numFrames, + logpost(0, 3+1, "[GEM:filmDarwin] %d frames @ %f", (int)m_numFrames, (float)m_durationf); // Get the bounds for the movie @@ -190,11 +190,11 @@ bool filmDarwin :: open(const std::string&filename, SetMovieBox(m_movie, &m_srcRect); m_image.image.xsize = m_srcRect.right - m_srcRect.left; m_image.image.ysize = m_srcRect.bottom - m_srcRect.top; - verbose(1, "[GEM:filmDarwin] rect rt:%d lt:%d", m_srcRect.right, + logpost(0, 3+1, "[GEM:filmDarwin] rect rt:%d lt:%d", m_srcRect.right, m_srcRect.left); - verbose(1, "[GEM:filmDarwin] rect top:%d bottom:%d", m_srcRect.top, + logpost(0, 3+1, "[GEM:filmDarwin] rect top:%d bottom:%d", m_srcRect.top, m_srcRect.bottom); - verbose(1, "[GEM:filmDarwin] movie size x:%d y:%d", m_image.image.xsize, + logpost(0, 3+1, "[GEM:filmDarwin] movie size x:%d y:%d", m_image.image.xsize, m_image.image.ysize); switch(m_wantedFormat) { @@ -210,7 +210,7 @@ bool filmDarwin :: open(const std::string&filename, pixelformat=k32ARGBPixelFormat; break; } - m_image.image.setCsizeByFormat(); + m_image.image.setFormat(); m_image.image.data = new unsigned char [m_image.image.xsize*m_image.image.ysize*m_image.image.csize]; @@ -225,7 +225,7 @@ bool filmDarwin :: open(const std::string&filename, m_image.image.data, m_rowBytes); if (err) { - verbose(0, "[GEM:filmDarwin] Couldn't make QTNewGWorldFromPtr %d", err); + logpost(0, 3+0, "[GEM:filmDarwin] Couldn't make QTNewGWorldFromPtr %d", err); goto unsupported; } m_movieTime = 0; @@ -385,8 +385,7 @@ void filmDarwin::getProperties(gem::Properties&props) std::vector keys=props.keys(); gem::any value; double d; - unsigned int i=0; - for(i=0; i(image->columns); result.ysize=static_cast(image->rows); - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); result.reallocate(); result.upsidedown=true; diff --git a/plugins/imageMAGICK/MagickPlusPlus.cpp b/plugins/imageMAGICK/MagickPlusPlus.cpp index cc218c42f..c3fa1ae7d 100644 --- a/plugins/imageMAGICK/MagickPlusPlus.cpp +++ b/plugins/imageMAGICK/MagickPlusPlus.cpp @@ -43,12 +43,12 @@ bool imageMAGICK :: load(std::string filename, imageStruct&result, image.read( filename ); image.autoOrient(); } catch (Magick::Warning&e) { - verbose(0, "[GEM:imageMAGICK] loading problem: %s", e.what()); + logpost(0, 3+0, "[GEM:imageMAGICK] loading problem: %s", e.what()); } result.xsize=static_cast(image.columns()); result.ysize=static_cast(image.rows()); - result.setCsizeByFormat(GEM_RGBA); + result.setFormat(GEM_RGBA); result.reallocate(); result.upsidedown=true; @@ -63,10 +63,10 @@ bool imageMAGICK :: load(std::string filename, imageStruct&result, Magick::CharPixel, reinterpret_cast(result.data)); } catch (Magick::Warning&e) { - verbose(0, "[GEM:imageMAGICK] decoding problem: %s", e.what()); + logpost(0, 3+0, "[GEM:imageMAGICK] decoding problem: %s", e.what()); } } catch (Magick::Exception&e) { - verbose(0, "[GEM:imageMAGICK] loading image failed with: %s", e.what()); + logpost(0, 3+0, "[GEM:imageMAGICK] loading image failed with: %s", e.what()); return false; } return true; @@ -123,18 +123,18 @@ bool imageMAGICK::save(const imageStruct&image, const std::string&filename, // finally convert and export mimage.write(filename); } catch (Magick::Warning&e) { - verbose(0, "[GEM:imageMAGICK] saving problem: %s", e.what()); + logpost(0, 3+0, "[GEM:imageMAGICK] saving problem: %s", e.what()); } } catch (Magick::Exception&e) { - verbose(0, "[GEM:imageMAGICK] %s", e.what()); + logpost(0, 3+0, "[GEM:imageMAGICK] %s", e.what()); if(pImage!=&image) { delete pImage; } pImage=NULL; return false; } catch (...) { - verbose(0, "[GEM:imageMAGICK] uncaught exception!"); + logpost(0, 3+0, "[GEM:imageMAGICK] uncaught exception!"); return false; } if(pImage!=&image) { diff --git a/plugins/imageMAGICK/Makefile.am b/plugins/imageMAGICK/Makefile.am index eee608a97..0b6103fe7 100644 --- a/plugins/imageMAGICK/Makefile.am +++ b/plugins/imageMAGICK/Makefile.am @@ -8,11 +8,16 @@ EXTRA_DIST += win-vs2008/imageMAGICK.sln win-vs2008/imageMAGICK.vcproj EXTRA_DIST += win-vs2008/ImageMagick_Release.vsprops win-vs2008/ImageMagick.vsprops pkglib_LTLIBRARIES= +gemhelpdir=$(pkglibdir) +dist_gemhelp_DATA = + if HAVE_LIB_IMAGEMAGICK__ pkglib_LTLIBRARIES+= gem_imageMAGICK.la +dist_gemhelp_DATA += magick-imageloaderplugin.pd magick-imagesaverplugin.pd else if HAVE_LIB_MAGICKCORE pkglib_LTLIBRARIES+= gem_imageMAGICK.la +dist_gemhelp_DATA += magick-imageloaderplugin.pd magick-imagesaverplugin.pd endif endif diff --git a/plugins/imageMAGICK/imageMAGICK.cpp b/plugins/imageMAGICK/imageMAGICK.cpp index f48b7d42c..8e542fc50 100644 --- a/plugins/imageMAGICK/imageMAGICK.cpp +++ b/plugins/imageMAGICK/imageMAGICK.cpp @@ -140,8 +140,7 @@ imageMAGICK :: imageMAGICK(void) DestroyExceptionInfo(exception); - unsigned int i; - for(i=0; i= framerate) ) { - verbose(1, + logpost(0, 3+1, "[GEM:videoAVF] found good framerate range %f .. %f for request %d", range.minFrameRate, range.maxFrameRate, framerate); desiredRange = range; @@ -183,10 +183,10 @@ - (BOOL)initCapture:(int)framerate device.activeVideoMinFrameDuration = desiredRange.minFrameDuration; device.activeVideoMaxFrameDuration = desiredRange.maxFrameDuration; } else { - verbose(1, "[GEM:videoAVF] could not set framerate to %d. Device supports", + logpost(0, 3+1, "[GEM:videoAVF] could not set framerate to %d. Device supports", framerate); for(AVFrameRateRange * range in supportedFrameRates) { - verbose(1, "\t%f .. %f", range.minFrameRate, range.maxFrameRate); + logpost(0, 3+1, "\t%f .. %f", range.minFrameRate, range.maxFrameRate); } } } @@ -315,7 +315,7 @@ -(void)stopCapture int i=0; for (AVCaptureDevice * captureDevice in devices) { deviceNames.push_back([captureDevice.localizedName UTF8String]); - verbose(0, "[GEM:videoAVF] device #%d: %s", i, deviceNames.back().c_str()); + logpost(0, 3+0, "[GEM:videoAVF] device #%d: %s", i, deviceNames.back().c_str()); i++; } return deviceNames; @@ -357,7 +357,7 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput pixes.image.xsize = widthIn; pixes.image.ysize = heightIn; - pixes.image.setCsizeByFormat(glformat); + pixes.image.setFormat(glformat); pixes.image.reallocate(); switch(capformat) { diff --git a/plugins/videoAVF/Makefile.am b/plugins/videoAVF/Makefile.am index 17da97486..eaca79279 100644 --- a/plugins/videoAVF/Makefile.am +++ b/plugins/videoAVF/Makefile.am @@ -1,6 +1,7 @@ ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4 AM_CPPFLAGS = -I$(top_srcdir)/src $(GEM_EXTERNAL_CPPFLAGS) +AM_LIBTOOLFLAGS = --tag=CXX EXTRA_DIST = diff --git a/plugins/videoDS/videoDS.cpp b/plugins/videoDS/videoDS.cpp index c7a348255..0b52a294e 100644 --- a/plugins/videoDS/videoDS.cpp +++ b/plugins/videoDS/videoDS.cpp @@ -99,7 +99,7 @@ videoDS :: videoDS(void) for (int i = 0; i <= 2; i++) { m_pixBlockBuf[i].image.xsize=m_width; m_pixBlockBuf[i].image.ysize=m_height; - m_pixBlockBuf[i].image.setCsizeByFormat(GEM_RGBA); + m_pixBlockBuf[i].image.setFormat(GEM_RGBA); m_pixBlockBuf[i].image.reallocate(); m_pixBlockBuf[i].newimage = 0; @@ -111,7 +111,7 @@ videoDS :: videoDS(void) m_image.image.xsize=m_width; m_image.image.ysize=m_height; - m_image.image.setCsizeByFormat(GEM_RGBA); + m_image.image.setFormat(GEM_RGBA); m_image.image.reallocate(); #ifdef USE_RECORDING @@ -156,7 +156,7 @@ bool videoDS :: openDevice(gem::Properties&props) // Get the interface for DirectShow's GraphBuilder if (FAILED(hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&m_pGB))) { - verbose(0, "[GEM:videoDS] Could not get DShow GraphBuilder, hr 0x%X", hr); + logpost(0, 3+0, "[GEM:videoDS] Could not get DShow GraphBuilder, hr 0x%X", hr); break; } @@ -174,13 +174,13 @@ bool videoDS :: openDevice(gem::Properties&props) if ( FAILED(hr = (CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2, (void **)&m_pCG))) || FAILED(hr = m_pCG->SetFiltergraph(m_pGB))) { - verbose(0, "[GEM:videoDS] Could not get DShow GraphBuilder, hr 0x%X", hr); + logpost(0, 3+0, "[GEM:videoDS] Could not get DShow GraphBuilder, hr 0x%X", hr); break; } // Create the capture device. if (FAILED(hr = FindCaptureDevice(device, &m_pCDbase))) { - verbose(0, "[GEM:videoDS] Could not open device: %d\n", device); + logpost(0, 3+0, "[GEM:videoDS] Could not open device: %d\n", device); break; } @@ -189,7 +189,7 @@ bool videoDS :: openDevice(gem::Properties&props) IID_IBaseFilter, (void**)&SampleFilter); if (hr != S_OK || NULL == SampleFilter) { - verbose(0, "[GEM:videoDS] Unable to create SampleFilter interface %d", hr); + logpost(0, 3+0, "[GEM:videoDS] Unable to create SampleFilter interface %d", hr); return false; } @@ -199,7 +199,7 @@ bool videoDS :: openDevice(gem::Properties&props) (void **)&SampleGrabber); if (hr != S_OK || NULL == SampleGrabber) { - verbose(0, "[GEM:videoDS] Unable to create SampleGrabber interface %d", + logpost(0, 3+0, "[GEM:videoDS] Unable to create SampleGrabber interface %d", hr); return false; } @@ -218,7 +218,7 @@ bool videoDS :: openDevice(gem::Properties&props) hr = SampleGrabber->SetOneShot(FALSE); if (hr != S_OK) { - verbose(0, "[GEM:videoDS] Unable to setup sample grabber %d", hr); + logpost(0, 3+0, "[GEM:videoDS] Unable to setup sample grabber %d", hr); return false; } @@ -227,7 +227,7 @@ bool videoDS :: openDevice(gem::Properties&props) hr = SampleGrabber->SetBufferSamples(TRUE); if (hr != S_OK) { - verbose(0, "[GEM:videoDS] Unable to setup sample grabber %d", hr); + logpost(0, 3+0, "[GEM:videoDS] Unable to setup sample grabber %d", hr); return false; } @@ -236,7 +236,7 @@ bool videoDS :: openDevice(gem::Properties&props) IID_IBaseFilter, (void**)&NullFilter); if (hr != S_OK || NULL == NullFilter) { - verbose(0, "[GEM:videoDS] Unable to create NullFilter interface %d", hr); + logpost(0, 3+0, "[GEM:videoDS] Unable to create NullFilter interface %d", hr); return false; } @@ -244,7 +244,7 @@ bool videoDS :: openDevice(gem::Properties&props) if (FAILED(hr = m_pGB->AddFilter(m_pCDbase, L"Capture Device")) || FAILED(hr = m_pGB->AddFilter(SampleFilter, L"Sample Grabber")) || FAILED(hr = m_pGB->AddFilter(NullFilter, L"Null Renderer"))) { - verbose(0, "[GEM:videoDS] Could not add the filters to the graph, hr 0x%X", + logpost(0, 3+0, "[GEM:videoDS] Could not add the filters to the graph, hr 0x%X", hr); break; } @@ -259,7 +259,7 @@ bool videoDS :: openDevice(gem::Properties&props) if (FAILED(hr = m_pCG->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, m_pCDbase, SampleFilter, NullFilter))) { - verbose(0, "[GEM:videoDS] Unable to connect to SampleGrabber."); + logpost(0, 3+0, "[GEM:videoDS] Unable to connect to SampleGrabber."); return false; } } @@ -267,7 +267,7 @@ bool videoDS :: openDevice(gem::Properties&props) // QueryInterface for DirectShow interfaces if (FAILED(hr = (m_pGB->QueryInterface(IID_IMediaFilter, (void **)&m_pMF)))) { - verbose(0, "[GEM:videoDS] Could not get media filter interface, hr 0x%X", + logpost(0, 3+0, "[GEM:videoDS] Could not get media filter interface, hr 0x%X", hr); break; } @@ -275,7 +275,7 @@ bool videoDS :: openDevice(gem::Properties&props) //MediaControl is used for Run, Stop, Pause and running state queries if (FAILED(hr = (m_pGB->QueryInterface(IID_IMediaControl, (void **)&m_pMC)))) { - verbose(0, "[GEM:videoDS] Could not get media control interface, hr 0x%X", + logpost(0, 3+0, "[GEM:videoDS] Could not get media control interface, hr 0x%X", hr); break; } @@ -283,7 +283,7 @@ bool videoDS :: openDevice(gem::Properties&props) //not used right now if (FAILED(hr = (m_pGB->QueryInterface(IID_IMediaEvent, (void **)&m_pME)))) { - verbose(0, "[GEM:videoDS] Could not get media event interface, hr 0x%X", + logpost(0, 3+0, "[GEM:videoDS] Could not get media event interface, hr 0x%X", hr); break; } @@ -291,7 +291,7 @@ bool videoDS :: openDevice(gem::Properties&props) //MediaSeeking for the end of a clip. not really used here if (FAILED(hr = (m_pGB->QueryInterface(IID_IMediaSeeking, (void **)&m_pMS)))) { - verbose(0, "[GEM:videoDS] Could not get media seeking interface, hr 0x%X", + logpost(0, 3+0, "[GEM:videoDS] Could not get media seeking interface, hr 0x%X", hr); break; } @@ -299,7 +299,7 @@ bool videoDS :: openDevice(gem::Properties&props) //for the position of a clip. not really used for device capture if (FAILED(hr = (m_pGB->QueryInterface(IID_IMediaPosition, (void **)&m_pMP)))) { - verbose(0, "[GEM:videoDS] Could not get media position interface, hr 0x%X", + logpost(0, 3+0, "[GEM:videoDS] Could not get media position interface, hr 0x%X", hr); break; } @@ -307,7 +307,7 @@ bool videoDS :: openDevice(gem::Properties&props) // Expose the filter graph so we can view it using GraphEdit #ifdef REGISTER_FILTERGRAPH if (FAILED(hr = AddGraphToRot(m_pGB, &m_GraphRegister))) { - verbose(0, + logpost(0, 3+0, "[GEM:videoDS] failed to register filter graph with ROT! hr=0x%X", hr); m_GraphRegister = 0; } @@ -316,7 +316,7 @@ bool videoDS :: openDevice(gem::Properties&props) // Turn off the reference clock. // if (FAILED(hr = m_pMF->SetSyncSource(NULL))) // { - // verbose(0, "[GEM:videoDS] failed to turn off the reference clock hr=0x%X", hr); + // logpost(0, 3+0, "[GEM:videoDS] failed to turn off the reference clock hr=0x%X", hr); // break; // } @@ -395,7 +395,7 @@ std::vectorvideoDS :: enumerate(void) hr = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, IID_ICreateDevEnum, (void ** ) &pDevEnum); if (FAILED(hr)) { - verbose(0, "[GEM:videoDS] Couldn't create system enumerator!"); + logpost(0, 3+0, "[GEM:videoDS] Couldn't create system enumerator!"); break; } @@ -403,14 +403,14 @@ std::vectorvideoDS :: enumerate(void) hr = pDevEnum->CreateClassEnumerator (CLSID_VideoInputDeviceCategory, &pClassEnum, 0); if (FAILED(hr)) { - verbose(0, "[GEM:videoDS] Couldn't create class enumerator!"); + logpost(0, 3+0, "[GEM:videoDS] Couldn't create class enumerator!"); break; } // If there are no enumerators for the requested type, then // CreateClassEnumerator will succeed, but pClassEnum will be NULL. if (pClassEnum == NULL) { - verbose(0, "[GEM:videoDS] No video capture devices found!"); + logpost(0, 3+0, "[GEM:videoDS] No video capture devices found!"); break; } @@ -517,7 +517,7 @@ void videoDS :: copyBuffer(void) m_pixBlockBuf[m_writeIdx].image.xsize = m_width; m_pixBlockBuf[m_writeIdx].image.ysize = m_height; - m_pixBlockBuf[m_writeIdx].image.setCsizeByFormat(m_format); + m_pixBlockBuf[m_writeIdx].image.setFormat(m_format); m_pixBlockBuf[m_writeIdx].image.reallocate(); m_pixBlockBuf[m_writeIdx].image.reallocate(SampleSize); m_nPixDataSize[m_writeIdx] = SampleSize; @@ -658,7 +658,7 @@ bool videoDS :: setDimen(int x, int y, int leftmargin, int rightmargin, bool videoDS :: setColor(int format) { if(format) { - m_image.image.setCsizeByFormat(format); + m_image.image.setFormat(format); } return true; } @@ -679,8 +679,7 @@ bool videoDS :: dialog(std::vectordlg) if(dlg.empty()) { SetupCaptureDevice(m_pCG, m_pCDbase); } else { - int i; - for(i=0; iCreateClassEnumerator (CLSID_VideoInputDeviceCategory, &pClassEnum, 0); if (FAILED(hr)) { - verbose(0, "[GEM:videoDS] Couldn't create class enumerator!"); + logpost(0, 3+0, "[GEM:videoDS] Couldn't create class enumerator!"); break; } // If there are no enumerators for the requested type, then // CreateClassEnumerator will succeed, but pClassEnum will be NULL. if (pClassEnum == NULL) { - verbose(0, "[GEM:videoDS] No video capture devices found!"); + logpost(0, 3+0, "[GEM:videoDS] No video capture devices found!"); hr = E_FAIL; break; } @@ -1175,7 +1174,7 @@ FindCaptureDevice(int device, IBaseFilter ** ppSrcFilter) // Bind Moniker to a filter object hr = pMoniker->BindToObject(0,0,IID_IBaseFilter, (void**)&pSrc); if (FAILED(hr)) { - verbose(0, "[GEM:videoDS] Couldn't bind moniker to filter object!"); + logpost(0, 3+0, "[GEM:videoDS] Couldn't bind moniker to filter object!"); } } COMRELEASE(pMoniker); diff --git a/plugins/videoDarwin/videoDarwin.cpp b/plugins/videoDarwin/videoDarwin.cpp index 7cddab0be..4d34385ab 100644 --- a/plugins/videoDarwin/videoDarwin.cpp +++ b/plugins/videoDarwin/videoDarwin.cpp @@ -64,7 +64,7 @@ videoDarwin :: videoDarwin() m_img.xsize = 800; m_img.ysize = 600; - m_img.setCsizeByFormat(GEM_RGBA); + m_img.setFormat(GEM_RGBA); m_img.allocate(); //initSeqGrabber(); @@ -82,13 +82,13 @@ videoDarwin :: ~videoDarwin() close(); if (m_vc) { if (::SGDisposeChannel(m_sg, m_vc)) { - verbose(0, "[GEM:videoDarwin] Unable to dispose a video channel"); + logpost(0, 3+0, "[GEM:videoDarwin] Unable to dispose a video channel"); } m_vc = NULL; } if (m_sg) { if (::CloseComponent(m_sg)) { - verbose(0, + logpost(0, 3+0, "[GEM:videoDarwin] Unable to dispose a sequence grabber component"); } m_sg = NULL; @@ -142,7 +142,7 @@ bool videoDarwin :: grabFrame() m_newFrame = true; } if (!m_haveVideo) { - verbose(0, "[GEM:videoDarwin] no video yet"); + logpost(0, 3+0, "[GEM:videoDarwin] no video yet"); return true; } m_img.copy2Image(&m_image.image); @@ -191,23 +191,23 @@ bool videoDarwin :: initSeqGrabber() m_sg = OpenDefaultComponent(SeqGrabComponentType, 0); if(m_sg==NULL) { - verbose(0, "[GEM:videoDarwin] could not open default component"); + logpost(0, 3+0, "[GEM:videoDarwin] could not open default component"); return false; } anErr = SGInitialize(m_sg); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not initialize SG error %d",anErr); + logpost(0, 3+0, "[GEM:videoDarwin] could not initialize SG error %d",anErr); return false; } anErr = SGSetDataRef(m_sg, 0, 0, seqGrabDontMakeMovie); if (anErr != noErr) { - verbose(0, "[GEM:videoDarwin] dataref failed with error %d",anErr); + logpost(0, 3+0, "[GEM:videoDarwin] dataref failed with error %d",anErr); } anErr = SGNewChannel(m_sg, VideoMediaType, &m_vc); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not make new SG channel error %d", + logpost(0, 3+0, "[GEM:videoDarwin] could not make new SG channel error %d", anErr); return false; } @@ -215,7 +215,7 @@ bool videoDarwin :: initSeqGrabber() enumerate(); anErr = SGGetChannelDeviceList(m_vc, sgDeviceListIncludeInputs, &devices); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not get SG channel Device List"); + logpost(0, 3+0, "[GEM:videoDarwin] could not get SG channel Device List"); } else { deviceCount = (*devices)->count; m_inputDevice = (*devices)->selectedIndex; @@ -225,10 +225,9 @@ bool videoDarwin :: initSeqGrabber() if(m_devicenum>=0) { m_inputDevice=m_devicenum; } else if (!m_devicename.empty()) { - int i; const int maxcount=(deviceCount= 0 && m_inputDevice < deviceCount) {//check that the device is not out of bounds std::string devname=pascal2str((*devices)->entry[m_inputDevice].name); - verbose(1, "[GEM:videoDarwin] SGSetChannelDevice trying[%d] %s", + logpost(0, 3+1, "[GEM:videoDarwin] SGSetChannelDevice trying[%d] %s", m_inputDevice, devname.c_str()); } anErr = SGSetChannelDevice(m_vc, (*devices)->entry[m_inputDevice].name); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] SGSetChannelDevice returned error %d",anErr); + logpost(0, 3+0, "[GEM:videoDarwin] SGSetChannelDevice returned error %d",anErr); } anErr = SGSetChannelDeviceInput(m_vc,m_inputDeviceChannel); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] SGSetChannelDeviceInput returned error %d", + logpost(0, 3+0, "[GEM:videoDarwin] SGSetChannelDeviceInput returned error %d", anErr); } @@ -262,33 +261,33 @@ bool videoDarwin :: initSeqGrabber() Str255 vdigName; memset(vdigName,0,255); vdigErr = VDGetInputName(m_vdig,m_inputDevice,vdigName); - verbose(1, "[GEM:videoDarwin] vdigName is %s", + logpost(0, 3+1, "[GEM:videoDarwin] vdigName is %s", pascal2str(vdigName).c_str()); Rect vdRect; vdigErr = VDGetDigitizerRect(m_vdig,&vdRect); - verbose(1, + logpost(0, 3+1, "[GEM:videoDarwin] digitizer rect is top %d bottom %d left %d right %d", vdRect.top,vdRect.bottom,vdRect.left,vdRect.right); vdigErr = VDGetActiveSrcRect(m_vdig,0,&vdRect); - verbose(1, + logpost(0, 3+1, "[GEM:videoDarwin] active src rect is top %d bottom %d left %d right %d", vdRect.top,vdRect.bottom,vdRect.left,vdRect.right); anErr = SGSetChannelBounds(m_vc, &srcRect); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not set SG ChannelBounds "); + logpost(0, 3+0, "[GEM:videoDarwin] could not set SG ChannelBounds "); } anErr = SGSetVideoRect(m_vc, &srcRect); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not set SG Rect "); + logpost(0, 3+0, "[GEM:videoDarwin] could not set SG Rect "); } anErr = SGSetChannelUsage(m_vc, seqGrabPreview); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not set SG ChannelUsage "); + logpost(0, 3+0, "[GEM:videoDarwin] could not set SG ChannelUsage "); } SGSetChannelPlayFlags(m_vc, m_quality); OSType pixelFormat=0; @@ -296,15 +295,15 @@ bool videoDarwin :: initSeqGrabber() m_img.ysize = m_height; if (m_colorspace==GEM_RGBA) { - m_img.setCsizeByFormat(m_colorspace); + m_img.setFormat(m_colorspace); m_rowBytes = m_width*m_img.csize; pixelFormat=k32ARGBPixelFormat; - verbose(1, "[GEM:videoDarwin] using RGB"); + logpost(0, 3+1, "[GEM:videoDarwin] using RGB"); } else { - m_img.setCsizeByFormat(GEM_YUV); + m_img.setFormat(GEM_YUV); m_rowBytes = m_width*2; pixelFormat=k422YpCbCr8PixelFormat; - verbose(1, "[GEM:videoDarwin] using YUV"); + logpost(0, 3+1, "[GEM:videoDarwin] using YUV"); } m_img.reallocate(); anErr = QTNewGWorldFromPtr (&m_srcGWorld, @@ -317,11 +316,11 @@ bool videoDarwin :: initSeqGrabber() m_rowBytes); if (anErr!= noErr) { - verbose(0, "[GEM:videoDarwin] %d error at QTNewGWorldFromPtr", anErr); + logpost(0, 3+0, "[GEM:videoDarwin] %d error at QTNewGWorldFromPtr", anErr); return false; } if (NULL == m_srcGWorld) { - verbose(0, "[GEM:videoDarwin] could not allocate off screen"); + logpost(0, 3+0, "[GEM:videoDarwin] could not allocate off screen"); return false; } SGSetGWorld(m_sg,(CGrafPtr)m_srcGWorld, NULL); @@ -344,13 +343,13 @@ void videoDarwin :: destroySeqGrabber() { if (m_vc) { if (::SGDisposeChannel(m_sg, m_vc)) { - verbose(0, "[GEM:videoDarwin] Unable to dispose a video channel"); + logpost(0, 3+0, "[GEM:videoDarwin] Unable to dispose a video channel"); } m_vc = NULL; } if (m_sg) { if (::CloseComponent(m_sg)) { - verbose(0, + logpost(0, 3+0, "[GEM:videoDarwin] Unable to dispose a sequence grabber component"); } m_sg = NULL; @@ -364,7 +363,7 @@ void videoDarwin :: destroySeqGrabber() void videoDarwin :: resetSeqGrabber() { OSErr anErr; - verbose(1, "[GEM:videoDarwin] starting reset"); + logpost(0, 3+1, "[GEM:videoDarwin] starting reset"); destroySeqGrabber(); initSeqGrabber(); @@ -538,8 +537,7 @@ bool videoDarwin::applyProperties(gem::Properties&props) } std::vectorkeys=props.keys(); - int i=0; - for(i=0; i videoDarwin::enumerate() anErr = SGGetChannelDeviceList(m_vc, sgDeviceListIncludeInputs, &devices); if(anErr!=noErr) { - verbose(0, "[GEM:videoDarwin] could not get SG channel Device List"); + logpost(0, 3+0, "[GEM:videoDarwin] could not get SG channel Device List"); } else { short deviceCount = (*devices)->count; short deviceIndex = (*devices)->selectedIndex; short inputIndex; - verbose(1, "[GEM:videoDarwin] SG channel Device List count %d index %d", + logpost(0, 3+1, "[GEM:videoDarwin] SG channel Device List count %d index %d", deviceCount,deviceIndex); - int i; m_devices.clear(); - for (i = 0; i < deviceCount; i++) { + for (int i = 0; i < deviceCount; i++) { m_devices.push_back(pascal2str((*devices)->entry[i].name)); - verbose(1, "[GEM:videoDarwin] SG channel Device List[%d] %s", i, + logpost(0, 3+1, "[GEM:videoDarwin] SG channel Device List[%d] %s", i, m_devices[i].c_str()); } SGGetChannelDeviceAndInputNames(m_vc, NULL, NULL, &inputIndex); @@ -723,9 +719,9 @@ std::vector videoDarwin::enumerate() //we should have device names in big ass undocumented structs //walk through the list - for (i = 0; i < inputIndex; i++) { + for (int i = 0; i < inputIndex; i++) { std::string input=pascal2str((*theSGInputList)->entry[i].name); - verbose(1, "[GEM:videoDarwin] SG channel Input Device List %d %s", + logpost(0, 3+1, "[GEM:videoDarwin] SG channel Input Device List %d %s", i, input.c_str()); } } diff --git a/plugins/videoSGI/videoSGI.cpp b/plugins/videoSGI/videoSGI.cpp index cc71e996f..b16d2f937 100644 --- a/plugins/videoSGI/videoSGI.cpp +++ b/plugins/videoSGI/videoSGI.cpp @@ -74,7 +74,7 @@ bool videoSGI :: openDevice() { // Connect to the daemon if ( !(m_svr = vlOpenVideo("")) ) { - verbose(0, "[GEM:videoSGI] Unable to open video"); + logpost(0, 3+0, "[GEM:videoSGI] Unable to open video"); goto cleanup; } // Set up a drain node in memory @@ -89,7 +89,7 @@ bool videoSGI :: openDevice() // Set up the hardware for and define the usage of the path if ( (vlSetupPaths(m_svr, (VLPathList)&m_path, 1, VL_SHARE, VL_SHARE)) < 0 ) { - verbose(0, "[GEM:videoSGI] Unable to setup video path"); + logpost(0, 3+0, "[GEM:videoSGI] Unable to setup video path"); goto cleanup; } @@ -105,10 +105,10 @@ bool videoSGI :: openDevice() // according to vl.h, this is really ABGR (IrisGL format) val.intVal = VL_PACKING_RGBA_8; if ( vlSetControl(m_svr, m_path, m_drn, VL_PACKING, &val) ) { - verbose(0, "[GEM:videoSGI] Unable to set the video packing"); + logpost(0, 3+0, "[GEM:videoSGI] Unable to set the video packing"); goto cleanup; } - verbose(1, "[GEM:videoSGI] Video has to color swap (ABGR to RGBA)"); + logpost(0, 3+1, "[GEM:videoSGI] Video has to color swap (ABGR to RGBA)"); m_colorSwap = 1; } @@ -121,7 +121,7 @@ bool videoSGI :: openDevice() if ( vlSetControl(m_svr, m_path, m_drn, VL_SIZE, &value) ) { vlGetControl(m_svr, m_path, m_drn, VL_SIZE, &value); - verbose(1, "[GEM:videoSGI] dimen error: wanted %dx%d got %dx%d", m_width, + logpost(0, 3+1, "[GEM:videoSGI] dimen error: wanted %dx%d got %dx%d", m_width, m_height, value.xyVal.x, value.xyVal.y); m_width =value.xyVal.x; m_height=value.xyVal.y; @@ -247,13 +247,13 @@ pixBlock *videoSGI::getFrame(void) ///////////////////////////////////////////////////////// void videoSGI :: offsetMess(int x, int y) { if (!m_haveVideo) { - verbose(1, "[GEM:videoSGI] Connect to video first"); + logpost(0, 3+1, "[GEM:videoSGI] Connect to video first"); return; } // stop the transfer and destroy the buffer if ( !stopTransfer() ) { - verbose(0, "[GEM:videoSGI] error stopping transfer"); + logpost(0, 3+0, "[GEM:videoSGI] error stopping transfer"); return; } @@ -261,14 +261,14 @@ pixBlock *videoSGI::getFrame(void) value.xyVal.x = x; value.xyVal.y = y; if ( vlSetControl(m_svr, m_path, m_drn, VL_OFFSET, &value) ) { - verbose(0, "[GEM:videoSGI] offset error"); + logpost(0, 3+0, "[GEM:videoSGI] offset error"); startTransfer(); return; } // start the transfer and rebuild the buffer if ( !startTransfer() ) { - verbose(0, "[GEM:videoSGI] error starting transfer"); + logpost(0, 3+0, "[GEM:videoSGI] error starting transfer"); return; } } @@ -280,7 +280,7 @@ pixBlock *videoSGI::getFrame(void) ///////////////////////////////////////////////////////// void videoINDY :: zoomMess(int num, int denom) { if (!m_haveVideo) { - verbose(1, "[GEM:videoSGI] Connect to video first"); + logpost(0, 3+1, "[GEM:videoSGI] Connect to video first"); return; } VLControlValue value; @@ -297,7 +297,7 @@ pixBlock *videoSGI::getFrame(void) ///////////////////////////////////////////////////////// void videoINDY :: brightMess(int val) { if (!m_haveVideo) { - verbose(1, "[GEM:videoSGI] Connect to video first"); + logpost(0, 3+1, "[GEM:videoSGI] Connect to video first"); return; } VLControlValue value; @@ -313,7 +313,7 @@ pixBlock *videoSGI::getFrame(void) ///////////////////////////////////////////////////////// void videoINDY :: contrastMess(int val) { if (!m_haveVideo) { - verbose(1, "[GEM:videoSGI] Connect to video first"); + logpost(0, 3+1, "[GEM:videoSGI] Connect to video first"); return; } VLControlValue value; @@ -329,7 +329,7 @@ pixBlock *videoSGI::getFrame(void) ///////////////////////////////////////////////////////// void videoINDY :: hueMess(int val) { if (!m_haveVideo) { - verbose(1, "[GEM:videoSGI] Connect to video first"); + logpost(0, 3+1, "[GEM:videoSGI] Connect to video first"); return; } VLControlValue value; @@ -345,7 +345,7 @@ pixBlock *videoSGI::getFrame(void) ///////////////////////////////////////////////////////// void videoINDY :: satMess(int val) { if (!m_haveVideo) { - verbose(1, "[GEM:videoSGI] Connect to video first"); + logpost(0, 3+1, "[GEM:videoSGI] Connect to video first"); return; } VLControlValue value; @@ -384,7 +384,7 @@ pixBlock *videoSGI::getFrame(void) if ( vlSetControl(m_svr, m_path, m_drn, VL_SIZE, &value) ) { vlGetControl(m_svr, m_path, m_drn, VL_SIZE, &value); - verbose(1, "[GEM:videoSGI] dimen error: wanted %dx%d got %dx%d", m_width, + logpost(0, 3+1, "[GEM:videoSGI] dimen error: wanted %dx%d got %dx%d", m_width, m_height, value.xyVal.x, value.xyVal.y); m_width =value.xyVal.x; m_height=value.xyVal.y; diff --git a/src/Base/CPPExtern.cpp b/src/Base/CPPExtern.cpp index 34261b05d..7e1c347f5 100644 --- a/src/Base/CPPExtern.cpp +++ b/src/Base/CPPExtern.cpp @@ -37,8 +37,33 @@ void *Obj_header::operator new(size_t, void *location, void *) return(location); } -t_object * CPPExtern::m_holder=NULL; -const char* CPPExtern::m_holdname=NULL; +t_object * CPPExtern::s_holder=NULL; +const char* CPPExtern::s_holdname=NULL; + +namespace { + static t_class*s_holdclass = NULL; +}; + +struct CPPExtern::PIMPL { + t_symbol*objectname; + t_canvas*canvas; + t_class*cls; + mutable bool endpost; /* internal state for startpost/post/endpost */ + PIMPL(const char*name) + : objectname(name?gensym(name):gensym("unknown Gem object")) + , canvas(canvas_getcurrent()) + , cls(s_holdclass) + , endpost(true) + { } + PIMPL(PIMPL*p) + : objectname(p->objectname) + , canvas(p->canvas) + , cls(p->cls) + , endpost(true) + { } + +}; + ///////////////////////////////////////////////////////// // @@ -49,24 +74,30 @@ const char* CPPExtern::m_holdname=NULL; // ///////////////////////////////////////////////////////// CPPExtern :: CPPExtern() - : x_obj(m_holder), - m_objectname(NULL), - m_canvas(NULL), - m_endpost(true) + : x_obj(s_holder) + , pimpl(new PIMPL(s_holdname)) { - m_canvas = canvas_getcurrent(); - if(m_holdname) { - m_objectname=gensym(m_holdname); - } else { - m_objectname=gensym("unknown Gem object"); - } + t_symbol*asym = gensym("#A"); + /* bashily unbind #A -- this would create garbage if #A were + multiply bound but we believe in this context it's at most + bound to whichever textobj or array was created most recently */ + asym->s_thing = 0; + /* and now bind #A to us to receive following messages in the + saved file or copy buffer */ + pd_bind(&x_obj->ob_pd, asym); } -CPPExtern :: CPPExtern(const CPPExtern&org) : - x_obj(org.x_obj), - m_objectname(org.m_objectname), - m_canvas(org.m_canvas), - m_endpost(true) +CPPExtern :: CPPExtern(const CPPExtern&org) + : x_obj(org.x_obj) + , pimpl(new PIMPL(org.pimpl)) { + t_symbol*asym = gensym("#A"); + /* bashily unbind #A -- this would create garbage if #A were + multiply bound but we believe in this context it's at most + bound to whichever textobj or array was created most recently */ + asym->s_thing = 0; + /* and now bind #A to us to receive following messages in the + saved file or copy buffer */ + pd_bind(&x_obj->ob_pd, asym); } ///////////////////////////////////////////////////////// @@ -74,7 +105,18 @@ CPPExtern :: CPPExtern(const CPPExtern&org) : // ///////////////////////////////////////////////////////// CPPExtern :: ~CPPExtern() -{ } +{ + + if(pimpl->cls) { + /* just in case we're still bound to #A from loading... */ + t_pd*x; + while ((x = pd_findbyclass(gensym("#A"), pimpl->cls))) { + pd_unbind(x, gensym("#A")); + } + } + delete pimpl; + pimpl=0; +} void CPPExtern :: post(const char*fmt,...) const @@ -84,13 +126,13 @@ void CPPExtern :: post(const char*fmt,...) const va_start(ap, fmt); vsnprintf(buf, MAXPDSTRING-1, fmt, ap); va_end(ap); - if(m_endpost && NULL!=m_objectname && NULL!=m_objectname->s_name - && &s_ != m_objectname) { - ::post("[%s]: %s", m_objectname->s_name, buf); + if(pimpl->endpost && NULL!=pimpl->objectname && NULL!=pimpl->objectname->s_name + && &s_ != pimpl->objectname) { + ::post("[%s]: %s", pimpl->objectname->s_name, buf); } else { ::post("%s", buf); } - m_endpost=true; + pimpl->endpost=true; } void CPPExtern :: startpost(const char*fmt,...) const { @@ -99,53 +141,33 @@ void CPPExtern :: startpost(const char*fmt,...) const va_start(ap, fmt); vsnprintf(buf, MAXPDSTRING-1, fmt, ap); va_end(ap); - if(m_endpost && NULL!=m_objectname && NULL!=m_objectname->s_name - && &s_ != m_objectname) { - ::startpost("[%s]: %s", m_objectname->s_name, buf); + if(pimpl->endpost && NULL!=pimpl->objectname && NULL!=pimpl->objectname->s_name + && &s_ != pimpl->objectname) { + ::startpost("[%s]: %s", pimpl->objectname->s_name, buf); } else { ::startpost("%s", buf); } - m_endpost=false; + pimpl->endpost=false; } void CPPExtern :: endpost(void) const { ::endpost(); - m_endpost=true; + pimpl->endpost=true; } -typedef void (*verbose_t)(int level, const char *fmt, ...); void CPPExtern :: verbose(const int level, const char*fmt,...) const { + const int verbose2logpost_level = 3; char buf[MAXPDSTRING]; va_list ap; va_start(ap, fmt); vsnprintf(buf, MAXPDSTRING-1, fmt, ap); va_end(ap); - static verbose_t rte_verbose=NULL; - static bool rte_verbose_checked=false; - if(false==rte_verbose_checked) { - gem::RTE::RTE*rte=gem::RTE::RTE::getRuntimeEnvironment(); - if(rte) { - rte_verbose=(verbose_t)rte->getFunction("verbose"); - } - } - rte_verbose_checked=true; - - /* only pd>=0.39(?) supports ::verbose() */ - if(rte_verbose) { - if(NULL!=m_objectname && NULL!=m_objectname->s_name - && &s_ != m_objectname) { - rte_verbose(level, "[%s]: %s", m_objectname->s_name, buf); - } else { - rte_verbose(level, "%s", buf); - } + if(NULL!=pimpl->objectname && NULL!=pimpl->objectname->s_name + && &s_ != pimpl->objectname) { + ::logpost(x_obj, verbose2logpost_level + level, "[%s]: %s", pimpl->objectname->s_name, buf); } else { - if(NULL!=m_objectname && NULL!=m_objectname->s_name - && &s_ != m_objectname) { - ::post("[%s]: %s", m_objectname->s_name, buf); - } else { - ::post("%s", buf); - } + ::logpost(x_obj, verbose2logpost_level + level, "%s", buf); } } @@ -156,21 +178,21 @@ void CPPExtern :: error(const char*fmt,...) const va_start(ap, fmt); vsnprintf(buf, MAXPDSTRING-1, fmt, ap); va_end(ap); - if(NULL!=m_objectname && NULL!=m_objectname->s_name - && &s_ != m_objectname) { - const char*objname=m_objectname->s_name; + if(NULL!=pimpl->objectname && NULL!=pimpl->objectname->s_name + && &s_ != pimpl->objectname) { + const char*objname=pimpl->objectname->s_name; if(x_obj) { pd_error(x_obj, "[%s]: %s", objname, buf); - } else if (m_holder) { - pd_error(m_holder, "[%s]: %s", objname, buf); + } else if (s_holder) { + pd_error(s_holder, "[%s]: %s", objname, buf); } else { pd_error(0, "[%s]: %s", objname, buf); } } else { if(x_obj) { pd_error(x_obj, "%s", buf); - } else if (m_holder) { - pd_error(m_holder, "%s", buf); + } else if (s_holder) { + pd_error(s_holder, "%s", buf); } else { pd_error(0, "%s", buf); } @@ -179,6 +201,11 @@ void CPPExtern :: error(const char*fmt,...) const typedef int (*close_t)(int fd); +const t_canvas* CPPExtern::getCanvas(void) const { + return pimpl->canvas; +} + + std::string CPPExtern::findFile(const std::string&f, const std::string&e) const { @@ -210,15 +237,18 @@ bool CPPExtern :: checkGemVersion(const int major, const int minor) CPPExtern&CPPExtern::operator=(const CPPExtern&org) { x_obj=org.x_obj; - m_objectname=org.m_objectname; - m_canvas=org.m_canvas; - m_endpost=true; + pimpl->objectname=org.pimpl->objectname; + pimpl->canvas=org.pimpl->canvas; + pimpl->cls = org.pimpl->cls; + pimpl->endpost = true; return *this; } void CPPExtern::beforeDeletion(void) { //post("CPPExtern to be deleted"); + + } @@ -255,8 +285,8 @@ gem::CPPExtern_proxy::CPPExtern_proxy( int argc = realargc; if(!name && s) name=s->s_name; - CPPExtern::m_holder = 0; - CPPExtern::m_holdname = name; + CPPExtern::s_holder = 0; + CPPExtern::s_holdname = name; /* if we want init-messages, check if we have a semi-colon * (that marks the beginning of the init-messages), @@ -279,7 +309,8 @@ gem::CPPExtern_proxy::CPPExtern_proxy( throw(GemException("unknown class")); } - CPPExtern::m_holder = &obj->pd_obj; + s_holdclass = cls; + CPPExtern::s_holder = &obj->pd_obj; pimpl->obj = obj; pimpl->realargc = realargc; @@ -291,8 +322,8 @@ gem::CPPExtern_proxy::CPPExtern_proxy( gem::CPPExtern_proxy::~CPPExtern_proxy() { delete pimpl; - CPPExtern::m_holder = 0; - CPPExtern::m_holdname = 0; + CPPExtern::s_holder = 0; + CPPExtern::s_holdname = 0; } void gem::CPPExtern_proxy::setObject(CPPExtern*obj) { diff --git a/src/Base/CPPExtern.h b/src/Base/CPPExtern.h index 4eea24892..c344f4f4e 100644 --- a/src/Base/CPPExtern.h +++ b/src/Base/CPPExtern.h @@ -123,19 +123,15 @@ class GEM_EXTERN CPPExtern ////////// // Get the object's canvas - const t_canvas* getCanvas(void) const - { - return(m_canvas); - } + const t_canvas* getCanvas(void) const; ////////// // This is a holder - don't touch it - static t_object* m_holder; + static t_object* s_holder; ////////// // my name - static const char* m_holdname; - t_symbol* m_objectname; + static const char* s_holdname; protected: @@ -150,6 +146,8 @@ class GEM_EXTERN CPPExtern virtual void beforeDeletion(); private: + class PIMPL; + PIMPL*pimpl; ////////// // The canvas that the object is in @@ -172,7 +170,6 @@ class GEM_EXTERN CPPExtern std::string findFile(const std::string&filename) const; private: - mutable bool m_endpost; /* internal state for startpost/post/endpost */ static bool checkGemVersion(const int major, const int minor); CPPExtern(const CPPExtern&); virtual CPPExtern&operator=(const CPPExtern&); @@ -333,7 +330,7 @@ static void obj_setupCallback(t_class *classPtr); #define REAL_NEW__CREATE2(NEW_CLASS) \ return proxy.initialize(); \ - } catch (...) {gem::catchGemException(CPPExtern::m_holdname, CPPExtern::m_holder); return NULL;} \ + } catch (...) {gem::catchGemException(CPPExtern::s_holdname, CPPExtern::s_holder); return NULL;} \ } #define REAL_NEW__SETUP(NEW_CLASS, CLASSNAME) \ diff --git a/src/Base/GemBase.cpp b/src/Base/GemBase.cpp index 594b99a65..bd4ada137 100644 --- a/src/Base/GemBase.cpp +++ b/src/Base/GemBase.cpp @@ -59,6 +59,36 @@ #include "GemBase.h" #include "Gem/Cache.h" +#include "Utils/GLUtil.h" + +struct GemBase::PIMPL { + + /* whether the object is internally disabled or not + * objects are to be disabled, if the system cannot make use of them, e.g. because of unsupported openGL features + */ + GemBase *parent; + gem::ContextDataenabled; + gem::ContextDatastate; + bool debugGL; + PIMPL(GemBase *_parent) + : parent(_parent) + , enabled(true) + , state(INIT) + , debugGL(false) + { } + PIMPL(PIMPL *p) + : parent(p->parent) + , enabled(p->enabled) + , state(p->state) + , debugGL(p->debugGL) + { } + void debugGLerror(const char*prefix=0) { + if(debugGL) { + GLenum errNum; + gem::utils::gl::glReportError(parent, prefix); + } + } +}; ///////////////////////////////////////////////////////// // @@ -69,9 +99,9 @@ // ///////////////////////////////////////////////////////// GemBase :: GemBase(void) - : gem_amRendering(false), m_cache(NULL), m_modified(true), - m_out1(NULL), - m_enabled(true), m_state(INIT) + : gem_amRendering(false), m_cache(NULL), m_modified(true) + , m_out1(NULL) + , m_pimpl(new PIMPL(this)) { m_out1 = outlet_new(this->x_obj, 0); pd_bind(&this->x_obj->ob_pd, gensym("__gemBase")); @@ -103,15 +133,17 @@ void GemBase :: gem_startstopMess(int state) // for now, this is important, as it is the only way to call the stopRendering #if 1 if (state && !gem_amRendering) { - m_enabled = isRunnable(); - if(m_enabled) { + m_pimpl->enabled = isRunnable(); + if(m_pimpl->enabled) { startRendering(); - m_state=RENDERING; + m_pimpl->debugGLerror("start() "); + m_pimpl->state=RENDERING; } } else if (!state && gem_amRendering) { - if(m_enabled) { + if(m_pimpl->enabled) { stopRendering(); - m_state=ENABLED; + m_pimpl->debugGLerror("stop() "); + m_pimpl->state=ENABLED; } } @@ -138,29 +170,33 @@ void GemBase :: gem_renderMess(GemCache* cache, GemState*state) if(m_cache && m_cache->m_magic!=GEMCACHE_MAGIC) { m_cache=NULL; } - if(INIT==m_state) { + if(INIT==m_pimpl->state) { if(isRunnable()) { - m_state=ENABLED; + m_pimpl->state=ENABLED; } else { - m_state=DISABLED; + m_pimpl->state=DISABLED; } } - if(MODIFIED==m_state) { + if(MODIFIED==m_pimpl->state) { stopRendering(); - m_state=ENABLED; + m_pimpl->debugGLerror("autostop() "); + m_pimpl->state=ENABLED; } - if(ENABLED==m_state) { + if(ENABLED==m_pimpl->state) { startRendering(); - m_state=RENDERING; + m_pimpl->debugGLerror("autostart() "); + m_pimpl->state=RENDERING; } - if(RENDERING==m_state) { + if(RENDERING==m_pimpl->state) { gem_amRendering=true; if(state) { render(state); + m_pimpl->debugGLerror(); } continueRender(state); if(state) { postrender(state); + m_pimpl->debugGLerror("post() "); } } m_modified=false; @@ -191,12 +227,12 @@ void GemBase :: setModified(void) m_cache->dirty = true; } m_modified=true; - switch(m_state) { + switch(m_pimpl->state) { case DISABLED: case INIT: break; default: - m_state=MODIFIED; + m_pimpl->state=MODIFIED; } } @@ -210,7 +246,7 @@ void GemBase :: realStopRendering(void) post("realStopRendering() called...please report this to the upstream developers"); stopRendering(); m_cache = NULL; - m_state=ENABLED; + m_pimpl->state=ENABLED; } @@ -226,7 +262,7 @@ bool GemBase :: isRunnable(void) enum GemBase::RenderState GemBase::getState(void) { - return m_state; + return m_pimpl->state; } #include "Base/GemWindow.h" @@ -246,19 +282,47 @@ void GemBase::beforeDeletion(void) ///////////////////////////////////////////////////////// void GemBase :: obj_setupCallback(t_class *classPtr) { - class_addmethod(classPtr, - reinterpret_cast(&GemBase::gem_MessCallback), - gensym("gem_state"), A_GIMME, A_NULL); + /* callback for the generic 'gem_state' message: + - startRender() + - render() + - stopRender() + */ + struct _CallbackClass_gemState { + static void callback(void *data, t_symbol* s, int argc, t_atom *argv) + { + if (argc==2 && argv->a_type==A_POINTER && (argv+1)->a_type==A_POINTER) { + GetMyClass(data)->gem_renderMess( + reinterpret_cast(argv->a_w.w_gpointer), + reinterpret_cast((argv+1)->a_w.w_gpointer)); +#if 1 + } else if (argc==1 && argv->a_type==A_FLOAT) { + GetMyClass(data)->gem_startstopMess(atom_getint(argv)); // start rendering (forget this !?) +#endif + } else { + GetMyClass(data)->error("wrong arguments in GemTrigger..."); + } + } + explicit _CallbackClass_gemState (struct _class*c) + { + class_addmethod(c, reinterpret_cast(callback), + gensym("gem_state"), A_GIMME, A_NULL); + } + }; + _CallbackClass_gemState _CallbackClassInstance_gemState (classPtr); + + /* callback for multicontext + (mostly: clean up if a context gets destroyed) + */ struct _CallbackClass_gemContext { static void callback(void*data, t_float v0) { GemBase*obj=GetMyClass(data); bool state=(bool)v0; if(!state && obj->gem_amRendering) { - if(obj->m_enabled) { + if(obj->m_pimpl->enabled) { //obj->post("stop rendering"); obj->stopRendering(); - obj->m_state=obj->ENABLED; + obj->m_pimpl->state=obj->ENABLED; } } obj->gem_amRendering=(!state); @@ -271,20 +335,23 @@ void GemBase :: obj_setupCallback(t_class *classPtr) }; _CallbackClass_gemContext _CallbackClassInstance_gemContext (classPtr); -} -void GemBase :: gem_MessCallback(void *data, t_symbol* s, int argc, - t_atom *argv) -{ - if (argc==2 && argv->a_type==A_POINTER && (argv+1)->a_type==A_POINTER) { - GetMyClass(data)->gem_renderMess( - reinterpret_cast(argv->a_w.w_gpointer), - reinterpret_cast((argv+1)->a_w.w_gpointer)); -#if 1 - } else if (argc==1 && argv->a_type==A_FLOAT) { - GetMyClass(data)->gem_startstopMess(atom_getint( - argv)); // start rendering (forget this !?) -#endif - } else { - GetMyClass(data)->error("wrong arguments in GemTrigger..."); - } + /* debugging GL errors */ + struct _CallbackClass_debugGL { + static void callback(void*data, t_float v0) + { + bool b = (bool)v0; + GemBase*obj=GetMyClass(data); + if(obj) { + obj->m_pimpl->debugGL = b; + } + } + explicit _CallbackClass_debugGL (struct _class*c) + { + class_addmethod(c, reinterpret_cast(callback), + gensym("debugGL"), A_FLOAT, A_NULL); + } + }; + _CallbackClass_debugGL _CallbackClassInstance_debugGL (classPtr); + + } diff --git a/src/Base/GemBase.h b/src/Base/GemBase.h index 0e4799127..a674c4185 100644 --- a/src/Base/GemBase.h +++ b/src/Base/GemBase.h @@ -126,13 +126,9 @@ class GEM_EXTERN GemBase : public CPPExtern friend class gemhead; static void obj_setupCallback(t_class *classPtr); - static void gem_MessCallback(void *, t_symbol*,int, t_atom*); - /* whether the object is internally disabled or not - * objects are to be disabled, if the system cannot make use of them, e.g. because of unsupported openGL features - */ - gem::ContextDatam_enabled; - gem::ContextDatam_state; + class PIMPL; + PIMPL*m_pimpl; protected: enum RenderState getState(void); diff --git a/src/Base/GemContext.cpp b/src/Base/GemContext.cpp index ff2207e41..90b36e242 100644 --- a/src/Base/GemContext.cpp +++ b/src/Base/GemContext.cpp @@ -27,51 +27,60 @@ using namespace gem; -class Context::PIMPL +struct Context::PIMPL { -public: - PIMPL(void) : + void initMaxDepth(int id) { + GLenum pname = 0; + switch (id) { + case GemMan::STACKMODELVIEW: pname = GL_MAX_MODELVIEW_STACK_DEPTH; break; + case GemMan::STACKTEXTURE: pname = GL_MAX_TEXTURE_STACK_DEPTH; break; + case GemMan::STACKPROJECTION: pname = GL_MAX_PROJECTION_STACK_DEPTH; break; + case GemMan::STACKCOLOR: pname = GL_MAX_COLOR_MATRIX_STACK_DEPTH; break; + default: + return; + } + glGetIntegerv(pname, maxStackDepth+id); + } + bool initialized; /* just a dummy variable at the beginning... */ + PIMPL(void) + : initialized(false) #ifdef GEM_MULTICONTEXT - context(new GLEWContext), + , context(new GLEWContext) #else - context(NULL), + , context(NULL) #endif #ifdef GemGlewXContext - xcontext(new GemGlewXContext), + , xcontext(new GemGlewXContext) #endif /* GemGlewXContext */ - contextid(makeID()) + , contextid(makeID()) + , oldTexture(0) { /* check the stack-sizes */ - glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, - maxStackDepth+GemMan::STACKMODELVIEW); - glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, - maxStackDepth+GemMan::STACKTEXTURE); - glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, - maxStackDepth+GemMan::STACKPROJECTION); + initMaxDepth(GemMan::STACKMODELVIEW); + initMaxDepth(GemMan::STACKTEXTURE); + initMaxDepth(GemMan::STACKPROJECTION); maxStackDepth[GemMan::STACKCOLOR]=0; } - PIMPL(const PIMPL&p) : + PIMPL(const PIMPL&p) + : initialized(p.initialized) #ifdef GEM_MULTICONTEXT - context(new GLEWContext(*p.context)), + , context(new GLEWContext(*p.context)) #else - context(NULL), + , context(NULL) #endif #ifdef GemGlewXContext - xcontext(new GemGlewXContext(*p.xcontext)), + , xcontext(new GemGlewXContext(*p.xcontext)) #endif /* GemGlewXContext */ - contextid(makeID()) + , contextid(makeID()) + , oldTexture(0) { /* check the stack-sizes */ - glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, - maxStackDepth+GemMan::STACKMODELVIEW); - glGetIntegerv(GL_MAX_COLOR_MATRIX_STACK_DEPTH, - maxStackDepth+GemMan::STACKCOLOR); - glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, - maxStackDepth+GemMan::STACKTEXTURE); - glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, - maxStackDepth+GemMan::STACKPROJECTION); + initMaxDepth(GemMan::STACKMODELVIEW); + initMaxDepth(GemMan::STACKCOLOR); + initMaxDepth(GemMan::STACKTEXTURE); + initMaxDepth(GemMan::STACKPROJECTION); } ~PIMPL(void) @@ -99,6 +108,7 @@ class Context::PIMPL #endif /* GemGlewXContext */ unsigned int contextid; + GLint oldTexture; // LATER: reusing IDs prevents a memleak in gem::ContextData // LATER: reusing IDs might make us re-use invalid gem::ContextData! @@ -154,12 +164,16 @@ Context::Context(void) errstring="failed to init GLEW"; } } else { - GLint colorstack = 0; - if(GLEW_ARB_imaging) { - glGetIntegerv(GL_MAX_COLOR_MATRIX_STACK_DEPTH, &colorstack); + m_pimpl->initialized = true; + if(GLEW_VERSION_1_3) { + glGetIntegerv(GL_ACTIVE_TEXTURE, &m_pimpl->oldTexture); + glActiveTexture(GL_TEXTURE0_ARB); } + m_pimpl->initMaxDepth(GemMan::STACKTEXTURE); - m_pimpl->maxStackDepth[GemMan::STACKCOLOR]=colorstack; + if(GLEW_ARB_imaging) { + m_pimpl->initMaxDepth(GemMan::STACKCOLOR); + } } pop(); @@ -226,6 +240,12 @@ bool Context::push(void) m_pimpl->s_xcontext=m_pimpl->xcontext; #endif /* GemGlewXContext */ m_pimpl->s_contextid=m_pimpl->contextid; + + if(m_pimpl->initialized && GLEW_VERSION_1_3) { + glGetIntegerv(GL_ACTIVE_TEXTURE, &m_pimpl->oldTexture); + glActiveTexture(GL_TEXTURE0_ARB); + } + return true; } @@ -236,6 +256,9 @@ bool Context::isActive(void) bool Context::pop(void) { + if(m_pimpl->oldTexture && GLEW_VERSION_1_3) { + glActiveTexture(m_pimpl->oldTexture); + } return true; } diff --git a/src/Base/GemGLBase.h b/src/Base/GemGLBase.h index 6a3d319fa..fa2a91738 100644 --- a/src/Base/GemGLBase.h +++ b/src/Base/GemGLBase.h @@ -11,6 +11,9 @@ #ifndef _INCLUDE__GEM_BASE_GEMGLBASE_H_ #define _INCLUDE__GEM_BASE_GEMGLBASE_H_ +#define HELPSYMBOL "GEMgl" + + #include "Utils/GLUtil.h" #include "Base/GemBase.h" diff --git a/src/Base/GemShape.cpp b/src/Base/GemShape.cpp index cbd5bdb91..fe3b58da0 100644 --- a/src/Base/GemShape.cpp +++ b/src/Base/GemShape.cpp @@ -66,6 +66,10 @@ static void initialize_drawtypes(std::map&drawtypes) drawtypes["strip"]=GL_TRIANGLE_STRIP; drawtypes["fill"]=GL_POLYGON; + + drawtypes["patch"]=GL_PATCHES; + drawtypes["patches"]=GL_PATCHES; + } } diff --git a/src/Base/GemWindow.cpp b/src/Base/GemWindow.cpp index 3a9ccd646..3e88373b1 100644 --- a/src/Base/GemWindow.cpp +++ b/src/Base/GemWindow.cpp @@ -19,6 +19,7 @@ #include "GemContext.h" #include "Gem/Exception.h" #include "GemBase.h" +#include "Utils/GLUtil.h" #include #include @@ -34,6 +35,9 @@ bool sendContextDestroyedMsg(t_pd*x) t_atom a[1]; SETFLOAT(a+0, 0); pd_typedmess(x, s, 1, a); + + /* clear all openGL errors */ + gem::utils::gl::glReportError((CPPExtern*)NULL); return true; } }; @@ -136,6 +140,10 @@ class GemWindow::PIMPL queue(alist); } + void sendInfoNow(t_float f) { + outlet_float(infoOut, f); + } + void sendInfo(std::vectoralist) { int argc=alist.size(); @@ -193,12 +201,16 @@ class GemWindow::PIMPL goto fail; } + /* check for openGL errors */ + gem::utils::gl::glReportError(parent); + if(dispatch) parent->dispatch(); switch(output_state) { case TRUE: - parent->info("float", 1); + sendInfoNow(1); + //parent->info("float", 1); break; case NONE: parent->bang(); @@ -215,8 +227,10 @@ class GemWindow::PIMPL return true; fail: - if(TRUE == output_state) - parent->info("float", 0); + if(TRUE == output_state) { + sendInfoNow(0); + //parent->info("float", 0); + } return false; } @@ -458,7 +472,11 @@ bool GemWindow::createGemWindow(void) } m_context=m_pimpl->mycontext; } else { - m_pimpl->mycontext = 0; + /* JMZ20240117: this used be 'm_pimpl->mycontext = 0;' which i don't understand... */ + /* as setting mycontext to NULL breaks rendering for backends + * with shared contexts ([gemglxwindow]), we do the obvious thing for now... + */ + m_pimpl->mycontext = m_context; } m_pimpl->dispatch(); diff --git a/src/Controls/gemcubeframebuffer.cpp b/src/Controls/gemcubeframebuffer.cpp index d51cb0ec9..27d48fd0a 100644 --- a/src/Controls/gemcubeframebuffer.cpp +++ b/src/Controls/gemcubeframebuffer.cpp @@ -237,6 +237,7 @@ void gemcubeframebuffer :: postrender(GemState *state) SETFLOAT(ap+4, static_cast(0.)); outlet_list(m_outTexInfo, 0, 5, ap); } + glActiveTexture(GL_TEXTURE0_ARB); } namespace diff --git a/src/Controls/gemframebuffer.cpp b/src/Controls/gemframebuffer.cpp index 2604bf125..09b21c960 100644 --- a/src/Controls/gemframebuffer.cpp +++ b/src/Controls/gemframebuffer.cpp @@ -33,7 +33,7 @@ CPPEXTERN_NEW_WITH_GIMME(gemframebuffer); /* args: * : width(256), height(256), format(RGB), type(uchar) * s : width(), height(), format(format), type() - * f : width()dimen, height(dimen), format(), type() + * f : width(dimen), height(dimen), format(), type() * ss : width(), height(), format(format), type(type) * ff : width(width), height(height), format(), type() * ffs : width(width), height(height), format(format), type() @@ -41,14 +41,16 @@ CPPEXTERN_NEW_WITH_GIMME(gemframebuffer); */ gemframebuffer :: gemframebuffer(int argc, t_atom*argv) - : m_haveinit(false), m_wantinit(false), m_frameBufferIndex(0), - m_depthBufferIndex(0), - m_offScreenID(0), m_texTarget(GL_TEXTURE_2D), m_texunit(0), - m_width(256), m_height(256), - m_rectangle(false), m_canRectangle(0), - m_internalformat(GL_RGB8), m_format(GL_RGB), m_wantFormat(GL_RGB), - m_type(GL_UNSIGNED_BYTE), - m_outTexInfo(NULL) + : m_haveinit(false), m_wantinit(false), m_frameBufferIndex(0) + , m_depthBufferIndex(0) + , m_offScreenID(0), m_texTarget(GL_TEXTURE_2D), m_texunit(0) + , m_width(256), m_height(256) + , m_rectangle(false), m_canRectangle(0) + , m_internalformat(GL_RGB8), m_format(GL_RGB), m_wantFormat(GL_RGB) + , m_type(GL_UNSIGNED_BYTE) + , m_outTexInfo(NULL) + , m_quality(GL_NEAREST), m_repeat(GL_CLAMP_TO_EDGE), m_clear(true) + , m_verbose(false) { // create an outlet to send out texture info: // - ID @@ -220,7 +222,7 @@ void gemframebuffer :: render(GemState *state) glClearColor( m_FBOcolor[0], m_FBOcolor[1], m_FBOcolor[2], m_FBOcolor[3] ); // Clear the buffers and reset the model view matrix. - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + if(m_clear) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // We need a one-to-one mapping of pixels to texels in order to // ensure every element of our texture is processed. By setting our @@ -290,14 +292,16 @@ void gemframebuffer :: postrender(GemState *state) glViewport( m_vp[0], m_vp[1], m_vp[2], m_vp[3] ); // now that the render is done, - // send textureID, w, h, textureTarget to outlet + // send textureID, w, h, textureType and upside_down to outlet t_atom ap[5]; SETFLOAT(ap+0, static_cast(m_offScreenID)); SETFLOAT(ap+1, w); SETFLOAT(ap+2, h); SETFLOAT(ap+3, m_texTarget); - SETFLOAT(ap+4, static_cast(0.)); + SETFLOAT(ap+4, static_cast(0.)); // always correct outlet_list(m_outTexInfo, 0, 5, ap); + + glActiveTexture(GL_TEXTURE0_ARB); } namespace @@ -377,6 +381,9 @@ void gemframebuffer :: printInfo() m_format, m_internalformat); verbose(0, "type: %s [%d]", type.c_str(), m_type); verbose(0, "texunit: %d", m_texunit); + verbose(0, "repeat: %d", (m_repeat == GL_REPEAT)); + verbose(0, "quality: %d", (m_quality == GL_LINEAR)); + verbose(0, "clear: %d", m_clear); } ///////////////////////////////////////////////////////// @@ -407,10 +414,12 @@ void gemframebuffer :: initFBO() // 2.13.2006 // GL_LINEAR causes fallback to software shader // so switching back to GL_NEAREST - glTexParameteri(m_texTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(m_texTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + // 2025 : it's ok now to have nearest or linear + glTexParameteri(m_texTarget, GL_TEXTURE_MIN_FILTER, m_quality); + glTexParameteri(m_texTarget, GL_TEXTURE_MAG_FILTER, m_quality); - GLuint wrapmode = (GLEW_EXT_texture_edge_clamp)?GL_CLAMP_TO_EDGE:GL_CLAMP; + GLuint wrapmode = m_repeat; + if (wrapmode == GL_CLAMP_TO_EDGE) (GLEW_EXT_texture_edge_clamp)?GL_CLAMP_TO_EDGE:GL_CLAMP; glTexParameterf(m_texTarget, GL_TEXTURE_WRAP_S, wrapmode); glTexParameterf(m_texTarget, GL_TEXTURE_WRAP_T, wrapmode); @@ -460,7 +469,8 @@ void gemframebuffer :: initFBO() m_haveinit = true; m_wantinit = false; - printInfo(); + if (m_verbose) + printInfo(); } //////////////////////////////////////////////////////// @@ -469,6 +479,7 @@ void gemframebuffer :: initFBO() ///////////////////////////////////////////////////////// void gemframebuffer :: destroyFBO() { + if(!m_haveinit) return; //if(!GLEW_EXT_framebuffer_object)return; // Release all resources. @@ -663,7 +674,36 @@ void gemframebuffer :: texunitMess(int unit) m_texunit=static_cast(unit); } +void gemframebuffer :: qualityMess(int quality) +{ + if(quality) + m_quality=GL_LINEAR; + else + m_quality=GL_NEAREST; + setModified(); +} + +void gemframebuffer :: repeatMess(int repeat) +{ + if(repeat) + m_repeat=GL_REPEAT; + else + m_repeat=GL_CLAMP_TO_EDGE; + + setModified(); +} + +void gemframebuffer :: clearMess(bool clear) +{ + m_clear = clear; +} +void gemframebuffer :: verboseMess(bool verbose) +{ + m_verbose = verbose; + if (m_verbose) + printInfo(); +} //////////////////////////////////////////////////////// // static member function @@ -679,6 +719,10 @@ void gemframebuffer :: obj_setupCallback(t_class *classPtr) CPPEXTERN_MSG1(classPtr, "type", typeMess, std::string); CPPEXTERN_MSG1(classPtr, "rectangle", rectangleMess, bool); CPPEXTERN_MSG1(classPtr, "texunit", texunitMess, int); + CPPEXTERN_MSG1(classPtr, "quality", qualityMess, int); + CPPEXTERN_MSG1(classPtr, "repeat", repeatMess, int); + CPPEXTERN_MSG1(classPtr, "clear", clearMess, bool); + CPPEXTERN_MSG1(classPtr, "verbose", verboseMess, bool); /* legacy */ CPPEXTERN_MSG2(classPtr, "dim", dimMess, int, int); diff --git a/src/Controls/gemframebuffer.h b/src/Controls/gemframebuffer.h index c6b4204a7..01266b538 100644 --- a/src/Controls/gemframebuffer.h +++ b/src/Controls/gemframebuffer.h @@ -78,6 +78,11 @@ class GEM_EXTERN gemframebuffer : public GemBase virtual void rectangleMess(bool mode); virtual void texunitMess(int mode); + virtual void qualityMess(int mode); + virtual void repeatMess(int mode); + virtual void clearMess(bool mode); + virtual void verboseMess(bool mode); + virtual void fixFormat(GLenum wantedFormat); virtual void printInfo(void); @@ -101,6 +106,11 @@ class GEM_EXTERN gemframebuffer : public GemBase GLfloat m_FBOcolor[4]; t_outlet *m_outTexInfo; GLfloat m_perspect[6]; + GLint m_quality; + GLint m_repeat; + bool m_clear; + + bool m_verbose; // print debugging info when changing parametres void bangMess(void); }; diff --git a/src/Controls/gemhead.cpp b/src/Controls/gemhead.cpp index c1ae4de45..a6d07e09d 100644 --- a/src/Controls/gemhead.cpp +++ b/src/Controls/gemhead.cpp @@ -346,4 +346,7 @@ void gemhead :: obj_setupCallback(t_class *classPtr) CPPEXTERN_MSG1(classPtr, "float", renderOnOff, int); CPPEXTERN_MSG1(classPtr, "set", setMess, float); CPPEXTERN_MSG1(classPtr, "context", setContext, std::string); + + /* compat with [gemhead] abstraction that uses [savestate] */ + class_addmethod(classPtr, reinterpret_cast(::nullfn), gensym("saved"), A_GIMME, A_NULL); } diff --git a/src/Controls/modelfiler.cpp b/src/Controls/modelfiler.cpp index 6c68ea1db..a8d235b08 100644 --- a/src/Controls/modelfiler.cpp +++ b/src/Controls/modelfiler.cpp @@ -311,24 +311,25 @@ void modelfiler :: backendMess(t_symbol*s, int argc, t_atom*argv) } else { /* no backend requested, just enumerate them */ if(m_loader) { + const std::string sel = s->s_name; std::vectoratoms; gem::any value; gem::Properties props; std::vector backends; - props.set("backends", value); + props.set("_backends", value); m_loader->getProperties(props); - if(props.type("backends")!=gem::Properties::UNSET) { - props.get("backends", backends); + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); } atoms.clear(); atoms.push_back(value=(int)(backends.size())); - m_infoOut.send("loaders", atoms); + m_infoOut.send(sel + "s", atoms); if(!backends.empty()) { for(int i=0; istackDepth[id]maxDepth[id]) { glMatrixMode(mode); - glPushMatrix(); + if(id == TEXTURE && data->numTexUnits) { + int curUnit; + glGetIntegerv(GL_ACTIVE_TEXTURE, &curUnit); + for (int i=0; inumTexUnits; i++) { + glActiveTexture(GL_TEXTURE0_ARB + i); + glPushMatrix(); + } + glActiveTexture(curUnit); + } else + glPushMatrix(); data->stackDepth[id]++; + if(gem::utils::gl::glReportError(NULL, "push "))post("stack=%d", id); return true; } @@ -148,7 +160,17 @@ bool GLStack::pop(enum GemStackId id) data->stackDepth[id]--; if(data->stackDepth[id]maxDepth[id]) { glMatrixMode(mode); - glPopMatrix(); + if(id == TEXTURE && data->numTexUnits) { + int curUnit; + glGetIntegerv(GL_ACTIVE_TEXTURE, &curUnit); + for (int i=0; inumTexUnits; i++) { + glActiveTexture(GL_TEXTURE0_ARB + i); + glPopMatrix(); + } + glActiveTexture(curUnit); + } else + glPopMatrix(); + if(gem::utils::gl::glReportError(NULL, "pop "))post("stack=%d", id); return true; } return false; @@ -187,6 +209,12 @@ int GLStack::reset(enum GemStackId id) s_id2maxdepth[id]=0; s_id2depth[id]=0; } + + data->numTexUnits = 0; + if(TEXTURE == id && GLEW_ARB_multitexture) { + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &data->numTexUnits); + } + glReportError(); // clear any errors so far } diff --git a/src/Gem/Image.cpp b/src/Gem/Image.cpp index dde26dab2..50c3a66ac 100644 --- a/src/Gem/Image.cpp +++ b/src/Gem/Image.cpp @@ -278,6 +278,32 @@ namespace { return buf; } + const unsigned char format2csize(int fmt) { + switch(fmt) { + case GL_LUMINANCE: + return 1; + case GL_YUV422_GEM: + return 2; + case GL_RGB: + case GL_BGR: + return 3; + case GL_RGBA: + case GL_BGRA: +#ifdef GL_ABGR_EXT + case GL_ABGR_EXT: +#endif +#ifdef GL_ARGB_EXT + case GL_ARGB_EXT: +#endif + return 4; + default: + break; + } + /* default */ + return 4; + } + + const bool needsReverseOrdering(unsigned int type) { const bool isBigEndian = #ifdef __BIG_ENDIAN__ @@ -518,13 +544,13 @@ imageStruct&imageStruct::operator=(const imageStruct&org) } -GEM_EXTERN int imageStruct::setCsizeByFormat(int setformat) +GEM_EXTERN int imageStruct::setFormat(int setformat) { + csize = format2csize(setformat); switch(setformat) { case GL_LUMINANCE: format=setformat; type=GL_UNSIGNED_BYTE; - csize=1; break; case GL_YUV422_GEM: @@ -540,14 +566,12 @@ GEM_EXTERN int imageStruct::setCsizeByFormat(int setformat) GL_UNSIGNED_BYTE #endif ; - csize=2; break; case GL_RGB: case GL_BGR: format=setformat; type=GL_UNSIGNED_BYTE; - csize=3; break; case GL_RGBA: @@ -569,15 +593,15 @@ GEM_EXTERN int imageStruct::setCsizeByFormat(int setformat) # endif #endif ; - csize=4; break; } return csize; } -GEM_EXTERN int imageStruct::setCsizeByFormat(void) + +GEM_EXTERN int imageStruct::setFormat(void) { - return setCsizeByFormat(format); + return setFormat(format); } void pix_addsat(unsigned char *leftPix, unsigned char *rightPix, @@ -667,7 +691,7 @@ GEM_EXTERN bool imageStruct::convertFrom(const imageStruct *from, ysize=from->ysize; if(to_format>0) { - setCsizeByFormat(to_format); + setFormat(to_format); } upsidedown=from->upsidedown; @@ -723,7 +747,7 @@ GEM_EXTERN bool imageStruct::fromRGB(const unsigned char *rgbdata) if(!rgbdata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -771,7 +795,7 @@ GEM_EXTERN bool imageStruct::fromRGB16(const unsigned char *rgb16data) return false; } const unsigned short*rgbdata=(const unsigned short*)rgb16data; - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -803,7 +827,7 @@ GEM_EXTERN bool imageStruct::fromRGBA(const unsigned char *rgbadata) if(!rgbadata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -857,7 +881,7 @@ GEM_EXTERN bool imageStruct::fromBGR(const unsigned char *bgrdata) if(!bgrdata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -901,7 +925,7 @@ GEM_EXTERN bool imageStruct::fromBGRA(const unsigned char *bgradata) if(!bgradata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -949,7 +973,7 @@ GEM_EXTERN bool imageStruct::fromABGR(const unsigned char *abgrdata) if(!abgrdata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -999,7 +1023,7 @@ GEM_EXTERN bool imageStruct::fromARGB(const unsigned char *argbdata) if(!argbdata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1051,7 +1075,7 @@ GEM_EXTERN bool imageStruct::fromGray(const unsigned char *greydata) if(!greydata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1096,7 +1120,7 @@ GEM_EXTERN bool imageStruct::fromGray(const short *greydata_) if(!greydata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1162,7 +1186,7 @@ GEM_EXTERN bool imageStruct::fromYV12(const unsigned char*Y, return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1220,7 +1244,7 @@ GEM_EXTERN bool imageStruct::fromYV12(const short*Y, const short*U, return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1268,7 +1292,7 @@ GEM_EXTERN bool imageStruct::fromUYVY(const unsigned char *yuvdata) if(!yuvdata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1328,7 +1352,7 @@ GEM_EXTERN bool imageStruct::fromYUY2(const unsigned char*yuvdata) // YUYV if(!yuvdata) { return false; } - setCsizeByFormat(); + setFormat(); reallocate(); bool reverse = needsReverseOrdering(type); @@ -1372,7 +1396,7 @@ GEM_EXTERN bool imageStruct::fromYVYU(const unsigned char *yuvdata) if(!yuvdata) { return false; } - setCsizeByFormat(); + setFormat(); bool reverse = needsReverseOrdering(type); reallocate(); @@ -1450,78 +1474,89 @@ GEM_EXTERN void imageStruct::fixUpDown(void) upsidedown=true; } +namespace { + template + void _yuv2rgb(const T y, const T u, const T v, + T&r, T&g, T&b) { + const T Y = y*static_cast(YUV2RGB_11); + r = CLAMP(Y + u*static_cast(YUV2RGB_12) + v*static_cast(YUV2RGB_13)); + g = CLAMP(Y + u*static_cast(YUV2RGB_22) + v*static_cast(YUV2RGB_23)); + b = CLAMP(Y + u*static_cast(YUV2RGB_32) + v*static_cast(YUV2RGB_33)); + } + template<> + void _yuv2rgb(const unsigned char y, const unsigned char u, const unsigned char v, + unsigned char&r, unsigned char&g, unsigned char&b) { + const int Y = YUV2RGB_11*(y - Y_OFFSET); + const int U = u - UV_OFFSET; + const int V = v - UV_OFFSET; + const int uv_r=YUV2RGB_12*U + YUV2RGB_13*V; + const int uv_g=YUV2RGB_22*U + YUV2RGB_23*V; + const int uv_b=YUV2RGB_32*U + YUV2RGB_33*V; + r = CLAMP((Y + uv_r) >> 8); + g = CLAMP((Y + uv_g) >> 8); + b = CLAMP((Y + uv_b) >> 8); + } + + template + void _getRGB(const T*data, unsigned int format, size_t position, T&red, T&green, T&blue, T&alpha) { + int csize = format2csize(format); + const T*pixels = data+position*csize; + switch(format) { + case GL_LUMINANCE: + red=green=blue=pixels[0]; + alpha=255; + break; + case GL_RGB: + red=pixels[0]; + green=pixels[1]; + blue=pixels[2]; + break; + case GL_BGR: + red=pixels[0]; + green=pixels[1]; + blue=pixels[2]; + break; + case GL_RGBA: + red=pixels[0]; + green=pixels[1]; + blue=pixels[2]; + alpha=pixels[3]; + break; + case GL_BGRA: +#ifdef __APPLE__ + /* ARGB */ + red=pixels[1]; + green=pixels[2]; + blue=pixels[3]; + alpha=pixels[0]; +#else + red=pixels[2]; + green=pixels[1]; + blue=pixels[0]; + alpha=pixels[3]; +#endif + break; + case GL_YUV422_GEM: + pixels = data + ((position>>1)<<1)*csize; + _yuv2rgb(pixels[(position%2)?chY1:chY0], pixels[chU], pixels[chV], red, green, blue); + break; + default: + break; + } + } +}; GEM_EXTERN bool imageStruct::getRGB(int X, int Y, unsigned char*r, unsigned char*g, unsigned char*b, unsigned char*a) const { + bool reverse = needsReverseOrdering(type); unsigned char red=0, green=0, blue=0, alpha=255; int position = (X+(upsidedown?(ysize-Y-1):Y)*xsize); - const unsigned char*pixels=data+position*csize; - - switch(format) { - case GL_LUMINANCE: - red=green=blue=pixels[0]; - alpha=255; - break; - case GL_RGB: - red=pixels[0]; - green=pixels[1]; - blue=pixels[2]; - break; - case GL_BGR: - red=pixels[0]; - green=pixels[1]; - blue=pixels[2]; - break; - case GL_RGBA: - red=pixels[0]; - green=pixels[1]; - blue=pixels[2]; - alpha=pixels[3]; - break; - case GL_BGRA: -#ifdef __APPLE__ - red=pixels[1]; - green=pixels[2]; - blue=pixels[3]; - alpha=pixels[0]; -#else - red=pixels[2]; - green=pixels[1]; - blue=pixels[0]; - alpha=pixels[3]; -#endif - break; - case GL_YUV422_GEM: { - position = (((X+(upsidedown?(ysize-Y-1):Y)*xsize)>>1)<<1); - pixels=data+position*csize; - int y=YUV2RGB_11*(pixels[(X%2)?chY1:chY0]-Y_OFFSET); - int u=pixels[chU] - UV_OFFSET; - int v=pixels[chV] - UV_OFFSET; - int uv_r=YUV2RGB_12*u+YUV2RGB_13*v; - int uv_g=YUV2RGB_22*u+YUV2RGB_23*v; - int uv_b=YUV2RGB_32*u+YUV2RGB_33*v; - - red = CLAMP((y + uv_r) >> 8); - green = CLAMP((y + uv_g) >> 8); - blue = CLAMP((y + uv_b) >> 8); - } - break; - default: - break; - } - if(r) { - *r=red; - } - if(g) { - *g=green; - } - if(b) { - *b=blue; - } - if(a) { - *a=alpha; - } + _getRGB(data, format, position, red, green, blue, alpha); + if(r) *r=red; + if(g) *g=green; + if(b) *b=blue; + if(a) *a=alpha; return true; } GEM_EXTERN bool imageStruct::getGrey(int X, int Y, unsigned char*g) const diff --git a/src/Gem/Image.h b/src/Gem/Image.h index b56aee0b9..0b0359f91 100644 --- a/src/Gem/Image.h +++ b/src/Gem/Image.h @@ -168,8 +168,11 @@ struct GEM_EXTERN imageStruct { * and set and return the correct csize (like 1) * if no format is given the current format is used */ - virtual int setCsizeByFormat(int format); - virtual int setCsizeByFormat(void); + virtual int setFormat(int format); + virtual int setFormat(void); + + GEM_DEPRECATED int setCsizeByFormat(int format) { return setFormat(format); } + GEM_DEPRECATED int setCsizeByFormat(void) { return setFormat(); } /* various copy functions @@ -178,8 +181,8 @@ struct GEM_EXTERN imageStruct { * into a new imageStruct */ virtual void copy2Image(imageStruct *to) const; - virtual void copy2ImageStruct(imageStruct *to) - const; // copy the imageStruct (but not the actual data) + virtual void copy2ImageStruct(imageStruct *to) const; + // copy the imageStruct (but not the actual data) /* this is a sort of better copy2Image, * which only copies the imageStruct-data if it is needed */ diff --git a/src/Gem/ImageLoad.cpp b/src/Gem/ImageLoad.cpp index 542a160d9..904d76c5e 100644 --- a/src/Gem/ImageLoad.cpp +++ b/src/Gem/ImageLoad.cpp @@ -127,7 +127,7 @@ struct PixImageThreadLoader : public gem::thread::SynchedWorkerThread { i=0; static bool dunnit=false; if(!dunnit) { - verbose(1, "threaded ImageLoading not supported!"); + logpost(0, 3+1, "threaded ImageLoading not supported!"); } dunnit=true; } diff --git a/src/Gem/Manager.cpp b/src/Gem/Manager.cpp index 79133707d..17ef999ab 100644 --- a/src/Gem/Manager.cpp +++ b/src/Gem/Manager.cpp @@ -590,7 +590,7 @@ void GemMan :: render(void *) currentState.set(GemState::_TIMING_TICK, tickTime); - m_lastRenderTime = clock_getsystime(); + m_lastRenderTime = clock_getlogicaltime(); //test to see if stereo is supported //XXX maybe there is a better place to do this? @@ -882,7 +882,7 @@ void GemMan :: render(void *) post("unable to annihiliate %f ms", spent); } if(deltime<0.) { - verbose(1, "negative delay time: %f", deltime); + logpost(0, 3+1, "negative delay time: %f", deltime); deltime=1.f; } } @@ -922,7 +922,7 @@ void GemMan :: startRendering() return; } - m_lastRenderTime = clock_getsystime(); + m_lastRenderTime = clock_getlogicaltime(); render(NULL); } diff --git a/src/Gem/Manager.h b/src/Gem/Manager.h index 651980b17..9e7ba1388 100644 --- a/src/Gem/Manager.h +++ b/src/Gem/Manager.h @@ -50,75 +50,75 @@ class GEM_EXTERN GemMan ////////// // Should only be called once (usually by GemSetup) - static void initGem(void); + static void initGem(void); ////////// - static void addObj(gemhead *obj, float priority); + static void addObj(gemhead *obj, float priority); ////////// - static void removeObj(gemhead *obj, float priority); + static void removeObj(gemhead *obj, float priority); ////////// // Is there a window. - static int windowExists(void); + static int windowExists(void); ////////// // Are we rendering. - static int getRenderState(void); + static int getRenderState(void); ////////// // is there a context (has its meaning under X) - static void createContext(const char* disp); - static int contextExists(void); + static void createContext(const char* disp); + static int contextExists(void); ////////// // If an object needs to know if the window changed. // This is important for display lists. - static int windowNumber(void); + static int windowNumber(void); ////////// // reset to the initial state - static void resetState(void); + static void resetState(void); ////////// // Just send out one frame (if double buffered, will swap buffers) - static void render(void *); + static void render(void *); - static void renderChain(struct _symbol *head, bool start); - static void renderChain(struct _symbol *head, GemState *state); + static void renderChain(struct _symbol *head, bool start); + static void renderChain(struct _symbol *head, GemState *state); ////////// // Start a clock to do rendering. - static void startRendering(void); + static void startRendering(void); ////////// // Stop the clock to do rendering. - static void stopRendering(void); + static void stopRendering(void); ////////// // Create the window with the current parameters - static int createWindow(const char* disp = 0); + static int createWindow(const char* disp = 0); ////////// // Destroy the window - static void destroyWindow(void); + static void destroyWindow(void); // Destroy the window after a minimal delay - static void destroyWindowSoon(void); + static void destroyWindowSoon(void); ////////// // Swap the buffers. // If single buffered, just clears the window - static void swapBuffers(void); + static void swapBuffers(void); ////////// // Set the frame rate - static void frameRate(float framespersecond); + static void frameRate(float framespersecond); ////////// // Get the frame rate - static float getFramerate(void); + static float getFramerate(void); - static int getProfileLevel(void); + static int getProfileLevel(void); static void getDimen(int*width, int*height); static void getRealDimen(int*width, int*height); @@ -127,84 +127,79 @@ class GEM_EXTERN GemMan ////////// // Turn on/off lighting - static void lightingOnOff(int state); + static void lightingOnOff(int state); ////////// // Turn on/off cursor - static void cursorOnOff(int state); + static void cursorOnOff(int state); ////////// // Turn on/off topmost position - static void topmostOnOff(int state); + static void topmostOnOff(int state); ////////// // Request a lighting value - it is yours until you free it. // The return can be 0, in which there are too many lights // [in] specific - If you want a specific light. == 0 means that you don't care. - static GLenum requestLight(int specific = 0); + static GLenum requestLight(int specific = 0); ////////// // Free a lighting value - static void freeLight(GLenum lightNum); + static void freeLight(GLenum lightNum); ////////// // Print out information - static void printInfo(void); + static void printInfo(void); ////////// - static void fillGemState(GemState &); + static void fillGemState(GemState &); - static int texture_rectangle_supported; + static int texture_rectangle_supported; enum GemStackId { STACKMODELVIEW, STACKCOLOR, STACKTEXTURE, STACKPROJECTION }; - static GLint maxStackDepth[4]; // for push/pop of matrix-stacks + static GLint maxStackDepth[4]; // for push/pop of matrix-stacks - static float m_perspect[6]; // values for the perspective matrix - static float m_lookat[9]; // values for the lookat matrix + static float m_perspect[6]; // values for the perspective matrix + static float m_lookat[9]; // values for the lookat matrix // LATER make this private (right now it is needed in gem2pdp) - static int m_buffer; // single(1) or double(2) + static int m_buffer; // single(1) or double(2) private: ////////// // computer and window information - static std::string m_title; // title to be displayed - static int m_fullscreen; // fullscreen (1) or not (0!) - static int - m_menuBar; // hide (0), show(1), hide but autoshow(-1) - static int m_secondscreen; // set the second screen - static int m_height; // window height - static int m_width; // window width - static int - m_w; // the real window width (reported by gemCreateWindow()) - static int m_h; // the real window height - static int m_xoffset; // window offset (x) - static int m_yoffset; // window offset (y) - - static int m_border; // window border - static int m_stereo; // stereoscopic - - static int - m_profile; // off(0), on(1), w/o image caching(2) - static int m_rendering; - - static float m_fog; // fog density - enum FOG_TYPE - { FOG_OFF = 0, FOG_LINEAR, FOG_EXP, FOG_EXP2 }; - static FOG_TYPE m_fogMode; // what kind of fog we have - static GLfloat m_fogColor[4]; // colour of the fog - static float m_fogStart; // start of the linear fog - static float m_fogEnd; // start of the linear fog - - static float - m_motionBlur; // motion-blur factor in double-buffer mode - - static float fps; - static int fsaa; - static bool pleaseDestroy; + static std::string m_title; // title to be displayed + static int m_fullscreen; // fullscreen (1) or not (0!) + static int m_menuBar; // hide (0), show(1), hide but autoshow(-1) + static int m_secondscreen; // set the second screen + static int m_height; // window height + static int m_width; // window width + static int m_w; // the real window width (reported by gemCreateWindow()) + static int m_h; // the real window height + static int m_xoffset; // window offset (x) + static int m_yoffset; // window offset (y) + + static int m_border; // window border + static int m_stereo; // stereoscopic + + static int m_profile; // off(0), on(1), w/o image caching(2) + static int m_rendering; + + static float m_fog; // fog density + enum FOG_TYPE { FOG_OFF = 0, FOG_LINEAR, FOG_EXP, FOG_EXP2 }; + static FOG_TYPE m_fogMode; // what kind of fog we have + static GLfloat m_fogColor[4]; // colour of the fog + static float m_fogStart; // start of the linear fog + static float m_fogEnd; // start of the linear fog + + static float m_motionBlur; // motion-blur factor in double-buffer mode + + static float fps; + static int fsaa; + static bool pleaseDestroy; #ifndef GEM_MULTICONTEXT ////////// @@ -212,44 +207,42 @@ class GEM_EXTERN GemMan // This is current rendering window information // The window is created and destroyed by the user, so // if there is no window, this will contain NULL pointers. - static WindowInfo &getWindowInfo(void); + static WindowInfo &getWindowInfo(void); ////////// // Changing these variables is likely to crash GEM // This is constant rendering window information // This window is always available (although not visible) - static WindowInfo &getConstWindowInfo(void); + static WindowInfo &getConstWindowInfo(void); #endif /* GEM_MULTICONTEXT */ - static int createConstWindow(const char* disp = 0); + static int createConstWindow(const char* disp = 0); // gemwin is allowed to modifying "global" window attributes friend class gemwin; friend class gem::Context; - static GLfloat m_clear_color[4]; // the frame buffer clear - static GLbitfield m_clear_mask; // the clear bitmask - static GLfloat m_mat_ambient[4]; // default ambient material - static GLfloat m_mat_specular[4]; // default specular material - static GLfloat m_mat_shininess; // default shininess material + static GLfloat m_clear_color[4]; // the frame buffer clear + static GLbitfield m_clear_mask; // the clear bitmask + static GLfloat m_mat_ambient[4]; // default ambient material + static GLfloat m_mat_specular[4]; // default specular material + static GLfloat m_mat_shininess; // default shininess material - static GLfloat m_stereoSep; // stereo separation - static GLfloat m_stereoFocal; // distance to focal point - static bool - m_stereoLine; // draw a line between 2 stereo-screens + static GLfloat m_stereoSep; // stereo separation + static GLfloat m_stereoFocal; // distance to focal point + static bool m_stereoLine; // draw a line between 2 stereo-screens - static double - m_lastRenderTime; // the time of the last rendered frame + static double m_lastRenderTime; // the time of the last rendered frame // gemwin should not touch the following member variables and member functions - static int m_windowState; - static int m_windowNumber; - static int m_windowContext; - static int m_cursor; - static int m_topmost; - - static void windowInit(void); - static void windowCleanup(void); - static void resetValues(void); + static int m_windowState; + static int m_windowNumber; + static int m_windowContext; + static int m_cursor; + static int m_topmost; + + static void windowInit(void); + static void windowCleanup(void); + static void resetValues(void); static void resizeCallback(int xsize, int ysize, void*); static void dispatchWinmessCallback(void *owner); diff --git a/src/Gem/PixConvert.cpp b/src/Gem/PixConvert.cpp index b2bcfecde..79467d51f 100644 --- a/src/Gem/PixConvert.cpp +++ b/src/Gem/PixConvert.cpp @@ -47,6 +47,8 @@ YVYU */ +#define Y 0 + #define RGB 0,1,2 #define BGR 2,1,0 #define RGBA 0,1,2,3 @@ -64,7 +66,7 @@ #undef CONVERTER_MARK #if GEM_DEBUG_PIXCONVERT # include "m_pd.h" -# define CONVERTER_MARK() verbose(1, "%s(%ux%u)", __FUNCTION__, (unsigned int)width, (unsigned int)height) +# define CONVERTER_MARK() logpost(0, 3+1, "%s(%ux%u)", __FUNCTION__, (unsigned int)width, (unsigned int)height) #else # define CONVERTER_MARK() 0 #endif @@ -146,7 +148,7 @@ namespace { if(inR == outR && inG == outG && inB == outB && inA == outA) { if(indata != outdata) - memcpy(outdata, indata, width*height*4); + memcpy(outdata, indata, size*4); return; } @@ -179,6 +181,13 @@ namespace { } } + template + static void four_to_four_2( + const unsigned char*indata, unsigned char*outdata, size_t width, size_t height) { + four_to_four(indata, outdata, width>>1, height); + } + /* Y -> ... */ template ... */ - template + template static void yuv4_to_y( const unsigned char*indata, unsigned char*outdata, size_t width, size_t height) { size_t size = (width*height)>>1; @@ -303,12 +312,12 @@ namespace { template static void yuv420p_to_yuv4( - const unsigned char*Y, const unsigned char*U, const unsigned char*V, + const unsigned char*Y_, const unsigned char*U, const unsigned char*V, unsigned char*outdata, size_t width, size_t height) { unsigned char *pixels1=outdata; unsigned char *pixels2=pixels1+width*2; - const unsigned char*py1=Y; - const unsigned char*py2=Y+width; // plane_1 is luminance (csize==1) + const unsigned char*py1=Y_; + const unsigned char*py2=Y_+width; // plane_1 is luminance (csize==1) const unsigned char*pu=U; const unsigned char*pv=V; int row=height>>1; @@ -342,18 +351,19 @@ namespace { template static void yuv420p_to_rgb3( - const unsigned char*Y, const unsigned char*U, const unsigned char*V, + const unsigned char*Y_, const unsigned char*U, const unsigned char*V, unsigned char*outdata, const size_t width, const size_t height) { - - const unsigned char*py1=Y; - const unsigned char*py2=Y+width; // plane_1 is luminance (csize==1) + const unsigned char*py1=Y_; + const unsigned char*py2=Y_+width; // plane_1 is luminance (csize==1) const unsigned char*pu=U; const unsigned char*pv=V; unsigned char*pixels1=outdata; unsigned char*pixels2=outdata+width*3; + const size_t rows = height>>1; + const size_t cols = width>>1; - for(int row=0; row<(width>>1); row++) { - for(int col=0; col<(height>>1); col++) { + for(int row=0; row static void yuv420p_to_rgb4( - const unsigned char*Y, const unsigned char*U, const unsigned char*V, + const unsigned char*Y_, const unsigned char*U, const unsigned char*V, unsigned char*outdata, size_t width, size_t height) { - const unsigned char*py1=Y; - const unsigned char*py2=py1+width; // plane_1 is luminance (csize==1) + const unsigned char*py1=Y_; + const unsigned char*py2=Y_+width; // plane_1 is luminance (csize==1) const unsigned char*pu=U; const unsigned char*pv=V; unsigned char*pixels1=outdata; - unsigned char*pixels2=outdata+width*3; + unsigned char*pixels2=outdata+width*4; + const size_t rows = height>>1; + const size_t cols = width>>1; - for(int row=0; row<(width>>1); row++) { - for(int col=0; col<(height>>1); col++) { + for(int row=0; row> 8); pixels1[outB] = CLAMP((y + uv_b) >> 8); pixels1[outA] = 255; // a - pixels1+=3; + pixels1+=4; // 1st row - 2nd pixel y=YUV2RGB_11*(*py1++ -Y_OFFSET); @@ -431,7 +443,7 @@ namespace { pixels1[outG] = CLAMP((y + uv_g) >> 8); pixels1[outB] = CLAMP((y + uv_b) >> 8); pixels1[outA] = 255; // a - pixels1+=3; + pixels1+=4; // 2nd row - 1st pixel y=YUV2RGB_11*(*py2++ -Y_OFFSET); @@ -439,7 +451,7 @@ namespace { pixels2[outG] = CLAMP((y + uv_g) >> 8); pixels2[outB] = CLAMP((y + uv_b) >> 8); pixels2[outA] = 255; // a - pixels2+=3; + pixels2+=4; // 2nd row - 2nd pixel y=YUV2RGB_11*(*py2++ -Y_OFFSET); @@ -447,11 +459,11 @@ namespace { pixels2[outG] = CLAMP((y + uv_g) >> 8); pixels2[outB] = CLAMP((y + uv_b) >> 8); pixels2[outA] = 255; // a - pixels2+=3; + pixels2+=4; } /* need to skip 1 row, as we keep track of even and odd rows separately */ - pixels1+=width*2; - pixels2+=width*2; + pixels1+=width*4; + pixels2+=width*4; py1+=width*1; py2+=width*1; } @@ -460,7 +472,7 @@ namespace { /* RGB3 -> ... */ - template + template static void rgb3_to_y(const unsigned char*indata, unsigned char*outdata, size_t width, size_t height) { size_t size = width*height; @@ -532,7 +544,7 @@ namespace { /* RGB4 -> ... */ - template + template static void rgb4_to_y(const unsigned char*indata, unsigned char*outdata, size_t width, size_t height) { size_t size = width*height; @@ -574,13 +586,13 @@ namespace { namespace { template static void i420ps16_to_rgb3( - const short*Y, const short*U, const short*V, + const short*Y_, const short*U, const short*V, unsigned char*outdata, const size_t width, const size_t height) { unsigned char *pixels1=outdata; unsigned char *pixels2=outdata+width*3; - const short*py1=Y; - const short*py2=Y+width; // plane_1 is luminance (csize==1) + const short*py1=Y_; + const short*py2=Y_+width; // plane_1 is luminance (csize==1) const short*pv=V;//(format==GL_BGR)?V:U; const short*pu=U;//(format==GL_RGB)?V:U; @@ -636,13 +648,13 @@ namespace { } template static void i420ps16_to_rgb4( - const short*Y, const short*U, const short*V, + const short*Y_, const short*U, const short*V, unsigned char*outdata, const size_t width, const size_t height) { unsigned char *pixels1=outdata; unsigned char *pixels2=outdata+width*4; - const short*py1=Y; // odd row - const short*py2=Y+width;// even row + const short*py1=Y_; // odd row + const short*py2=Y_+width;// even row const short*pv=V; const short*pu=U; @@ -699,12 +711,12 @@ namespace { } template static void i420ps16_to_yuv4( - const short*Y, const short*U, const short*V, + const short*Y_, const short*U, const short*V, unsigned char*outdata, size_t width, size_t height) { unsigned char *pixels1=outdata; unsigned char *pixels2=pixels1+width*2; - const short*py1=Y; - const short*py2=Y+width; // plane_1 is luminance (csize==1) + const short*py1=Y_; + const short*py2=Y_+width; // plane_1 is luminance (csize==1) const short*pu=U; const short*pv=V; int row=height>>1; @@ -795,7 +807,16 @@ namespace { } } -/* the actual converter instances */ +/* the actual converter instances. + * these macros create to() functions (e.g. RGBAtoUYYV), + * instantiating the named template. + * all converters use PACKED formats (except where stated otherwise + */ + +/* generic converter: CONVERT(ARGB, UYVY, rgb4_to_yuv4, unsigned char); + * converts from (ushort*)ARGB to (uchar*)UYVY using rgb4_to_yuv4 + * the type 'T' must be 'unsigned char' (it's only there for symmetry) + */ #define CONVERT(SRC, DST, templ, T) \ void SRC##to##DST( \ const T*indata, unsigned char*outdata, \ @@ -803,6 +824,10 @@ namespace { CONVERTER_MARK(); \ templ(indata, outdata, width, height); \ } +/* same as CONVERTER, but inputdata T can be non-(uchar*) + * at the expense that 'templ' can only convert from 'SRC'. + * the 'shift' parameter is 8*(sizeof(T)-sizeof(unsigned char*)) + */ #define CONVERT0(SRC, DST, templ, T, shift) \ void SRC##to##DST( \ const T*indata, unsigned char*outdata, \ @@ -810,19 +835,15 @@ namespace { CONVERTER_MARK(); \ templ(indata, outdata, width, height); \ } -#define CONVERTy(SRC, templ, T) \ - void SRC##toY( \ - const T*indata, unsigned char*outdata, \ - size_t width, size_t height) { \ - CONVERTER_MARK(); \ - templ(indata, outdata, width, height); \ - } +/* planar->packed converter: CONVERTp(I420, UYVY, yuv420p_to_yuv4, unsigned char); + * converts from (uchar*)I420 (3planes) to (uchar*)UYVY (1plane) using yuv420p_to_yuv4 + */ #define CONVERTp(SRC, DST, templ, T) \ void SRC##to##DST( \ - const T*Y, const T*U, const T*V, unsigned char*outdata, \ + const T*Y_, const T*U, const T*V, unsigned char*outdata, \ size_t width, size_t height) { \ CONVERTER_MARK(); \ - templ(Y, U, V, outdata, width, height); \ + templ(Y_, U, V, outdata, width, height); \ } /* GRAY -> */ @@ -864,11 +885,11 @@ CONVERT0(Yu16, ARGB, y_to_rgb4, unsigned short, 8); /* YUV420planar -> */ -void I420toY(const unsigned char*Y, const unsigned char*U, const unsigned char*V, +void I420toY(const unsigned char*Y_, const unsigned char*U, const unsigned char*V, unsigned char*outdata, size_t width, size_t height) { CONVERTER_MARK(); - if(Y != outdata) - memcpy(outdata, Y, width*height); + if(Y_ != outdata) + memcpy(outdata, Y_, width*height); } CONVERTp(I420, UYVY, yuv420p_to_yuv4, unsigned char); @@ -882,12 +903,12 @@ CONVERTp(I420, BGRA, yuv420p_to_rgb4, unsigned char); CONVERTp(I420, ABGR, yuv420p_to_rgb4, unsigned char); CONVERTp(I420, ARGB, yuv420p_to_rgb4, unsigned char); -void I420S16toY(const short*Y, const short*U, const short*V, +void I420S16toY(const short*Y_, const short*U, const short*V, unsigned char*outdata, size_t width, size_t height) { CONVERTER_MARK(); size_t size = width*height; while(size--) { - *outdata++ = ((*Y++)>>8) + Y_OFFSET; + *outdata++ = ((*Y_++)>>8) + Y_OFFSET; } } CONVERTp(I420S16, UYVY, i420ps16_to_yuv4, short); @@ -902,11 +923,11 @@ CONVERTp(I420S16, ARGB, i420ps16_to_rgb4, short); CONVERTp(I420S16, ABGR, i420ps16_to_rgb4, short); /* UYVY -> */ -CONVERTy(UYVY, yuv4_to_y, unsigned char); -CONVERT(UYVY, UYVY, four_to_four, unsigned char); -CONVERT(UYVY, VYUY, four_to_four, unsigned char); -CONVERT(UYVY, YVYU, four_to_four, unsigned char); -CONVERT(UYVY, YUYV, four_to_four, unsigned char); +CONVERT(UYVY, Y, yuv4_to_y, unsigned char); +CONVERT(UYVY, UYVY, four_to_four_2, unsigned char); +CONVERT(UYVY, VYUY, four_to_four_2, unsigned char); +CONVERT(UYVY, YVYU, four_to_four_2, unsigned char); +CONVERT(UYVY, YUYV, four_to_four_2, unsigned char); CONVERT(UYVY, RGB , yuv4_to_rgb3, unsigned char); CONVERT(UYVY, BGR , yuv4_to_rgb3, unsigned char); CONVERT(UYVY, RGBA, yuv4_to_rgb4, unsigned char); @@ -914,11 +935,11 @@ CONVERT(UYVY, BGRA, yuv4_to_rgb4, unsigned char); CONVERT(UYVY, ABGR, yuv4_to_rgb4, unsigned char); CONVERT(UYVY, ARGB, yuv4_to_rgb4, unsigned char); -CONVERTy(VYUY, yuv4_to_y, unsigned char); -CONVERT(VYUY, UYVY, four_to_four, unsigned char); -CONVERT(VYUY, VYUY, four_to_four, unsigned char); -CONVERT(VYUY, YVYU, four_to_four, unsigned char); -CONVERT(VYUY, YUYV, four_to_four, unsigned char); +CONVERT(VYUY, Y, yuv4_to_y, unsigned char); +CONVERT(VYUY, UYVY, four_to_four_2, unsigned char); +CONVERT(VYUY, VYUY, four_to_four_2, unsigned char); +CONVERT(VYUY, YVYU, four_to_four_2, unsigned char); +CONVERT(VYUY, YUYV, four_to_four_2, unsigned char); CONVERT(VYUY, RGB , yuv4_to_rgb3, unsigned char); CONVERT(VYUY, BGR , yuv4_to_rgb3, unsigned char); CONVERT(VYUY, RGBA, yuv4_to_rgb4, unsigned char); @@ -926,11 +947,11 @@ CONVERT(VYUY, BGRA, yuv4_to_rgb4, unsigned char); CONVERT(VYUY, ABGR, yuv4_to_rgb4, unsigned char); CONVERT(VYUY, ARGB, yuv4_to_rgb4, unsigned char); -CONVERTy(YUYV, yuv4_to_y, unsigned char); -CONVERT(YUYV, UYVY, four_to_four, unsigned char); -CONVERT(YUYV, VYUY, four_to_four, unsigned char); -CONVERT(YUYV, YVYU, four_to_four, unsigned char); -CONVERT(YUYV, YUYV, four_to_four, unsigned char); +CONVERT(YUYV, Y, yuv4_to_y, unsigned char); +CONVERT(YUYV, UYVY, four_to_four_2, unsigned char); +CONVERT(YUYV, VYUY, four_to_four_2, unsigned char); +CONVERT(YUYV, YVYU, four_to_four_2, unsigned char); +CONVERT(YUYV, YUYV, four_to_four_2, unsigned char); CONVERT(YUYV, RGB , yuv4_to_rgb3, unsigned char); CONVERT(YUYV, BGR , yuv4_to_rgb3, unsigned char); CONVERT(YUYV, RGBA, yuv4_to_rgb4, unsigned char); @@ -938,11 +959,11 @@ CONVERT(YUYV, BGRA, yuv4_to_rgb4, unsigned char); CONVERT(YUYV, ABGR, yuv4_to_rgb4, unsigned char); CONVERT(YUYV, ARGB, yuv4_to_rgb4, unsigned char); -CONVERTy(YVYU, yuv4_to_y, unsigned char); -CONVERT(YVYU, UYVY, four_to_four, unsigned char); -CONVERT(YVYU, VYUY, four_to_four, unsigned char); -CONVERT(YVYU, YVYU, four_to_four, unsigned char); -CONVERT(YVYU, YUYV, four_to_four, unsigned char); +CONVERT(YVYU, Y, yuv4_to_y, unsigned char); +CONVERT(YVYU, UYVY, four_to_four_2, unsigned char); +CONVERT(YVYU, VYUY, four_to_four_2, unsigned char); +CONVERT(YVYU, YVYU, four_to_four_2, unsigned char); +CONVERT(YVYU, YUYV, four_to_four_2, unsigned char); CONVERT(YVYU, RGB , yuv4_to_rgb3, unsigned char); CONVERT(YVYU, BGR , yuv4_to_rgb3, unsigned char); CONVERT(YVYU, RGBA, yuv4_to_rgb4, unsigned char); @@ -976,7 +997,7 @@ CONVERT0(RGB16, BGRA, RGB16_to_rgb4, unsigned char, 0); CONVERT0(RGB16, ABGR, RGB16_to_rgb4, unsigned char, 0); CONVERT0(RGB16, ARGB, RGB16_to_rgb4, unsigned char, 0); -CONVERTy(RGB, rgb3_to_y, unsigned char); +CONVERT(RGB, Y, rgb3_to_y, unsigned char); CONVERT(RGB, UYVY, rgb3_to_yuv4, unsigned char); CONVERT(RGB, VYUY, rgb3_to_yuv4, unsigned char); CONVERT(RGB, YVYU, rgb3_to_yuv4, unsigned char); @@ -988,7 +1009,7 @@ CONVERT(RGB, ABGR, rgb3_to_rgb4, unsigned char); CONVERT(RGB, BGRA, rgb3_to_rgb4, unsigned char); CONVERT(RGB, ARGB, rgb3_to_rgb4, unsigned char); -CONVERTy(BGR, rgb3_to_y, unsigned char); +CONVERT(BGR, Y, rgb3_to_y, unsigned char); CONVERT(BGR, UYVY, rgb3_to_yuv4, unsigned char); CONVERT(BGR, VYUY, rgb3_to_yuv4, unsigned char); CONVERT(BGR, YVYU, rgb3_to_yuv4, unsigned char); @@ -1001,7 +1022,7 @@ CONVERT(BGR, BGRA, rgb3_to_rgb4, unsigned char); CONVERT(BGR, ARGB, rgb3_to_rgb4, unsigned char); /* RGBA -> */ -CONVERTy(RGBA, rgb4_to_y, unsigned char); +CONVERT(RGBA, Y, rgb4_to_y, unsigned char); CONVERT(RGBA, UYVY, rgb4_to_yuv4, unsigned char); CONVERT(RGBA, VYUY, rgb4_to_yuv4, unsigned char); CONVERT(RGBA, YVYU, rgb4_to_yuv4, unsigned char); @@ -1013,7 +1034,7 @@ CONVERT(RGBA, ABGR, four_to_four, unsigned char); CONVERT(RGBA, BGRA, four_to_four, unsigned char); CONVERT(RGBA, ARGB, four_to_four, unsigned char); -CONVERTy(BGRA, rgb4_to_y, unsigned char); +CONVERT(BGRA, Y, rgb4_to_y, unsigned char); CONVERT(BGRA, UYVY, rgb4_to_yuv4, unsigned char); CONVERT(BGRA, VYUY, rgb4_to_yuv4, unsigned char); CONVERT(BGRA, YVYU, rgb4_to_yuv4, unsigned char); @@ -1025,7 +1046,7 @@ CONVERT(BGRA, ABGR, four_to_four, unsigned char); CONVERT(BGRA, BGRA, four_to_four, unsigned char); CONVERT(BGRA, ARGB, four_to_four, unsigned char); -CONVERTy(ABGR, rgb4_to_y, unsigned char); +CONVERT(ABGR, Y, rgb4_to_y, unsigned char); CONVERT(ABGR, UYVY, rgb4_to_yuv4, unsigned char); CONVERT(ABGR, VYUY, rgb4_to_yuv4, unsigned char); CONVERT(ABGR, YVYU, rgb4_to_yuv4, unsigned char); @@ -1037,7 +1058,7 @@ CONVERT(ABGR, ABGR, four_to_four, unsigned char); CONVERT(ABGR, BGRA, four_to_four, unsigned char); CONVERT(ABGR, ARGB, four_to_four, unsigned char); -CONVERTy(ARGB, rgb4_to_y, unsigned char); +CONVERT(ARGB, Y, rgb4_to_y, unsigned char); CONVERT(ARGB, UYVY, rgb4_to_yuv4, unsigned char); CONVERT(ARGB, VYUY, rgb4_to_yuv4, unsigned char); CONVERT(ARGB, YVYU, rgb4_to_yuv4, unsigned char); diff --git a/src/Gem/Settings.cpp b/src/Gem/Settings.cpp index 79b98fe6c..1d225cab5 100644 --- a/src/Gem/Settings.cpp +++ b/src/Gem/Settings.cpp @@ -126,12 +126,12 @@ struct PIMPL { r=binbuf_read(bb, (char*)filename, const_cast(gem::files::expandEnv(dirname, true).c_str()), 1); if(0==r) { - verbose(1, "found Gem-settings '%s' in '%s'", filename, dirname); + logpost(0, 3+1, "found Gem-settings '%s' in '%s'", filename, dirname); } } else { r=binbuf_read_via_path(bb, (char*)filename, (char*)".", 1); if(0==r) { - verbose(1, "found Gem-settings '%s'", filename); + logpost(0, 3+1, "found Gem-settings '%s'", filename); } } diff --git a/src/Gem/Setup.cpp b/src/Gem/Setup.cpp index ab5107568..ec4754761 100644 --- a/src/Gem/Setup.cpp +++ b/src/Gem/Setup.cpp @@ -154,11 +154,11 @@ static bool checkVersion(const char*dirname, const char*filename, if(!result) { pd_error(0, "GEM: binary/abstractions version mismatch!"); pd_error(0, "GEM: continue at your own risk..."); - verbose(0, "GEM: binary is %d.%d, but Gem abstractions are %s", + logpost(0, 3+0, "GEM: binary is %d.%d, but Gem abstractions are %s", GEM_VERSION_MAJOR, GEM_VERSION_MINOR, gotversion.c_str()); - verbose(0, + logpost(0, 3+0, "GEM: This usually means that you have a path to another version of Gem stored in your startup preferences"); - verbose(0, "GEM: Consider removing the wrong path!"); + logpost(0, 3+0, "GEM: Consider removing the wrong path!"); } return result; @@ -199,7 +199,7 @@ static void addownpath(const char*filename) buf[MAXPDSTRING-1]=0; if ((fd=_open(buf, flags))>=0) { _close(fd); - verbose(1, "GEM: trying to add Gem path '%s' to search-paths", mypath); + logpost(0, 3+1, "GEM: trying to add Gem path '%s' to search-paths", mypath); gem::RTE::RTE*rte=gem::RTE::RTE::getRuntimeEnvironment(); if(rte) { success = rte->addSearchPath(mypath, 0); @@ -251,23 +251,23 @@ void setup() firsttime = false; // startup GEM post("GEM: Graphics Environment for Multimedia"); - verbose(-1, "GEM: ver: %s", GemVersion::versionString()); - verbose(-1, "GEM: compiled " BUILD_DATE ); - verbose(-1, "GEM: maintained by %s", GEM_MAINTAINER); - verbose(-1, "GEM: Authors :\tMark Danks (original version)"); + logpost(0, 3-1, "GEM: ver: %s", GemVersion::versionString()); + logpost(0, 3-1, "GEM: compiled " BUILD_DATE ); + logpost(0, 3-1, "GEM: maintained by %s", GEM_MAINTAINER); + logpost(0, 3-1, "GEM: Authors :\tMark Danks (original version)"); for(unsigned int i=0; inext; - verbose(4, "registering Gem object: %s", l->name); + logpost(0, 3+4, "registering Gem object: %s", l->name); l->setup(); delete l; l = next; diff --git a/src/Gem/State.h b/src/Gem/State.h index 34f69201a..4b68a2ae5 100644 --- a/src/Gem/State.h +++ b/src/Gem/State.h @@ -215,7 +215,7 @@ class GEM_EXTERN GemState } return true; } catch (gem::bad_any_cast&x) { - ::verbose(3, "%s:%d [%s] %d :: %s", __FILE__, __LINE__, __FUNCTION__, key, + ::logpost(0, 3+3, "%s:%d [%s] %d :: %s", __FILE__, __LINE__, __FUNCTION__, key, x.what()); // type problem } diff --git a/src/Gem/model.cpp b/src/Gem/model.cpp index 852bddaf4..7b20b11e4 100644 --- a/src/Gem/model.cpp +++ b/src/Gem/model.cpp @@ -146,8 +146,16 @@ namespace } else { vTexCoordsUV = vTexCoordsLinear; } - } + + void destroy() + { + vertices.destroy(); + normals.destroy(); + colors.destroy(); + texcoords.destroy(); + } + void update(enum gem::modelGL::texturetype t, float texW, float texH) { vertices.update(size, vVertices.data()); @@ -292,6 +300,12 @@ namespace gem { delete m_pimpl; } + void modelGL::destroy(void) { + for (auto& m: m_pimpl->mesh) { + m.destroy(); + } + } + bool modelGL::update(void) { m_pimpl->update = false; if(true) { @@ -322,6 +336,7 @@ namespace gem { } render(groups); } + void modelGL::render(std::vector&meshes) { if(m_pimpl->update) update(); diff --git a/src/Gem/model.h b/src/Gem/model.h index 430d2ac56..73d6846c6 100644 --- a/src/Gem/model.h +++ b/src/Gem/model.h @@ -35,7 +35,8 @@ namespace gem modelGL(gem::plugins::modelloader&loader); virtual ~modelGL(void); - + /* destroy VBOs */ + void destroy(void); /* update data */ bool update(void); /* render the model in the current openGL context */ diff --git a/src/Geos/GemSplash.cpp b/src/Geos/GemSplash.cpp index 43f98bc18..03bb02e92 100644 --- a/src/Geos/GemSplash.cpp +++ b/src/Geos/GemSplash.cpp @@ -13,6 +13,7 @@ // WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. // ///////////////////////////////////////////////////////// +#define HELPSYMBOL "Gem" #include "GemSplash.h" @@ -59,4 +60,28 @@ void GemSplash :: obj_setupCallback(t_class *classPtr) { class_addcreator(reinterpret_cast(create_GemSplash), gensym("Gem"), A_GIMME, A_NULL); + + /* debugging GL errors */ + struct _CallbackClass_debugGL { + static void callback(void*data, t_float v0) + { + static bool sending = false; + if(sending) + return; + sending = true; + t_symbol*s = gensym("__gemBase"); + if(s->s_thing) { + t_atom a[1]; + SETFLOAT(a+0, v0); + pd_typedmess(s->s_thing, gensym("debugGL"), 1, a); + } + sending = false; + } + explicit _CallbackClass_debugGL (struct _class*c) + { + class_addmethod(c, reinterpret_cast(callback), + gensym("debugGL"), A_FLOAT, A_NULL); + } + }; + _CallbackClass_debugGL _CallbackClassInstance_debugGL (classPtr); } diff --git a/src/Geos/cylinder.cpp b/src/Geos/cylinder.cpp index 0d419539e..16e8016be 100644 --- a/src/Geos/cylinder.cpp +++ b/src/Geos/cylinder.cpp @@ -65,6 +65,43 @@ void cylinder :: renderShape(GemState *state) m_drawType=GL_FILL; } + + GLenum type = m_drawType; + switch(m_drawType) { + case GL_LINE_LOOP: + type=GL_LINE; + break; + case GL_POINTS : + type=GL_POINT; + break; + case GL_DEFAULT_GEM: // default + case GL_POLYGON : + type=GL_FILL; + break; + } +#ifdef GLU_TRUE + switch(m_drawType) { + case GLU_LINE : + type=GL_LINE; + break; + case GLU_POINT: + type=GL_POINT; + break; + case GLU_FILL : + type=GL_FILL; + break; + } +#endif + switch(type) { + case GL_FILL: + case GL_LINE: + case GL_POINT: + break; + default: + error("invalid draw type %d (%d), switching to default %d", m_drawType, type, GL_FILL); + m_drawType = type = GL_FILL; + } + GLdouble da, r, dr, dz; GLfloat x, y, z, nz; GLint i, j; @@ -94,6 +131,9 @@ void cylinder :: renderShape(GemState *state) glPushMatrix(); glTranslatef(0.f, 0.f, -m_size); + glPushAttrib(GL_POLYGON_BIT); + glPolygonMode(GL_FRONT_AND_BACK, type); + // gluCylinder(m_thing, m_size, m_size, m_size * 2, m_numSlices, m_numSlices); da = 2.0 * M_PI / slices; dr = (topRadius - baseRadius) / stacks; @@ -101,107 +141,42 @@ void cylinder :: renderShape(GemState *state) nz = (baseRadius - topRadius) / height; /* Z component of normal vectors */ - if (m_drawType == GL_POINT) { - glBegin(GL_POINTS); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - - z = 0.0; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glVertex3f(x * r, y * r, z); - z += dz; - r += dr; - } - } - glEnd(); - } else if (m_drawType == GL_LINE || m_drawType == GLU_SILHOUETTE) { - /* Draw rings */ - if (m_drawType == GL_LINE) { - z = 0.0; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * r, y * r, z); - } - glEnd(); - z += dz; - r += dr; + GLfloat ds = 1.0 / slices; + GLfloat dt = 1.0 / stacks; + GLfloat t = 0.0; + z = 0.0; + r = baseRadius; + for (j = 0; j < stacks; j++) { + GLfloat s = 0.0; + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= slices; i++) { + GLfloat x, y; + if (i == slices) { + x = sin(0.0); + y = cos(0.0); + } else { + x = sin(i * da); + y = cos(i * da); } - } else { - /* draw one ring at each end */ - if (baseRadius != 0.0) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * baseRadius, y * baseRadius, 0.0); - } - glEnd(); - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * topRadius, y * topRadius, height); - } - glEnd(); + normal3f(x * nsign, y * nsign, nz * nsign); + if(texType) { + glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); } - } - /* draw length lines */ - glBegin(GL_LINES); - for (i = 0; i < slices; i++) { - x = cos(i * da); - y = sin(i * da); + glVertex3f(x * r, y * r, z); normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f(x * baseRadius, y * baseRadius, 0.0); - glVertex3f(x * topRadius, y * topRadius, height); - } + if(texType) { + glTexCoord2f(s*xsize+xsize0, (t + dt)*ysize+ysize0); + } + glVertex3f(x * (r + dr), y * (r + dr), z + dz); + + s += ds; + } /* for slices */ glEnd(); - } else if (m_drawType == GL_FILL) { - GLfloat ds = 1.0 / slices; - GLfloat dt = 1.0 / stacks; - GLfloat t = 0.0; - z = 0.0; - r = baseRadius; - for (j = 0; j < stacks; j++) { - GLfloat s = 0.0; - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - GLfloat x, y; - if (i == slices) { - x = sin(0.0); - y = cos(0.0); - } else { - x = sin(i * da); - y = cos(i * da); - } - normal3f(x * nsign, y * nsign, nz * nsign); - if(texType) { - glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); - } - glVertex3f(x * r, y * r, z); - normal3f(x * nsign, y * nsign, nz * nsign); - if(texType) { - glTexCoord2f(s*xsize+xsize0, (t + dt)*ysize+ysize0); - } - glVertex3f(x * (r + dr), y * (r + dr), z + dz); - - s += ds; - } /* for slices */ - glEnd(); - r += dr; - t += dt; - z += dz; - } /* for stacks */ - } + r += dr; + t += dt; + z += dz; + } /* for stacks */ + glPopAttrib(); glPopMatrix(); } diff --git a/src/Geos/disk.cpp b/src/Geos/disk.cpp index 93af8fb8a..fa0e61e2d 100644 --- a/src/Geos/disk.cpp +++ b/src/Geos/disk.cpp @@ -92,6 +92,43 @@ void disk :: renderShape(GemState *state) m_drawType=GL_FILL; } + + GLenum type = m_drawType; + switch(m_drawType) { + case GL_LINE_LOOP: + type=GL_LINE; + break; + case GL_POINTS : + type=GL_POINT; + break; + case GL_DEFAULT_GEM: // default + case GL_POLYGON : + type=GL_FILL; + break; + } +#ifdef GLU_TRUE + switch(m_drawType) { + case GLU_LINE : + type=GL_LINE; + break; + case GLU_POINT: + type=GL_POINT; + break; + case GLU_FILL : + type=GL_FILL; + break; + } +#endif + switch(type) { + case GL_FILL: + case GL_LINE: + case GL_POINT: + break; + default: + error("invalid draw type %d (%d), switching to default %d", m_drawType, type, GL_FILL); + m_drawType = type = GL_FILL; + } + GLfloat da, dr; /* coverity[dead_error_condition] we might want to play with orientation (FIXME) */ @@ -138,135 +175,58 @@ void disk :: renderShape(GemState *state) GLfloat sa, ca; GLfloat r1 = m_innerRadius; - switch (m_drawType) { - default: - case GL_FILL: { - /* texture of a gluDisk is a cut out of the texture unit square - * x, y in [-m_size, +m_size]; s, t in [0, 1] - * (linear mapping) - */ - GLint l; - for (l = 0; l < loops; l++) { - GLfloat r2 = r1 + dr; - if (!orientation) { - GLint s; - glBegin(GL_QUAD_STRIP); - for (s = 0; s <= m_numSlices; s++) { - GLfloat a=(s == m_numSlices)?0.0:(s * da); - sa = sin(a); - ca = cos(a); - if(texType) { - glTexCoord2f((0.5 + sa * r2 / dtc)*xsize+xsize0, - (0.5 + ca * r2 / dtc)*ysize+ysize0); - } - glVertex2f(r2 * sa, r2 * ca); - if(texType) { - glTexCoord2f((0.5 + sa * r1 / dtc)*xsize+xsize0, - (0.5 + ca * r1 / dtc)*ysize+ysize0); - } - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } else { - GLint s; - glBegin(GL_QUAD_STRIP); - for (s = m_numSlices; s >= 0; s--) { - GLfloat a=(s==m_numSlices)?0.0:s * da; - sa = sin(a); - ca = cos(a); - if(texType) { - glTexCoord2f((0.5 - sa * r2 / dtc)*xsize+xsize0, - (0.5 + ca * r2 / dtc)*ysize+ysize0); - } - glVertex2f(r2 * sa, r2 * ca); - if(texType) { - glTexCoord2f((0.5 - sa * r1 / dtc)*xsize+xsize0, - (0.5 + ca * r1 / dtc)*ysize+ysize0); - } - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - r1 = r2; - } - break; - } - case GL_LINE: { - GLint l, s; - /* draw loops */ - for (l = 0; l <= loops; l++) { - GLfloat r = m_innerRadius + l * dr; - glBegin(GL_LINE_LOOP); - for (s = 0; s < m_numSlices; s++) { - GLfloat a = s * da; - if(texType) { - glTexCoord2f((0.5+r*sin(a)/dtc)*xsize+xsize0, - (0.5+r*cos(a)/dtc)*ysize+ysize0); - } - glVertex2f(r * sin(a), r * cos(a)); - } - glEnd(); - } - /* draw spokes */ - for (s = 0; s < m_numSlices; s++) { - GLfloat a = s * da; - GLfloat x = sin(a); - GLfloat y = cos(a); - glBegin(GL_LINE_STRIP); - for (l = 0; l <= loops; l++) { - GLfloat r = m_innerRadius + l * dr; - if(texType) { - glTexCoord2f((0.5+r*x/dtc)*xsize+xsize0, (0.5+r*y/dtc)*ysize+ysize0); - } - glVertex2f(r * x, r * y); - } - glEnd(); - } - break; - } - case GL_POINT: { - GLint s; - glBegin(GL_POINTS); - for (s = 0; s < m_numSlices; s++) { - GLfloat a = s * da; - GLfloat x = sin(a); - GLfloat y = cos(a); - GLint l; - for (l = 0; l <= loops; l++) { - GLfloat r = m_innerRadius * l * dr; - glVertex2f(r * x, r * y); - if(texType) { - glTexCoord2f((0.5+r*x/dtc)*xsize+xsize0, (0.5+r*y/dtc)*ysize+ysize0); - } - } - } - glEnd(); - break; - } - case GLU_SILHOUETTE: { - if (m_innerRadius != 0.0) { - GLfloat a; - glBegin(GL_LINE_LOOP); - for (a = 0.0; a < 2.0 * M_PI; a += da) { - GLfloat x = m_innerRadius * sin(a); - GLfloat y = m_innerRadius * cos(a); - glVertex2f(x, y); + glPushAttrib(GL_POLYGON_BIT); + glPolygonMode(GL_FRONT_AND_BACK, type); + + /* texture of a gluDisk is a cut out of the texture unit square + * x, y in [-m_size, +m_size]; s, t in [0, 1] + * (linear mapping) + */ + GLint l; + for (l = 0; l < loops; l++) { + GLfloat r2 = r1 + dr; + if (!orientation) { + GLint s; + glBegin(GL_QUAD_STRIP); + for (s = 0; s <= m_numSlices; s++) { + GLfloat a=(s == m_numSlices)?0.0:(s * da); + sa = sin(a); + ca = cos(a); + if(texType) { + glTexCoord2f((0.5 + sa * r2 / dtc)*xsize+xsize0, + (0.5 + ca * r2 / dtc)*ysize+ysize0); + } + glVertex2f(r2 * sa, r2 * ca); + if(texType) { + glTexCoord2f((0.5 + sa * r1 / dtc)*xsize+xsize0, + (0.5 + ca * r1 / dtc)*ysize+ysize0); + } + glVertex2f(r1 * sa, r1 * ca); } glEnd(); - } - { - GLfloat a; - glBegin(GL_LINE_LOOP); - for (a = 0; a < 2.0 * M_PI; a += da) { - GLfloat x = m_size * sin(a); - GLfloat y = m_size * cos(a); - glVertex2f(x, y); + } else { + GLint s; + glBegin(GL_QUAD_STRIP); + for (s = m_numSlices; s >= 0; s--) { + GLfloat a=(s==m_numSlices)?0.0:s * da; + sa = sin(a); + ca = cos(a); + if(texType) { + glTexCoord2f((0.5 - sa * r2 / dtc)*xsize+xsize0, + (0.5 + ca * r2 / dtc)*ysize+ysize0); + } + glVertex2f(r2 * sa, r2 * ca); + if(texType) { + glTexCoord2f((0.5 - sa * r1 / dtc)*xsize+xsize0, + (0.5 + ca * r1 / dtc)*ysize+ysize0); + } + glVertex2f(r1 * sa, r1 * ca); } glEnd(); } - break; - } + r1 = r2; } + glPopAttrib(); } ///////////////////////////////////////////////////////// diff --git a/src/Geos/gemvertexbuffer.cpp b/src/Geos/gemvertexbuffer.cpp index dc554065a..af4ac1d19 100644 --- a/src/Geos/gemvertexbuffer.cpp +++ b/src/Geos/gemvertexbuffer.cpp @@ -475,11 +475,13 @@ void gemvertexbuffer :: copyArray(const std::string&tab_name, t_word *vec; const bool interleaved = (0==dimen); - if(offset>vb.size) { +/* + if(offset>vb.size*vb.dimen) { // should this test be diferent for interleaved or not copy? error("offset %d is bigger than vertexbuffer size (%d) for %s", offset, vb.size, tab_name.c_str()); return; } - + // ch 2025 : since the vb is resized before copying the element, this test look useless to me +*/ t_symbol*s=gensym(tab_name.c_str()); pd_findbyclass(s, garray_class); if (!(a = (t_garray *)pd_findbyclass(s, garray_class))) { @@ -563,7 +565,7 @@ void gemvertexbuffer :: attribute(t_symbol*s, int argc, t_atom *argv) if((argc!=2 && argc!=3) || (argv[0].a_type!=A_SYMBOL || argv[1].a_type!=A_SYMBOL)) { - error("illegal arguments to 'attribute': must be
[]"); + error("illegal arguments to 'attribute': must be
[]"); return; } if(argc==3) { @@ -571,7 +573,7 @@ void gemvertexbuffer :: attribute(t_symbol*s, int argc, t_atom *argv) tab_offset=atom_getfloat(argv+2); resize=false; } else { - error("illegal arguments to 'attribute': must be
[]"); + error("illegal arguments to 'attribute': must be
[]"); return; } } diff --git a/src/Geos/model.cpp b/src/Geos/model.cpp index ad6c8b45c..093ac2a4b 100644 --- a/src/Geos/model.cpp +++ b/src/Geos/model.cpp @@ -47,7 +47,7 @@ model :: model(t_symbol* filename) , m_drawType(GL_TRIANGLES) , m_blend(false) , m_linewidth(1.0) - , m_texType(gem::modelGL::texturetype::LINEAR) + , m_texType(gem::modelGL::texturetype::UV) , m_rescale(gem::modelGL::rescale::NORMALIZE_CENTER) , m_useMaterial(false) { @@ -444,16 +444,9 @@ void model :: drawMess(std::string name) ///////////////////////////////////////////////////////// void model :: backendMess(t_symbol*s, int argc, t_atom*argv) { -#if 0 - gem::any value=ids; - m_writeprops.set("backends", value); - applyProperties(); -#endif - int i; - m_backends.clear(); if(argc) { - for(i=0; ia_type) { t_symbol* b=atom_getsymbol(argv+i); m_backends.push_back(b->s_name); @@ -464,24 +457,25 @@ void model :: backendMess(t_symbol*s, int argc, t_atom*argv) } else { /* no backend requested, just enumerate them */ if(m_loader) { + const std::string sel = s->s_name; std::vectoratoms; gem::any value; gem::Properties props; std::vector backends; - props.set("backends", value); + props.set("_backends", value); m_loader->getProperties(props); - if(props.type("backends")!=gem::Properties::UNSET) { - props.get("backends", backends); + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); } atoms.clear(); atoms.push_back(value=(int)(backends.size())); - m_infoOut.send("loaders", atoms); + m_infoOut.send(sel+"s", atoms); if(!backends.empty()) { - for(i=0; iupdate(); } + +void model :: stopRendering() +{ + if(m_loaded) + m_loaded->destroy(); +} + + ///////////////////////////////////////////////////////// // render // @@ -600,6 +602,7 @@ void model :: obj_setupCallback(t_class *classPtr) CPPEXTERN_MSG1(classPtr, "group", groupMess, int); CPPEXTERN_MSG (classPtr, "groups", groupsMess); CPPEXTERN_MSG (classPtr, "loader", backendMess); + CPPEXTERN_MSG (classPtr, "backend", backendMess); CPPEXTERN_MSG (classPtr, "set", setPropertyMess); CPPEXTERN_MSG (classPtr, "get", getPropertyMess); diff --git a/src/Geos/model.h b/src/Geos/model.h index 90418b407..a2b825db3 100644 --- a/src/Geos/model.h +++ b/src/Geos/model.h @@ -100,6 +100,7 @@ class GEM_EXTERN model : public GemBase ////////// virtual void render(GemState *state); virtual void startRendering(); + virtual void stopRendering(); gem::plugins::modelloader*m_loader; gem::modelGL*m_loaded; diff --git a/src/Geos/multimodel.cpp b/src/Geos/multimodel.cpp index 3f3f683a4..ecd1a4da8 100644 --- a/src/Geos/multimodel.cpp +++ b/src/Geos/multimodel.cpp @@ -206,16 +206,9 @@ void multimodel :: drawMess(std::string name) ///////////////////////////////////////////////////////// void multimodel :: backendMess(t_symbol*s, int argc, t_atom*argv) { -#if 0 - gem::any value=ids; - m_properties.set("backends", value); - applyProperties(); -#endif - int i; - m_backends.clear(); if(argc) { - for(i=0; ia_type) { t_symbol* b=atom_getsymbol(argv+i); m_backends.push_back(b->s_name); @@ -226,24 +219,25 @@ void multimodel :: backendMess(t_symbol*s, int argc, t_atom*argv) } else { /* no backend requested, just enumerate them */ if(m_loader) { + const std::string sel = s->s_name; std::vectoratoms; gem::any value; gem::Properties props; std::vector backends; - props.set("backends", value); + props.set("_backends", value); m_loader->getProperties(props); - if(props.type("backends")!=gem::Properties::UNSET) { - props.get("backends", backends); + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); } atoms.clear(); atoms.push_back(value=(int)(backends.size())); - m_infoOut.send("loaders", atoms); + m_infoOut.send(sel+"s", atoms); if(!backends.empty()) { - for(i=0; i0)?m_numStacks:10; GLfloat rho, drho, theta, dtheta; - GLfloat s, t, ds, dt; GLint i, j, imin, imax; GLenum orientation = true; /* GLU_INSIDE; */ /* coverity[dead_error_condition] we might want to play with orientation (FIXME) */ GLfloat nsign = (orientation)?-1.0:1.0; - GLfloat xsize = 1.0, xsize0 = 0.0; - GLfloat ysize = 1.0, ysize0 = 0.0; - TexCoord*texCoords=NULL; int texNum=0; int texType=0; @@ -82,11 +78,6 @@ void sphere :: createSphere(GemState *state) state->get(GemState::_GL_TEX_TYPE, texType); state->get(GemState::_GL_TEX_NUMCOORDS, texNum); - - if(m_drawType==GL_DEFAULT_GEM) { - m_drawType=GL_FILL; - } - if(m_x) { delete[]m_x; } @@ -100,139 +91,67 @@ void sphere :: createSphere(GemState *state) } m_z=NULL; - if(texType && texNum>=3) { - xsize0 = texCoords[0].s; - xsize = texCoords[1].s-xsize0; - ysize0 = texCoords[1].t; - ysize = texCoords[2].t-ysize0; - } - drho = M_PI / static_cast(stacks); dtheta = 2.0 * M_PI / static_cast(slices); int src; - if (m_drawType == GL_FILL) { - - m_x = new float[slices * stacks * 3]; - m_y = new float[slices * stacks * 3]; - m_z = new float[slices * stacks * 3]; - src = 0; + m_x = new float[slices * stacks * 3]; + m_y = new float[slices * stacks * 3]; + m_z = new float[slices * stacks * 3]; - if (!texType) { - /* draw +Z end as a triangle fan */ + src = 0; - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0 : j * dtheta; - m_x[src] = -sin(theta) * sin(drho); - m_y[src] = cos(theta) * sin(drho); - m_z[src] = nsign * cos(drho); - src++; - } - } + if (!texType) { + /* draw +Z end as a triangle fan */ - ds = 1.0 / slices; - dt = 1.0 / stacks; - t = 1.0; /* because loop now runs from 0 */ - if (texType) { - imin = 0; - imax = stacks; - } else { - imin = 1; - imax = stacks - 1; + for (j = 0; j <= slices; j++) { + theta = (j == slices) ? 0.0 : j * dtheta; + m_x[src] = -sin(theta) * sin(drho); + m_y[src] = cos(theta) * sin(drho); + m_z[src] = nsign * cos(drho); + src++; } + } - /* draw intermediate stacks as quad strips */ - for (i = imin; i < imax; i++) { - rho = i * drho; - s = 0.0; - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0 : j * dtheta; - m_x[src] = -sin(theta) * sin(rho); - m_y[src] = cos(theta) * sin(rho); - m_z[src] = nsign * cos(rho); - src++; - m_x[src] = -sin(theta) * sin(rho + drho); - m_y[src] = cos(theta) * sin(rho + drho); - m_z[src] = nsign * cos(rho + drho); - src++; - - } - } + if (texType) { + imin = 0; + imax = stacks; + } else { + imin = 1; + imax = stacks - 1; + } - if (!texType) { - /* draw -Z end as a triangle fan */ - - rho = M_PI - drho; - s = 1.0; - t = dt; - for (j = slices; j >= 0; j--) { - theta = (j == slices) ? 0.0 : j * dtheta; - m_x[src] = -sin(theta) * sin(rho); - m_y[src] = cos(theta) * sin(rho); - m_z[src] = nsign * cos(rho); - src++; - } - } + /* draw intermediate stacks as quad strips */ + for (i = imin; i < imax; i++) { + rho = i * drho; + for (j = 0; j <= slices; j++) { + theta = (j == slices) ? 0.0 : j * dtheta; + m_x[src] = -sin(theta) * sin(rho); + m_y[src] = cos(theta) * sin(rho); + m_z[src] = nsign * cos(rho); + src++; + m_x[src] = -sin(theta) * sin(rho + drho); + m_y[src] = cos(theta) * sin(rho + drho); + m_z[src] = nsign * cos(rho + drho); + src++; - } else if (m_drawType == GL_LINE || m_drawType == GLU_SILHOUETTE) { - - //allocate memory - this has twice the vertices as GL_POINT - m_x = new float[slices * stacks * 2]; - m_y = new float[slices * stacks * 2]; - m_z = new float[slices * stacks * 2]; - - src = 0; - - /* draw stack lines */ - for (i = 1; i < stacks; - i++) { /* stack line at i==stacks-1 was missing here */ - rho = i * drho; - for (j = 0; j < slices; j++) { - theta = j * dtheta; - m_x[src] = cos(theta) * sin(rho); - m_y[src] = sin(theta) * sin(rho); - m_z[src] = cos(rho); - src++; - } - } - /* draw slice lines */ - for (j = 0; j < slices; j++) { - theta = j * dtheta; - for (i = 0; i <= stacks; i++) { - rho = i * drho; - m_x[src] = cos(theta) * sin(rho); - m_y[src] = sin(theta) * sin(rho); - m_z[src] = cos(rho); - src++; - } } } - else if (m_drawType == GL_POINT) { - - //allocate memory - each style has a different number of vertices - m_x = new float[slices * stacks]; - m_y = new float[slices * stacks]; - m_z = new float[slices * stacks]; - src = 0; - - /* loop over stacks and fill the arrays */ - for (i = 1; i < stacks - 1; i++) { - rho = i * drho; - for (j = 0; j < slices; j++) { - theta = j * dtheta; - m_x[src] = cos(theta) * sin(rho); - m_y[src] = sin(theta) * sin(rho); - m_z[src] = cos(rho); - src++; - } - } + if (!texType) { + /* draw -Z end as a triangle fan */ + rho = M_PI - drho; + for (j = slices; j >= 0; j--) { + theta = (j == slices) ? 0.0 : j * dtheta; + m_x[src] = -sin(theta) * sin(rho); + m_y[src] = cos(theta) * sin(rho); + m_z[src] = nsign * cos(rho); + src++; + } } - - } ///////////////////////////////////////////////////////// // render @@ -244,7 +163,6 @@ void sphere :: renderShape(GemState *state) GLint slices=(m_numSlices>0)?m_numSlices:10; GLint stacks=(m_numStacks>0)?m_numStacks:10; - GLfloat rho, drho, dtheta; GLfloat s, t, ds, dt; GLint i, j, imin, imax; GLenum orientation = true; /* GLU_INSIDE; */ @@ -262,6 +180,39 @@ void sphere :: renderShape(GemState *state) state->get(GemState::_GL_TEX_NUMCOORDS, texNum); state->get(GemState::_GL_LIGHTING, lighting); + GLenum type; + if(m_drawType==GL_DEFAULT_GEM) { + m_drawType=GL_FILL; + } + type = m_drawType; + + + switch(m_drawType) { + case GL_LINE_LOOP: + type=GL_LINE; + break; + case GL_POINTS : + type=GL_POINT; + break; + case GL_DEFAULT_GEM: // default + case GL_POLYGON : + type=GL_FILL; + break; + } +#ifdef GLU_TRUE + switch(m_drawType) { + case GLU_LINE : + type=GL_LINE; + break; + case GLU_POINT: + type=GL_POINT; + break; + case GLU_FILL : + type=GL_FILL; + break; + } +#endif + GLfloat xsize = 1.0, xsize0 = 0.0; GLfloat ysize = 1.0, ysize0 = 0.0; if(texType && texNum>=3) { @@ -271,8 +222,8 @@ void sphere :: renderShape(GemState *state) ysize = texCoords[2].t-ysize0; } - drho = M_PI / static_cast(stacks); - dtheta = 2.0 * M_PI / static_cast(slices); + ds = 1.0 / slices; + dt = 1.0 / stacks; /* texturing: s goes from 0.0/0.25/0.5/0.75/1.0 at +y/+x/-y/-x/+y axis */ /* t goes from -1.0/+1.0 at z = -radius/+radius (linear along longitudes) */ @@ -291,137 +242,82 @@ void sphere :: renderShape(GemState *state) oldTexture = texType; } - if (m_drawType == GL_FILL) { - src = 0; - if (!texType) { - /* draw +Z end as a triangle fan */ - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0, 0.0, 1.0); - glVertex3f(0.0, 0.0, nsign * radius); - for (j = 0; j <= slices; j++) { - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; + glPushAttrib(GL_POLYGON_BIT); + glPolygonMode(GL_FRONT_AND_BACK, type); + + src = 0; + if (!texType) { + /* draw +Z end as a triangle fan */ + glBegin(GL_TRIANGLE_FAN); + glNormal3f(0.0, 0.0, 1.0); + glVertex3f(0.0, 0.0, nsign * radius); + for (j = 0; j <= slices; j++) { + if (lighting) { + glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); } - glEnd(); + glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); + src++; } + glEnd(); + } - ds = 1.0 / slices; - dt = 1.0 / stacks; - t = 1.0; /* because loop now runs from 0 */ - if (texType) { - imin = 0; - imax = stacks; - } else { - imin = 1; - imax = stacks - 1; - } + ds = 1.0 / slices; + dt = 1.0 / stacks; + t = 1.0; /* because loop now runs from 0 */ + if (texType) { + imin = 0; + imax = stacks; + } else { + imin = 1; + imax = stacks - 1; + } - /* draw intermediate stacks as quad strips */ - for (i = imin; i < imax; i++) { - glBegin(GL_QUAD_STRIP); - s = 0.0; - for (j = 0; j <= slices; j++) { - - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); - } - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, (t - dt)*ysize+ysize0); - } - s += ds; - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; - } - glEnd(); - t -= dt; - } + /* draw intermediate stacks as quad strips */ + for (i = imin; i < imax; i++) { + glBegin(GL_QUAD_STRIP); + s = 0.0; + for (j = 0; j <= slices; j++) { - if (!texType) { - /* draw -Z end as a triangle fan */ - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0, 0.0, -1.0); - glVertex3f(0.0, 0.0, -radius * nsign); - s = 1.0; - t = dt; - for (j = slices; j >= 0; j--) { - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - s -= ds; - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; + if (lighting) { + glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); } - glEnd(); - } - } else if (m_drawType == GL_LINE || m_drawType == GLU_SILHOUETTE) { - - src = 0; - - for (i = 1; i < stacks; - i++) { // stack line at i==stacks-1 was missing here - glBegin(GL_LINE_LOOP); - for (j = 0; j < slices; j++) { - - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; + if(texType) { + glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); } - glEnd(); - } - - for (j = 0; j < slices; j++) { - glBegin(GL_LINE_STRIP); - for (i = 0; i <= stacks; i++) { - - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; + glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); + src++; + if (lighting) { + glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); + } + if(texType) { + glTexCoord2f(s*xsize+xsize0, (t - dt)*ysize+ysize0); } - glEnd(); + s += ds; + glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); + src++; } + glEnd(); + t -= dt; } - else if (m_drawType == GL_POINT) { - /* top and bottom-most points */ - glBegin(GL_POINTS); - if (lighting) { - glNormal3f(0.0, 0.0, nsign); - } - glVertex3d(0.0, 0.0, radius); - if (lighting) { - glNormal3f(0.0, 0.0, -nsign); - } - glVertex3d(0.0, 0.0, -radius); - - src = 0; - - for (i = 1; i < stacks - 1; i++) { - rho = i * drho; - for (j = 0; j < slices; j++) { - if (lighting) { - glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); - } - glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); - src++; + if (!texType) { + /* draw -Z end as a triangle fan */ + glBegin(GL_TRIANGLE_FAN); + glNormal3f(0.0, 0.0, -1.0); + glVertex3f(0.0, 0.0, -radius * nsign); + s = 1.0; + t = dt; + for (j = slices; j >= 0; j--) { + if (lighting) { + glNormal3f(m_x[src] * nsign, m_y[src] * nsign, m_z[src] * nsign); } + s -= ds; + glVertex3f(m_x[src] * radius, m_y[src] * radius, m_z[src] * radius); + src++; } glEnd(); } + glPopAttrib(); } ///////////////////////////////////////////////////////// // static member function diff --git a/src/Geos/sphere3d.cpp b/src/Geos/sphere3d.cpp index 32593e1be..f71cea8af 100644 --- a/src/Geos/sphere3d.cpp +++ b/src/Geos/sphere3d.cpp @@ -58,10 +58,6 @@ void sphere3d :: createSphere3d(void) // post("creating sphere %d %d", slices, stacks); - if(m_drawType==GL_DEFAULT_GEM) { - m_drawType=GL_FILL; - } - drho = 180. / static_cast(stacks); dtheta = 360. / static_cast(slices); @@ -197,6 +193,48 @@ void sphere3d :: renderShape(GemState *state) state->get(GemState::_GL_TEX_NUMCOORDS, texNum); state->get(GemState::_GL_LIGHTING, lighting); + GLenum type; + if(m_drawType==GL_DEFAULT_GEM) { + m_drawType=GL_FILL; + } + type = m_drawType; + + switch(m_drawType) { + case GL_LINE_LOOP: + type=GL_LINE; + break; + case GL_POINTS : + type=GL_POINT; + break; + case GL_DEFAULT_GEM: // default + case GL_POLYGON : + type=GL_FILL; + break; + } +#ifdef GLU_TRUE + switch(m_drawType) { + case GLU_LINE : + type=GL_LINE; + break; + case GLU_POINT: + type=GL_POINT; + break; + case GLU_FILL : + type=GL_FILL; + break; + } +#endif + + switch(type) { + case GL_FILL: + case GL_LINE: + case GL_POINT: + break; + default: + error("invalid draw type %d, switching to default", m_drawType); + m_drawType = type = GL_FILL; + } + glPushMatrix(); glScalef(m_size, m_size, m_size); @@ -239,6 +277,8 @@ void sphere3d :: renderShape(GemState *state) if(!m_displayList) { m_modified=true; } + glPushAttrib(GL_POLYGON_BIT); + glPolygonMode(GL_FRONT_AND_BACK, type); if(m_modified) { @@ -249,227 +289,158 @@ void sphere3d :: renderShape(GemState *state) m_displayList=glGenLists(1); glNewList(m_displayList, GL_COMPILE_AND_EXECUTE); - if (m_drawType == GL_FILL) { - int src; - t = 1.0; - s = 0.0; - ds = 1.0 / slices; - dt = 1.0 / stacks; + int src; + t = 1.0; + s = 0.0; + ds = 1.0 / slices; + dt = 1.0 / stacks; - /* draw +Z end as a quad strip */ - glBegin(GL_QUAD_STRIP); + /* draw +Z end as a quad strip */ + glBegin(GL_QUAD_STRIP); - src=1; - for (int j = 0; j < slices; j++) { - if(normals) { - glNormal3f(m_x[0], m_y[0], m_z[0]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); - } - glVertex3f(m_x[0], m_y[0], m_z[0]); - - if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, (t-dt)*ysize+ysize0); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - - src++; - s += ds; - } - src=1; + src=1; + for (int j = 0; j < slices; j++) { if(normals) { - glNormal3f(m_x[0], m_y[0], m_z[0]); + glNormal3f(m_x[0], m_y[0], m_z[0]); } if(texType) { - glTexCoord2f(1.f*xsize+xsize0, t*ysize+ysize0); + glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); } glVertex3f(m_x[0], m_y[0], m_z[0]); if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); + glNormal3f(m_x[src], m_y[src], m_z[src]); } if(texType) { - glTexCoord2f(1.f*xsize+xsize0, (t-dt)*ysize+ysize0); + glTexCoord2f(s*xsize+xsize0, (t-dt)*ysize+ysize0); } glVertex3f(m_x[src], m_y[src], m_z[src]); - glEnd(); - t-=dt; - - /* draw intermediate stacks as quad strips */ - src=1; - for (int i = 0; i < stacks-2; i++) { - int src2=0; - s = 0.0; - glBegin(GL_QUAD_STRIP); - for (int j = 0; j < slices; j++) { - src2=src+slices; - - if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - src++; - - if(normals) { - glNormal3f(m_x[src2], m_y[src2], m_z[src2]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, (t - dt)*ysize+ysize0); - } - glVertex3f(m_x[src2], m_y[src2], m_z[src2]); - src2++; - - s += ds; - } - - if(normals) { - glNormal3f(m_x[src-slices], m_y[src-slices], m_z[src-slices]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); - } - glVertex3f(m_x[src-slices], m_y[src-slices], m_z[src-slices]); - - if(normals) { - glNormal3f(m_x[src2-slices], m_y[src2-slices], m_z[src2-slices]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, (t - dt)*ysize+ysize0); - } - glVertex3f(m_x[src2-slices], m_y[src2-slices], m_z[src2-slices]); - - glEnd(); - t -= dt; - } + src++; + s += ds; + } + src=1; + if(normals) { + glNormal3f(m_x[0], m_y[0], m_z[0]); + } + if(texType) { + glTexCoord2f(1.f*xsize+xsize0, t*ysize+ysize0); + } + glVertex3f(m_x[0], m_y[0], m_z[0]); - /* draw -Z end as a quad strip */ - glBegin(GL_QUAD_STRIP); + if(normals) { + glNormal3f(m_x[src], m_y[src], m_z[src]); + } + if(texType) { + glTexCoord2f(1.f*xsize+xsize0, (t-dt)*ysize+ysize0); + } + glVertex3f(m_x[src], m_y[src], m_z[src]); + + glEnd(); + t-=dt; - src=(slices*(stacks-2)+1); - const int last=slices*(stacks-1)+1; - s=0.0; + /* draw intermediate stacks as quad strips */ + src=1; + for (int i = 0; i < stacks-2; i++) { + int src2=0; + s = 0.0; + glBegin(GL_QUAD_STRIP); for (int j = 0; j < slices; j++) { - if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - src++; - - if(normals) { - glNormal3f(m_x[last], m_y[last], m_z[last]); - } - if(texType) { - glTexCoord2f(s*xsize+xsize0, (t-dt)*ysize+ysize0); - } - glVertex3f(m_x[last], m_y[last], m_z[last]); - - s+=ds; + src2=src+slices; + + if(normals) { + glNormal3f(m_x[src], m_y[src], m_z[src]); + } + if(texType) { + glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); + } + glVertex3f(m_x[src], m_y[src], m_z[src]); + src++; + + if(normals) { + glNormal3f(m_x[src2], m_y[src2], m_z[src2]); + } + if(texType) { + glTexCoord2f(s*xsize+xsize0, (t - dt)*ysize+ysize0); + } + glVertex3f(m_x[src2], m_y[src2], m_z[src2]); + src2++; + + s += ds; } - src=(slices*(stacks-2)+1); + if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); + glNormal3f(m_x[src-slices], m_y[src-slices], m_z[src-slices]); } if(texType) { - glTexCoord2f(1.f*xsize+xsize0, t*ysize+ysize0); + glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); } - glVertex3f(m_x[src], m_y[src], m_z[src]); + glVertex3f(m_x[src-slices], m_y[src-slices], m_z[src-slices]); if(normals) { - glNormal3f(m_x[last], m_y[last], m_z[last]); + glNormal3f(m_x[src2-slices], m_y[src2-slices], m_z[src2-slices]); } if(texType) { - glTexCoord2f(1.f*xsize+xsize0, (t-dt)*ysize+ysize0); + glTexCoord2f(s*xsize+xsize0, (t - dt)*ysize+ysize0); } - glVertex3f(m_x[last], m_y[last], m_z[last]); + glVertex3f(m_x[src2-slices], m_y[src2-slices], m_z[src2-slices]); glEnd(); - - } else if (m_drawType == GL_LINE || m_drawType == GLU_SILHOUETTE) { - - int src = 1; - for (int i = 1; i < stacks; - i++) { // stack line at i==stacks-1 was missing here - glBegin(GL_LINE_LOOP); - for (int j = 0; j < slices; j++) { - - if (normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - src++; - } - glEnd(); - } - for (int j = 0; j < slices; j++) { - glBegin(GL_LINE_STRIP); - - if (normals) { - glNormal3f(m_x[0], m_y[0], m_z[0]); - } - glVertex3f(m_x[0], m_y[0], m_z[0]); - - for (int i = 0; i < stacks-1; i++) { - src=i*slices+1+j; - if (normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - } - src=slices*(stacks-1)+1; - if (normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - - glEnd(); - } + t -= dt; } - else if (m_drawType == GL_POINT) { - /* top and bottom-most points */ - int src=0; - - glBegin(GL_POINTS); + /* draw -Z end as a quad strip */ + glBegin(GL_QUAD_STRIP); + src=(slices*(stacks-2)+1); + const int last=slices*(stacks-1)+1; + s=0.0; + for (int j = 0; j < slices; j++) { if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); + glNormal3f(m_x[src], m_y[src], m_z[src]); + } + if(texType) { + glTexCoord2f(s*xsize+xsize0, t*ysize+ysize0); } glVertex3f(m_x[src], m_y[src], m_z[src]); src++; - for (int i = 0; i < stacks-1; i++) { - for (int j = 0; j < slices; j++) { - if (normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); - } - glVertex3f(m_x[src], m_y[src], m_z[src]); - src++; - } - } if(normals) { - glNormal3f(m_x[src], m_y[src], m_z[src]); + glNormal3f(m_x[last], m_y[last], m_z[last]); } - glVertex3f(m_x[src], m_y[src], m_z[src]); + if(texType) { + glTexCoord2f(s*xsize+xsize0, (t-dt)*ysize+ysize0); + } + glVertex3f(m_x[last], m_y[last], m_z[last]); - glEnd(); + s+=ds; + } + src=(slices*(stacks-2)+1); + if(normals) { + glNormal3f(m_x[src], m_y[src], m_z[src]); } + if(texType) { + glTexCoord2f(1.f*xsize+xsize0, t*ysize+ysize0); + } + glVertex3f(m_x[src], m_y[src], m_z[src]); + + if(normals) { + glNormal3f(m_x[last], m_y[last], m_z[last]); + } + if(texType) { + glTexCoord2f(1.f*xsize+xsize0, (t-dt)*ysize+ysize0); + } + glVertex3f(m_x[last], m_y[last], m_z[last]); + + glEnd(); + glEndList(); } /* rebuild list */ else { glCallList(m_displayList); } + glPopAttrib(); glPopMatrix(); m_modified=false; } diff --git a/src/Manips/glsl_geometry.cpp b/src/Manips/glsl_geometry.cpp index 7af3b5c3c..26b157a1f 100644 --- a/src/Manips/glsl_geometry.cpp +++ b/src/Manips/glsl_geometry.cpp @@ -48,7 +48,7 @@ glsl_geometry :: ~glsl_geometry() ///////////////////////////////////////////////////////// bool glsl_geometry :: isRunnable() { - if(GLEW_EXT_geometry_shader4) { // GLEW_VERSION_2_1 ?? + if(GLEW_VERSION_2_0 || GLEW_EXT_geometry_shader4) { // GLEW_VERSION_2_1 ?? m_shaderTarget = GL_GEOMETRY_SHADER_EXT; m_shaderType = GL2; return true; diff --git a/src/Manips/glsl_program.cpp b/src/Manips/glsl_program.cpp index b262b0668..50529f938 100644 --- a/src/Manips/glsl_program.cpp +++ b/src/Manips/glsl_program.cpp @@ -450,17 +450,7 @@ glsl_program :: glsl_program() ///////////////////////////////////////////////////////// glsl_program :: ~glsl_program() { - m_programmapper.del(m_programmapped); - m_programmapped=0.; - - if(m_program) { - glDeleteProgram( m_program ); - } - m_program=0; - if(m_programARB) { - glDeleteObjectARB( m_programARB ); - } - m_programARB=0; + UnlinkProgram(); } @@ -505,7 +495,10 @@ void glsl_program :: startRendering() { LinkProgram(); } - +void glsl_program :: stopRendering() +{ + UnlinkProgram(); +} void glsl_program :: render(GemState *state) { @@ -655,7 +648,8 @@ void glsl_program :: shaderMess(int argc, t_atom *argv) try { ui=m_shadermapper.get(f); } catch(GemException&x) { - error("unable to get shaderID for %f...skipping!", f); + if(f) + error("unable to get shaderID for %f...skipping!", f); continue; } m_shaderObj[m_numShaders] = ui; @@ -681,8 +675,9 @@ bool glsl_program :: LinkGL2() int numGeometryShaders = 0; int numFragmentShaders = 0; - if(m_program) { - glDeleteProgram( m_program ); + GLuint program = m_program; + if(program) { + glDeleteProgram( program ); m_programmapper.del(m_programmapped); m_programmapped=0.; m_program = 0; @@ -856,13 +851,14 @@ void glsl_program :: LinkProgram() return; } + UnlinkProgram(); + if(GLEW_VERSION_2_0) { success=LinkGL2(); } else { success=LinkARB(); } - if(!success) { return; } @@ -906,7 +902,20 @@ void glsl_program :: LinkProgram() } SETFLOAT(&a, m_programmapped); outlet_list(m_outProgramID, 0, 1, &a); +} +void glsl_program :: UnlinkProgram() +{ + m_programmapper.del(m_programmapped); + m_programmapped=0.; + if(m_program) { + glDeleteProgram( m_program ); + } + m_program=0; + if(m_programARB) { + glDeleteObjectARB( m_programARB ); + } + m_programARB=0; } ///////////////////////////////////////////////////////// diff --git a/src/Manips/glsl_program.h b/src/Manips/glsl_program.h index 812c4ea50..a1f43513a 100644 --- a/src/Manips/glsl_program.h +++ b/src/Manips/glsl_program.h @@ -60,6 +60,7 @@ class GEM_EXTERN glsl_program : public GemBase // check openGL-extensions virtual bool isRunnable(void); virtual void startRendering(void); + virtual void stopRendering(void); ////////// // Do the rendering @@ -89,6 +90,7 @@ class GEM_EXTERN glsl_program : public GemBase virtual bool LinkGL2(void); virtual bool LinkARB(void); virtual void LinkProgram(void); + virtual void UnlinkProgram(void); ////////// // What can we play with? diff --git a/src/Output/Makefile.am b/src/Output/Makefile.am index 7bec18482..bef9742fb 100644 --- a/src/Output/Makefile.am +++ b/src/Output/Makefile.am @@ -5,6 +5,7 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4 AM_CPPFLAGS = -I$(top_srcdir)/src +AM_LIBTOOLFLAGS = --tag=CXX include ../check-sources.mk pkglib_LTLIBRARIES = diff --git a/src/Output/gemglfw3window.cpp b/src/Output/gemglfw3window.cpp index 42e5f912b..5921ac5e2 100644 --- a/src/Output/gemglfw3window.cpp +++ b/src/Output/gemglfw3window.cpp @@ -647,7 +647,10 @@ void gemglfw3window :: bufferMess(int buf) case 2: m_buffer=buf; if(m_window) { - post("changing buffer type will only effect newly created windows"); + static int warned = 0; + if(!warned) + post("changing buffer type will only effect newly created windows"); + warned = 1; } break; default: @@ -705,10 +708,10 @@ void gemglfw3window :: fullscreenMess(int on) if(on) { if (on<0 || on>count) { monitor = glfwGetPrimaryMonitor(); - verbose(0, "switching to fullscreen on primary monitor: %s", glfwGetMonitorName(monitor)); + logpost(0, 3+0, "switching to fullscreen on primary monitor: %s", glfwGetMonitorName(monitor)); } else { monitor = monitors[on-1]; - verbose(0, "switching to fullscreen on monitor #%d: %s", on, glfwGetMonitorName(monitor)); + logpost(0, 3+0, "switching to fullscreen on monitor #%d: %s", on, glfwGetMonitorName(monitor)); } } if(monitor) { @@ -858,6 +861,8 @@ bool gemglfw3window :: create(void) dispatch(); int fb_width=0, fb_height=0; + glfwGetWindowSize(m_window, &fb_width, &fb_height); + dimension(fb_width, fb_height); glfwGetFramebufferSize(m_window, &fb_width, &fb_height); framebuffersize(fb_width, fb_height); @@ -1014,7 +1019,7 @@ void gemglfw3window :: obj_setupCallback(t_class *classPtr) { CPPEXTERN_MSG2(classPtr, "glprofile", glprofileMess, int, int); CPPEXTERN_MSG1(classPtr, "gles", glesMess, bool); - ::verbose(0, "[gemglfw3window]\n\tGLFW compile version: %d.%d.%d\n\tGLFW runtime version: %s" + ::logpost(0, 3+0, "[gemglfw3window]\n\tGLFW compile version: %d.%d.%d\n\tGLFW runtime version: %s" , GLFW_VERSION_MAJOR, GLFW_VERSION_MINOR, GLFW_VERSION_REVISION , glfwGetVersionString() ); diff --git a/src/Output/gemglxwindow.cpp b/src/Output/gemglxwindow.cpp index 048713a0c..5cf21b727 100644 --- a/src/Output/gemglxwindow.cpp +++ b/src/Output/gemglxwindow.cpp @@ -15,19 +15,14 @@ ///////////////////////////////////////////////////////// #include "Gem/GemConfig.h" -#ifdef HAVE_GL_GLX_H #include "gemglxwindow.h" #include "Gem/GemGL.h" -#include -#include -#include #include "RTE/MessageCallbacks.h" #include "Gem/Exception.h" - #ifdef HAVE_LIBXXF86VM -# include +# include #endif #include @@ -35,8 +30,13 @@ #include #endif -// for printf() debugging -#include +#include +#include + +#include +#include +#include +#include CPPEXTERN_NEW(gemglxwindow); @@ -44,245 +44,10 @@ CPPEXTERN_NEW(gemglxwindow); ExposureMask|StructureNotifyMask|PointerMotionMask|ButtonMotionMask | \ ButtonReleaseMask | ButtonPressMask | KeyPressMask | KeyReleaseMask | DestroyNotify -#ifdef HAVE_LIBXRENDER -static int fbDbl32[] = {GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_ALPHA_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbDbl32Stereo[] = {GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, True, - GLX_STEREO, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_ALPHA_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbDbl24[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbDbl24Stereo[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, True, - GLX_STEREO, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbDbl8[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, True, - GLX_RED_SIZE, 3, - GLX_GREEN_SIZE, 3, - GLX_BLUE_SIZE, 2, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbDbl8Stereo[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, True, - GLX_STEREO, True, - GLX_RED_SIZE, 3, - GLX_GREEN_SIZE, 3, - GLX_BLUE_SIZE, 2, - GLX_DEPTH_SIZE, 16, - None - }; - -static int *dblBufFbCfg[] = {fbDbl32, - fbDbl32Stereo, - fbDbl24, - fbDbl24Stereo, - fbDbl8, - fbDbl8Stereo, - 0 - }; - -static int fbSngl32[] = {GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, False, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_ALPHA_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbSngl32Stereo[] = {GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, False, - GLX_STEREO, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_ALPHA_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbSngl24[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, False, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbSngl24Stereo[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, False, - GLX_STEREO, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 16, - None - }; -static int fbSngl8[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, False, - GLX_RED_SIZE, 3, - GLX_GREEN_SIZE, 3, - GLX_BLUE_SIZE, 2, - GLX_DEPTH_SIZE, 16, - None - }; - -static int fbSngl8Stereo[] = {GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, - GLX_DOUBLEBUFFER, False, - GLX_STEREO, True, - GLX_RED_SIZE, 3, - GLX_GREEN_SIZE, 3, - GLX_BLUE_SIZE, 2, - GLX_DEPTH_SIZE, 16, - None - }; - -static int *snglBufFbCfg[] = {fbSngl32, - fbSngl32Stereo, - fbSngl24, - fbSngl24Stereo, - fbSngl8, - fbSngl8Stereo, - 0 - }; - -#endif // HAVE_LIBXRENDER - -// window creation variables -static int snglBuf24[] = {GLX_RGBA, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 16, - GLX_STENCIL_SIZE, 8, - GLX_ACCUM_RED_SIZE, 8, - GLX_ACCUM_GREEN_SIZE, 8, - GLX_ACCUM_BLUE_SIZE, 8, - None - }; -static int snglBuf24Stereo[] = {GLX_RGBA, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 16, - GLX_STENCIL_SIZE, 8, - GLX_ACCUM_RED_SIZE, 8, - GLX_ACCUM_GREEN_SIZE, 8, - GLX_ACCUM_BLUE_SIZE, 8, - GLX_STEREO, - None - }; -static int dblBuf24[] = {GLX_RGBA, - GLX_RED_SIZE, 4, - GLX_GREEN_SIZE, 4, - GLX_BLUE_SIZE, 4, - GLX_DEPTH_SIZE, 16, - GLX_STENCIL_SIZE, 8, - GLX_ACCUM_RED_SIZE, 8, - GLX_ACCUM_GREEN_SIZE, 8, - GLX_ACCUM_BLUE_SIZE, 8, - GLX_DOUBLEBUFFER, - None - }; -static int dblBuf24Stereo[] = {GLX_RGBA, - GLX_RED_SIZE, 4, - GLX_GREEN_SIZE, 4, - GLX_BLUE_SIZE, 4, - GLX_DEPTH_SIZE, 16, - GLX_STENCIL_SIZE, 8, - GLX_ACCUM_RED_SIZE, 8, - GLX_ACCUM_GREEN_SIZE, 8, - GLX_ACCUM_BLUE_SIZE, 8, - GLX_DOUBLEBUFFER, - GLX_STEREO, - None - }; -static int snglBuf8[] = {GLX_RGBA, - GLX_RED_SIZE, 3, - GLX_GREEN_SIZE, 3, - GLX_BLUE_SIZE, 2, - GLX_DEPTH_SIZE, 16, - None - }; -static int snglBuf8Stereo[] = {GLX_RGBA, - GLX_RED_SIZE, 3, - GLX_GREEN_SIZE, 3, - GLX_BLUE_SIZE, 2, - GLX_DEPTH_SIZE, 16, - GLX_STEREO, - None - }; -static int dblBuf8[] = {GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 2, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 16, - GLX_DOUBLEBUFFER, - None - }; - -static int dblBuf8Stereo[] = {GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 2, - GLX_BLUE_SIZE, 1, - GLX_DEPTH_SIZE, 16, - GLX_DOUBLEBUFFER, - GLX_STEREO, - None - }; - -static int*dblBufs[]= { - dblBuf24Stereo, - dblBuf24, - dblBuf8Stereo, - dblBuf8, - 0 -}; -static int*snglBufs[]= { - snglBuf24Stereo, - snglBuf24, - snglBuf8Stereo, - snglBuf8, - 0 -}; + + +#define GETGLXFUN(type, name) type name##Fn = (type) glXGetProcAddress((const GLubyte*) #name ) + static int xerr; static int ErrorHandler (Display *dpy, XErrorEvent *event) @@ -309,6 +74,186 @@ static Bool WaitForNotify(Display *, XEvent *e, char *arg) } +namespace { + struct glxFB { + Display*dpy; + GLXFBConfig fb; + PFNGLXGETFBCONFIGATTRIBPROC _configattrib; + PFNGLXGETVISUALFROMFBCONFIGPROC _getvisual; + glxFB(Display*_dpy, GLXFBConfig _fb) + : dpy(_dpy) + , fb(_fb) + { + GETGLXFUN(PFNGLXGETFBCONFIGATTRIBPROC, glXGetFBConfigAttrib); + GETGLXFUN(PFNGLXGETVISUALFROMFBCONFIGPROC, glXGetVisualFromFBConfig); + _configattrib = glXGetFBConfigAttribFn; + _getvisual = glXGetVisualFromFBConfigFn; + } + + int ConfigAttrib(int attrib) { + int value = -1; + if(_configattrib) + _configattrib(dpy, fb, attrib, &value); + return value; + } + + XVisualInfo*Visual() { + if(_getvisual) + return (XVisualInfo*) _getvisual(dpy, fb); + return 0; + } + }; + + struct FBconfig { + Display *dpy; + GLXFBConfig fb; + int redBits, greenBits, blueBits, alphaBits; + int depthBits, stencilBits; + int accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + int auxBuffers; + int samples, depth; + bool stereo, sRGB, doublebuffer, transparency; + int colormode; + int renderType, drawableType; + + FBconfig(int colorBits, int accumBits) + : dpy(0), fb(0) + , redBits(colorBits), greenBits(colorBits), blueBits(colorBits), alphaBits(colorBits) + , depthBits(-1), stencilBits(-1) + , accumRedBits(accumBits), accumGreenBits(accumBits), accumBlueBits(accumBits), accumAlphaBits(accumBits) + , auxBuffers(-1) + , samples(-1), depth(-1) + , stereo(false), sRGB(false), doublebuffer(true), transparency(false) + , colormode(TrueColor) + , renderType(GLX_RGBA_BIT), drawableType(GLX_WINDOW_BIT) + { } + + FBconfig(Display *_dpy, GLXFBConfig _fb) + : dpy(_dpy), fb(_fb) + , redBits(0), greenBits(0), blueBits(0), alphaBits(0) + , depthBits(0), stencilBits(0) + , accumRedBits(0), accumGreenBits(0), accumBlueBits(0), accumAlphaBits(0) + , auxBuffers(0) + , samples(0), depth(0) + , stereo(false), sRGB(false), doublebuffer(false), transparency(false) + , colormode(0) + , renderType(0), drawableType(0) + { + glxFB gfb (dpy, fb); + redBits = gfb.ConfigAttrib(GLX_RED_SIZE); + greenBits = gfb.ConfigAttrib(GLX_GREEN_SIZE); + blueBits = gfb.ConfigAttrib(GLX_BLUE_SIZE); + alphaBits = gfb.ConfigAttrib(GLX_ALPHA_SIZE); + + depthBits = gfb.ConfigAttrib(GLX_DEPTH_SIZE); + stencilBits = gfb.ConfigAttrib(GLX_STENCIL_SIZE); + + accumRedBits = gfb.ConfigAttrib(GLX_ACCUM_RED_SIZE); + accumGreenBits = gfb.ConfigAttrib(GLX_ACCUM_GREEN_SIZE); + accumBlueBits = gfb.ConfigAttrib(GLX_ACCUM_BLUE_SIZE); + accumAlphaBits = gfb.ConfigAttrib(GLX_ACCUM_ALPHA_SIZE); + + auxBuffers = gfb.ConfigAttrib(GLX_AUX_BUFFERS); + + stereo = gfb.ConfigAttrib(GLX_STEREO); + +// if (GLXEW_ARB_framebuffer_sRGB) + sRGB = gfb.ConfigAttrib(GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB) > 0; + + doublebuffer = gfb.ConfigAttrib(GLX_DOUBLEBUFFER) > 0; + + XVisualInfo *vi = gfb.Visual(); + if(vi) { + depth = vi->depth; + colormode = vi->c_class; +#ifdef HAVE_LIBXRENDER + XRenderPictFormat *pf = XRenderFindVisualFormat(dpy, vi->visual); + transparency = pf && pf->direct.alphaMask>0; +#endif + XFree(vi); + } + +// if (GLXEW_ARB_multisample) + samples = gfb.ConfigAttrib(GLX_SAMPLES); + + renderType = gfb.ConfigAttrib(GLX_RENDER_TYPE); + drawableType = gfb.ConfigAttrib(GLX_DRAWABLE_TYPE); + } + + int bufferDifference(const FBconfig&cur) { + int missing = 0; + if (alphaBits > 0 && !cur.alphaBits) missing++; + if (depthBits > 0 && !cur.depthBits) missing++; + if (stencilBits > 0 && !cur.stencilBits) missing++; + if (auxBuffers > 0 && auxBuffers > cur.auxBuffers) missing += auxBuffers - cur.auxBuffers; + if (samples > 0 && !cur.samples) missing++; + if (transparency != cur.transparency) missing++; + return missing; + } +#define CHANNEL_DIFFERENCE(member) \ + (member >= 0)?((member-cur.member)*(member-cur.member) + !cur.member):0 + int colorChannelDifference(const FBconfig&cur) { + int diff = 0; + diff += CHANNEL_DIFFERENCE(redBits); + diff += CHANNEL_DIFFERENCE(greenBits); + diff += CHANNEL_DIFFERENCE(blueBits); + return diff; + } + int extraChannelDifference(const FBconfig&cur) { + int diff = 0; + + diff += CHANNEL_DIFFERENCE(alphaBits); + diff += CHANNEL_DIFFERENCE(depthBits); + diff += CHANNEL_DIFFERENCE(stencilBits); + diff += CHANNEL_DIFFERENCE(accumRedBits); + diff += CHANNEL_DIFFERENCE(accumGreenBits); + diff += CHANNEL_DIFFERENCE(accumBlueBits); + diff += CHANNEL_DIFFERENCE(accumAlphaBits); + diff += CHANNEL_DIFFERENCE(samples); + + if (sRGB != cur.sRGB) diff++; + return diff; + } + + + }; + + std::ostream& operator<<(std::ostream& out, const FBconfig& fb) { + out + << "FBconfig(" + << "rgba=[" + << fb.redBits << "," + << fb.greenBits << "," + << fb.blueBits << "," + << fb.alphaBits << "]," + << "accum=[" + << fb.accumRedBits << "," + << fb.accumGreenBits << "," + << fb.accumBlueBits << "," + << fb.accumAlphaBits << "]," + << "depth=" << fb.depthBits << "/" << fb.depth << "," + << "stencil=" << fb.stencilBits << "," + << "samples=" << fb.samples << "," + << "aux=" << fb.auxBuffers; + + if(fb.doublebuffer) out << ",doublebuffer"; + if(fb.stereo) out << ",stereo"; + if(fb.sRGB) out << ",sRGB"; + if(fb.transparency) out << ",transparency"; + switch(fb.colormode) { + case StaticGray: out << ",StaticGray" ; break; + case GrayScale: out << ",GrayScale" ; break; + case StaticColor: out << ",StaticColor" ; break; + case PseudoColor: out << ",PseudoColor" ; break; + case TrueColor: out << ",TrueColor" ; break; + case DirectColor: out << ",DirectColor" ; break; + default: out << ",UnknownColor"; break; + } + return out << ")"; + } +}; + + struct gemglxwindow::PIMPL { CPPExtern *parent; int fs; // FullScreen @@ -389,10 +334,24 @@ struct gemglxwindow::PIMPL { } bool create(std::string display, int buffer, bool fullscreen, bool border, - int&x, int&y, unsigned int&w, unsigned int&h, bool transparent) + int&x, int&y, unsigned int&w, unsigned int&h, bool transparent, + int msaa) { - int modeNum=4; + GETGLXFUN(PFNGLXGETFBCONFIGSPROC, glXGetFBConfigs); + GETGLXFUN(PFNGLXGETVISUALFROMFBCONFIGPROC, glXGetVisualFromFBConfig); + + switch(buffer) { + default: + pd_error(parent, "only single/double buffer supported; defaulting to double"); + case 2: + buffer = 2; + break; + case 1: + break; + } + #ifdef HAVE_LIBXXF86VM + int modeNum=4; XF86VidModeModeInfo **modes; #endif @@ -423,118 +382,81 @@ struct gemglxwindow::PIMPL { } } - XVisualInfo *vi=0; + std::vectorfbconfs; + int nativeCount; + GLXFBConfig* nativeConfigs = glXGetFBConfigsFn(dpy, screen, &nativeCount); + for (int i=0; ivisual); - if(!pict_format) { - continue; - } - - fbconfig = fbconfigs[i]; - if(pict_format->direct.alphaMask > 0) { - ::verbose(0,"choose fbconfig : %d", i); - breakme = true; - break; - } - } - if ( breakme ) { - break; - } - } + if (!(fb.drawableType & GLX_WINDOW_BIT)) { + /* not a window */ + continue; + } + if (!(fb.renderType & GLX_RGBA_BIT)) { + /* does not allow RGBA rendering */ + continue; + } + if (buffer != (fb.doublebuffer?2:1)) { + /* requested doublebuffer but got singlebuffer, or vice versa */ + continue; + } - if(!fbconfig) { - ::pd_error(parent, "Can't find valid framebuffer configuration, try again with legacy method."); - } else { - typedef void(*glXGetFBConfigAttribProc)(Display* dpy,GLXFBConfig fbconfig, - int attr, int* val); - glXGetFBConfigAttribProc glXGetFBConfigAttribFn = - (glXGetFBConfigAttribProc)glXGetProcAddress((const GLubyte*) - "glXGetFBConfigAttrib"); - if ( glXGetFBConfigAttribFn ) { - int doublebuffer; - int red_bits, green_bits, blue_bits, alpha_bits, depth_bits; - - glXGetFBConfigAttribFn(dpy, fbconfig, GLX_DOUBLEBUFFER, &doublebuffer); - glXGetFBConfigAttribFn(dpy, fbconfig, GLX_RED_SIZE, &red_bits); - glXGetFBConfigAttribFn(dpy, fbconfig, GLX_GREEN_SIZE, &green_bits); - glXGetFBConfigAttribFn(dpy, fbconfig, GLX_BLUE_SIZE, &blue_bits); - glXGetFBConfigAttribFn(dpy, fbconfig, GLX_ALPHA_SIZE, &alpha_bits); - glXGetFBConfigAttribFn(dpy, fbconfig, GLX_DEPTH_SIZE, &depth_bits); - - ::verbose(0, "FBConfig selected:"); - ::verbose(0, " Doublebuffer: %s", doublebuffer == True ? "Yes" : "No"); - ::verbose(0, - " Red Bits: %d, Green Bits: %d, Blue Bits: %d, Alpha Bits: %d, Depth Bits: %d", - red_bits, green_bits, blue_bits, alpha_bits, depth_bits); - } else { - ::pd_error(parent, "can't get glXGetFBConfigAttrib function pointer"); - } - } + if (fb.colormode != TrueColor && fb.colormode != DirectColor) { + /* TrueColor visual required for this program... */ + continue; + } + if (fb.depthBits < 16) { + /* too shallow */ + continue; } - } -#endif // HAVE_LIBXRENDER + //std::cerr << fb << std::endl; - if (vi == NULL) { // if Xrender method doesn't work try legacy - static int**buf=0; - switch(buffer) { - default: - pd_error(parent, "only single/double buffer supported; defaulting to double"); - case 2: - buf=dblBufs; - break; - case 1: - buf=snglBufs; - break; - } - // the user wants double buffer - for(; *buf; buf++) { - vi = glXChooseVisual(dpy, screen, *buf); - if(vi) { - break; + fbconfs.push_back(fb); + } + + /* now that we got a number of possible configurations, find the best one */ + FBconfig desired(8, 8); + desired.doublebuffer = (buffer != 1); + desired.depthBits = 16; + desired.stencilBits = 8; + desired.transparency = transparent; + desired.samples = msaa; + + unsigned int leastBufferDiff = UINT_MAX; + unsigned int leastColorDiff = UINT_MAX; + unsigned int leastExtraDiff = UINT_MAX; + + const FBconfig*best = &desired; + for (auto it = fbconfs.begin(); it != fbconfs.end(); it++) { + const FBconfig¤t = *it; + unsigned int bufferDiff = desired.bufferDifference(current); + unsigned int colorDiff = desired.colorChannelDifference(current); + unsigned int extraDiff = desired.extraChannelDifference(current); + + if (bufferDiff < leastBufferDiff) + best = ¤t; + else if (bufferDiff == leastBufferDiff) + { + if ((colorDiff < leastColorDiff) || + (colorDiff == leastColorDiff && extraDiff < leastExtraDiff)) + { + best = ¤t; } } + if (¤t == best) + { + leastBufferDiff = bufferDiff; + leastColorDiff = colorDiff; + leastExtraDiff = extraDiff; + } + } + XVisualInfo *vi = 0; + + //std::cerr << desired << " -> " << *best << std::endl; + + if (best->dpy && best->fb) { + vi = (XVisualInfo*) glXGetVisualFromFBConfigFn(best->dpy, best->fb); } if (vi == NULL) { @@ -544,10 +466,10 @@ struct gemglxwindow::PIMPL { errstr+="???"; break; case 1: - errstr+"single"; + errstr+="single"; break; case 2: - errstr+"double"; + errstr+="double"; break; } errstr+=" buffer window"; @@ -556,7 +478,7 @@ struct gemglxwindow::PIMPL { } if(vi->depth<24) { - ::verbose(0, "Only using %d color bits", vi->depth); + ::logpost(0, 3+0, "Only using %d color bits", vi->depth); } if (vi->c_class != TrueColor && vi->c_class != DirectColor) { pd_error(parent, "TrueColor visual required for this program (got %d)", @@ -591,6 +513,7 @@ struct gemglxwindow::PIMPL { swa.border_pixel = 0; // event_mask creates signal that window has been created swa.event_mask = EVENT_MASK; + swa.override_redirect = False; int flags; #ifdef HAVE_LIBXXF86VM @@ -611,19 +534,17 @@ struct gemglxwindow::PIMPL { XFree(modes); swa.override_redirect = True; - flags=CWBorderPixel|CWColormap|CWEventMask|CWOverrideRedirect; } else #endif { // !fullscren if (border) { swa.override_redirect = False; - flags=CWBorderPixel|CWColormap|CWEventMask|CWOverrideRedirect; } else { swa.override_redirect = True; - flags=CWBorderPixel|CWColormap|CWEventMask|CWOverrideRedirect; } } + flags=CWBorderPixel|CWColormap|CWEventMask|CWOverrideRedirect; fs = fullscreen; win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), x, y, w, h, @@ -790,10 +711,12 @@ void gemglxwindow::dispatch(void) XEvent event; XButtonEvent* eb = (XButtonEvent*)&event; XKeyEvent* kb = (XKeyEvent*)&event; - char keystring[2]; - KeySym keysym_return; unsigned long devID=0; + if(m_pimpl->fs) + XGrabKeyboard(m_pimpl->dpy, m_pimpl->win, True, GrabModeAsync, GrabModeAsync, CurrentTime); + + while (XCheckWindowEvent(m_pimpl->dpy,m_pimpl->win, StructureNotifyMask | KeyPressMask | KeyReleaseMask | @@ -816,7 +739,8 @@ void gemglxwindow::dispatch(void) if(!m_pimpl->have_border) { int err=XSetInputFocus(m_pimpl->dpy, m_pimpl->win, RevertToParent, CurrentTime); - err=0; + if(err) + err=0; } break; case KeyPress: @@ -929,10 +853,10 @@ bool gemglxwindow :: create(void) int x=0, y=0; unsigned int w=1, h=1; success=sharedPimpl->create(m_display, 2, false, false, x, y, w, h, - m_transparent); + m_transparent, m_fsaa); } catch (GemException&ex) { error("creation of shared glxcontext failed: %s", ex.what()); - verbose(0, "continuing at your own risk!"); + logpost(0, 3+0, "continuing at your own risk!"); } if(!sharedPimpl->gemcontext) { try { @@ -949,21 +873,18 @@ bool gemglxwindow :: create(void) /* creation of gem::Context is deferred until *after* window creation */ } - int modeNum=4; -#ifdef HAVE_LIBXXF86VM - XF86VidModeModeInfo **modes; -#endif - char svalue[3]; - snprintf(svalue, 3, "%d", m_fsaa); - svalue[2]=0; - if (m_fsaa!=0) { - setenv("__GL_FSAA_MODE", svalue, 1); // this works only for NVIDIA-cards + if(m_fsaa>=0 && m_fsaa<100) { + char svalue[3]; + snprintf(svalue, 3, "%d", m_fsaa); + svalue[2]=0; + if (m_fsaa!=0) { + setenv("__GL_FSAA_MODE", svalue, 1); // this works only for NVIDIA-cards + } } - try { success=m_pimpl->create(m_display, m_buffer, m_fullscreen, m_border, - m_xoffset, m_yoffset, m_width, m_height, m_transparent); + m_xoffset, m_yoffset, m_width, m_height, m_transparent, m_fsaa); } catch (GemException&x) { x.report(); success=false; @@ -1044,21 +965,21 @@ void gemglxwindow :: destroy(void) XUnmapWindow (m_pimpl->dpy, m_pimpl->win); err=XDestroyWindow(m_pimpl->dpy, m_pimpl->win); if(err) { - verbose(1, "XDestroyWindow returned %d", err); + logpost(0, 3+1, "XDestroyWindow returned %d", err); } } if (m_pimpl->cmap) { err=XFreeColormap(m_pimpl->dpy, m_pimpl->cmap); if(err) { - verbose(1, "XFreeColormap returned %d", err); + logpost(0, 3+1, "XFreeColormap returned %d", err); } } XFlush( m_pimpl->dpy ); err=XCloseDisplay(m_pimpl->dpy); /* this crashes if no window is there */ if(err) { - verbose(1, "XCloseDisplay returned %d", err); + logpost(0, 3+1, "XCloseDisplay returned %d", err); } } m_pimpl->dpy = NULL; @@ -1115,5 +1036,3 @@ void gemglxwindow :: cursorMess(bool state) void gemglxwindow :: obj_setupCallback(t_class *classPtr) { } - -#endif /* HAVE_GL_GLX_H */ diff --git a/src/Particles/Makefile.am b/src/Particles/Makefile.am index e459bbfb8..7e4a0809c 100644 --- a/src/Particles/Makefile.am +++ b/src/Particles/Makefile.am @@ -51,12 +51,14 @@ libParticles_la_SOURCES= \ part_gravity.h \ part_head.cpp \ part_head.h \ - part_info.cpp \ - part_info.h \ + part_information.cpp \ + part_information.h \ part_killold.cpp \ part_killold.h \ part_killslow.cpp \ part_killslow.h \ + part_move.cpp \ + part_move.h \ part_orbitpoint.cpp \ part_orbitpoint.h \ part_render.cpp \ diff --git a/src/Particles/part_info.cpp b/src/Particles/part_info.cpp deleted file mode 100644 index 8aec0d234..000000000 --- a/src/Particles/part_info.cpp +++ /dev/null @@ -1,161 +0,0 @@ -//////////////////////////////////////////////////////// -// -// GEM - Graphics Environment for Multimedia -// -// zmoelnig@iem.at -// -// Copyright (c) 1997-2000 Mark Danks. -// Copyright (c) Günther Geiger. -// Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. -// -///////////////////////////////////////////////////////// - -#include "part_info.h" - -#include - - -#include "papi/papi.h" - -CPPEXTERN_NEW(part_info); - -///////////////////////////////////////////////////////// -// -// part_info -// -///////////////////////////////////////////////////////// -// Constructor -// -///////////////////////////////////////////////////////// -part_info :: part_info() -{ - m_number=1000; - m_pos = new float[m_number*3]; - m_colors = new float[m_number*4]; - m_velo = new float[m_number*3]; - m_sizes = new float[m_number*3]; - m_ages = new float[m_number]; - - out_num = outlet_new(this->x_obj, 0); - out_pos = outlet_new(this->x_obj, 0); - out_col = outlet_new(this->x_obj, 0); - out_vel = outlet_new(this->x_obj, 0); - out_siz = outlet_new(this->x_obj, 0); - out_age = outlet_new(this->x_obj, 0); - - unsigned int i; - const unsigned int alistsize=sizeof(m_alist)/sizeof(*m_alist); - for(i=0; i 0.f) { - pMove(); - } - // pDrawGroupp(); - int cnt = pGetGroupCount(); - if(cnt < 1) { - return; - } - if (cnt>m_number) { - if(m_colors) { - delete[]m_colors; - } - if(m_sizes ) { - delete[]m_sizes; - } - if(m_pos ) { - delete[]m_pos; - } - if(m_velo ) { - delete[]m_velo; - } - if(m_ages ) { - delete[]m_ages; - } - m_number = cnt; - m_pos = new float[m_number * 3]; - m_colors = new float[m_number * 4]; - m_velo = new float[m_number * 3]; - m_sizes = new float[m_number * 3]; - m_ages = new float[m_number]; - } - float *position = m_pos; - float *color = m_colors; - float *velo = m_velo; - float *size = m_sizes; - float *age = m_ages; - pGetParticles(0, cnt, position, color, velo, size, age); - for(int i = 0; i < cnt; i++) { - SETFLOAT(m_alist+0, position[0]); - SETFLOAT(m_alist+1, position[1]); - SETFLOAT(m_alist+2, position[2]); - position+=3; - SETFLOAT(m_alist+3, color[0]); - SETFLOAT(m_alist+4, color[1]); - SETFLOAT(m_alist+5, color[2]); - SETFLOAT(m_alist+6, color[3]); - color+=4; - SETFLOAT(m_alist+7, velo[0]); - SETFLOAT(m_alist+8, velo[1]); - SETFLOAT(m_alist+9, velo[2]); - velo+=3; - SETFLOAT(m_alist+10, size[0]); - SETFLOAT(m_alist+11, size[1]); - SETFLOAT(m_alist+12, size[2]); - size+=3; - - outlet_float(out_age, age[i]); - outlet_list (out_siz, &s_list, 3, m_alist+10); - outlet_list (out_vel, &s_list, 3, m_alist+7); - outlet_list (out_col, &s_list, 4, m_alist+3); - outlet_list (out_pos, &s_list, 3, m_alist+0); - outlet_float(out_num, i); - continueRender(state); - } -} - -///////////////////////////////////////////////////////// -// static member functions -// -///////////////////////////////////////////////////////// -void part_info :: obj_setupCallback(t_class *classPtr) -{} diff --git a/src/Particles/part_information.cpp b/src/Particles/part_information.cpp new file mode 100644 index 000000000..22f90a60a --- /dev/null +++ b/src/Particles/part_information.cpp @@ -0,0 +1,118 @@ +//////////////////////////////////////////////////////// +// +// GEM - Graphics Environment for Multimedia +// +// zmoelnig@iem.at +// +// Copyright (c) 1997-2000 Mark Danks. +// Copyright (c) Günther Geiger. +// Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. +// +///////////////////////////////////////////////////////// + +#include "part_information.h" + +#include + + +#include "papi/papi.h" + +CPPEXTERN_NEW(part_information); + +///////////////////////////////////////////////////////// +// +// part_information +// +///////////////////////////////////////////////////////// +// Constructor +// +///////////////////////////////////////////////////////// +part_information :: part_information() +{ + const size_t length = 1024; + m_position.reserve(length*3); + m_color.reserve(length*4); + m_velocity.reserve(length*3); + m_size.reserve(length*3); + m_age.reserve(length); + + out_num = outlet_new(this->x_obj, 0); + out_position = outlet_new(this->x_obj, 0); + out_color = outlet_new(this->x_obj, 0); + out_velocity = outlet_new(this->x_obj, 0); + out_size = outlet_new(this->x_obj, 0); + out_age = outlet_new(this->x_obj, 0); + + unsigned int i; + const unsigned int alistsize=sizeof(m_alist)/sizeof(*m_alist); + for(i=0; im_position; + std::vectorm_color; + std::vectorm_size; + std::vectorm_velocity; + std::vectorm_age; - int m_number; - - t_outlet *out_num, *out_pos, *out_col, *out_vel, *out_siz, *out_age; + t_outlet *out_num, *out_position, *out_color, *out_velocity, *out_size, *out_age; t_atom m_alist[13]; }; diff --git a/src/Particles/part_move.cpp b/src/Particles/part_move.cpp new file mode 100644 index 000000000..6a02a0745 --- /dev/null +++ b/src/Particles/part_move.cpp @@ -0,0 +1,45 @@ +//////////////////////////////////////////////////////// +// +// GEM - Graphics Environment for Multimedia +// +// zmoelnig@iem.at +// +// Copyright (c) 2025 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. +// +///////////////////////////////////////////////////////// + +#include "part_move.h" +#include "papi/papi.h" + +CPPEXTERN_NEW(part_move); + +///////////////////////////////////////////////////////// +// +// part_move +// +///////////////////////////////////////////////////////// +// Constructor/Destructor +// +///////////////////////////////////////////////////////// +part_move :: part_move() {} +part_move :: ~part_move() {} + +///////////////////////////////////////////////////////// +// renderParticles +// +///////////////////////////////////////////////////////// +void part_move :: renderParticles(GemState *state) +{ + if (m_tickTime > 0.f) { + pMove(); + } +} + +///////////////////////////////////////////////////////// +// static member functions +// +///////////////////////////////////////////////////////// +void part_move :: obj_setupCallback(t_class *classPtr) +{} diff --git a/src/Particles/part_move.h b/src/Particles/part_move.h new file mode 100644 index 000000000..4ca06c81f --- /dev/null +++ b/src/Particles/part_move.h @@ -0,0 +1,49 @@ +/*----------------------------------------------------------------- +LOG + GEM - Graphics Environment for Multimedia + + Advance particles + + Copyright (c) 2025 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at + For information on usage and redistribution, and for a DISCLAIMER OF ALL + WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. + +-----------------------------------------------------------------*/ + +#ifndef _INCLUDE__GEM_PARTICLES_PART_MOVE_H_ +#define _INCLUDE__GEM_PARTICLES_PART_MOVE_H_ + +#include "Particles/partlib_base.h" + +/*----------------------------------------------------------------- +------------------------------------------------------------------- +CLASS + + part_move + + Draw a part_move group + +DESCRIPTION + +-----------------------------------------------------------------*/ +class GEM_EXTERN part_move : public partlib_base +{ + CPPEXTERN_HEADER(part_move, partlib_base); + +public: + + ////////// + // Constructor + part_move(); + + ////////// + virtual void renderParticles(GemState *state); + +protected: + + ////////// + // Destructor + virtual ~part_move(); +}; + +#endif // for header file diff --git a/src/Pixes/pix_background.cpp b/src/Pixes/pix_background.cpp index 87137a775..c257e45d4 100644 --- a/src/Pixes/pix_background.cpp +++ b/src/Pixes/pix_background.cpp @@ -29,7 +29,7 @@ pix_background :: pix_background(int argc, t_atom*argv) : m_savedImage.xsize=320; m_savedImage.ysize=240; - m_savedImage.setCsizeByFormat(GEM_RGBA); + m_savedImage.setFormat(GEM_RGBA); m_savedImage.reallocate(); switch(argc) { case 4: @@ -73,7 +73,7 @@ void pix_background :: processRGBAImage(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { @@ -122,7 +122,7 @@ void pix_background :: processGrayImage(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { @@ -163,7 +163,7 @@ void pix_background :: processYUVImage(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { @@ -217,7 +217,7 @@ void pix_background :: processRGBAMMX(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { @@ -271,7 +271,7 @@ void pix_background :: processYUVMMX(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { @@ -334,7 +334,7 @@ void pix_background :: processGrayMMX(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { @@ -396,7 +396,7 @@ void pix_background :: processYUVAltivec(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if (m_reset) { diff --git a/src/Pixes/pix_backlight.cpp b/src/Pixes/pix_backlight.cpp index 4014fd828..089b8ec85 100644 --- a/src/Pixes/pix_backlight.cpp +++ b/src/Pixes/pix_backlight.cpp @@ -83,7 +83,7 @@ void pix_backlight :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = (U32*)myImage.data; @@ -294,7 +294,7 @@ void pix_backlight :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = (U32*)myImage.data; diff --git a/src/Pixes/pix_biquad.cpp b/src/Pixes/pix_biquad.cpp index 6e2527c0b..0caa1b893 100644 --- a/src/Pixes/pix_biquad.cpp +++ b/src/Pixes/pix_biquad.cpp @@ -45,13 +45,13 @@ pix_biquad :: pix_biquad(int argc, t_atom*argv) : { prev.xsize = 64; prev.ysize = 64; - prev.setCsizeByFormat(GEM_RGBA); + prev.setFormat(GEM_RGBA); prev.reallocate(); prev.setBlack(); last.xsize = 64; last.ysize = 64; - last.setCsizeByFormat(GEM_RGBA); + last.setFormat(GEM_RGBA); last.reallocate(); last.setBlack(); @@ -80,11 +80,11 @@ void pix_biquad :: processRGBAImage(imageStruct &image) || image.csize!=prev.csize); prev.xsize = image.xsize; prev.ysize = image.ysize; - prev.setCsizeByFormat(image.format); + prev.setFormat(image.format); prev.reallocate(); last.xsize = image.xsize; last.ysize = image.ysize; - last.setCsizeByFormat(image.format); + last.setFormat(image.format); last.reallocate(); if (set) { @@ -153,11 +153,11 @@ void pix_biquad :: processYUVImage(imageStruct &image) || image.csize!=prev.csize); prev.xsize = image.xsize; prev.ysize = image.ysize; - prev.setCsizeByFormat(image.format); + prev.setFormat(image.format); prev.reallocate(); last.xsize = image.xsize; last.ysize = image.ysize; - last.setCsizeByFormat(image.format); + last.setFormat(image.format); last.reallocate(); if (set) { @@ -231,11 +231,11 @@ void pix_biquad :: processRGBAMMX(imageStruct &image) || image.csize!=prev.csize); prev.xsize = image.xsize; prev.ysize = image.ysize; - prev.setCsizeByFormat(image.format); + prev.setFormat(image.format); prev.reallocate(); last.xsize = image.xsize; last.ysize = image.ysize; - last.setCsizeByFormat(image.format); + last.setFormat(image.format); last.reallocate(); if (set) { @@ -378,11 +378,11 @@ void pix_biquad :: processYUVAltivec(imageStruct &image) || image.csize!=prev.csize); prev.xsize = image.xsize; prev.ysize = image.ysize; - prev.setCsizeByFormat(image.format); + prev.setFormat(image.format); prev.reallocate(); last.xsize = image.xsize; last.ysize = image.ysize; - last.setCsizeByFormat(image.format); + last.setFormat(image.format); last.reallocate(); if (set) { diff --git a/src/Pixes/pix_buffer.cpp b/src/Pixes/pix_buffer.cpp index a36c74c4b..acfdea516 100644 --- a/src/Pixes/pix_buffer.cpp +++ b/src/Pixes/pix_buffer.cpp @@ -24,57 +24,87 @@ #include "Gem/Files.h" #include "plugins/imagesaver.h" +#include "plugins/imageloader.h" #include "RTE/Outlet.h" /* utilities */ -static gem::any atom2any(t_atom*ap) +struct pix_buffer :: PIMPL { - gem::any result; - if(ap) { - switch(ap->a_type) { - case A_FLOAT: - result=atom_getfloat(ap); - break; - case A_SYMBOL: - result=std::string(atom_getsymbol(ap)->s_name); - break; - default: - result=ap->a_w.w_gpointer; + CPPExtern*parent; + gem::RTE::Outlet outlet; + + gem::plugins::imagesaver*saver; + gem::plugins::imageloader*loader; + + PIMPL(CPPExtern*_parent) + : parent(_parent) + , outlet(_parent) + , saver(gem::plugins::imagesaver::getInstance()) + , loader(gem::plugins::imageloader::getInstance()) + {}; + ~PIMPL(void) { + if(saver) { + delete saver; } + saver=NULL; + if(loader) { + delete loader; + } + loader=NULL; + }; + + std::vector savebackends; + std::vector loadbackends; + + static gem::any atom2any(t_atom*ap) + { + gem::any result; + if(ap) { + switch(ap->a_type) { + case A_FLOAT: + result=atom_getfloat(ap); + break; + case A_SYMBOL: + result=std::string(atom_getsymbol(ap)->s_name); + break; + default: + result=ap->a_w.w_gpointer; + } + } + return result; } - return result; -} -static void addProperties(CPPExtern*obj, gem::Properties&props, int argc, t_atom*argv) -{ - if(!argc) { - return; - } + void addProperties(gem::Properties&props, int argc, t_atom*argv) + { + if(!argc) { + return; + } - if(argv->a_type != A_SYMBOL) { - pd_error(obj, "no key given..."); - return; - } - std::string key=std::string(atom_getsymbol(argv)->s_name); - std::vector values; - argc--; - argv++; - while(argc-->0) { - values.push_back(atom2any(argv++)); - } - switch(values.size()) { - default: - props.set(key, values); - break; - case 1: - props.set(key, values[0]); - break; - case 0: { - gem::any dummy; - props.set(key, dummy); - } - break; + if(argv->a_type != A_SYMBOL) { + pd_error(parent, "no key given..."); + return; + } + std::string key=std::string(atom_getsymbol(argv)->s_name); + std::vector values; + argc--; + argv++; + while(argc-->0) { + values.push_back(atom2any(argv++)); + } + switch(values.size()) { + default: + props.set(key, values); + break; + case 1: + props.set(key, values[0]); + break; + case 0: { + gem::any dummy; + props.set(key, dummy); + } + break; + } } -} +}; ///////////////////////////////////////////////////////// // @@ -90,11 +120,10 @@ CPPEXTERN_NEW_WITH_TWO_ARGS(pix_buffer, t_symbol*,A_DEFSYMBOL,t_float, // ///////////////////////////////////////////////////////// pix_buffer :: pix_buffer(t_symbol* s,t_float f=100.0) - : m_buffer(NULL), - m_numframes(0), - m_bindname(NULL), - m_handle(NULL), - m_outlet(new gem::RTE::Outlet(this)) + : m_buffer(NULL) + , m_numframes(0) + , m_bindname(NULL) + , m_pimpl(new PIMPL(this)) { if (s==&s_) { static int buffercounter=0; @@ -113,10 +142,7 @@ pix_buffer :: pix_buffer(t_symbol* s,t_float f=100.0) m_numframes = (unsigned int)f; m_buffer = new imageStruct[m_numframes]; - m_handle = gem::plugins::imagesaver::getInstance(); - pd_bind(&this->x_obj->ob_pd, m_bindname); - outlet_new(this->x_obj, &s_float); } ///////////////////////////////////////////////////////// // Destructor @@ -130,11 +156,10 @@ pix_buffer :: ~pix_buffer( void ) delete [] m_buffer; } m_buffer=NULL; - if(m_handle) { - delete m_handle; + if(m_pimpl) { + delete m_pimpl; } - m_handle=NULL; - delete m_outlet; + m_pimpl=NULL; } ///////////////////////////////////////////////////////// // allocateMess @@ -167,7 +192,7 @@ void pix_buffer :: allocateMess(unsigned int x, unsigned int y, while(i--) { m_buffer[i].xsize=x; m_buffer[i].ysize=y; - m_buffer[i].setCsizeByFormat(format); + m_buffer[i].setFormat(format); m_buffer[i].reallocate(); m_buffer[i].setBlack(); } @@ -217,7 +242,7 @@ void pix_buffer :: resizeMess(int newsize) ///////////////////////////////////////////////////////// void pix_buffer :: bangMess( void ) { - m_outlet->send(m_numframes); + m_pimpl->outlet.send(m_numframes); } unsigned int pix_buffer :: numFrames( void ) { @@ -270,6 +295,7 @@ void pix_buffer :: loadMess(std::string filename, int pos) // load an image into mem imageStruct *image = NULL; + imageStruct img; // some checks if (pos<0 || pos>=m_numframes) { @@ -278,16 +304,32 @@ void pix_buffer :: loadMess(std::string filename, int pos) } std::string file=findFile(filename); - image = image2mem(file.c_str()); - if(!image) { - error("'%s' is no valid image!", file.c_str()); - return; + if(m_pimpl->loader) { + gem::Properties m_loadprops; /* empty for now */ + m_loadprops.erase("_backends"); + if(!m_pimpl->loadbackends.empty()) { + m_loadprops.set("_backends", m_pimpl->loadbackends); + } + if(m_pimpl->loader->load(file, img, m_loadprops)) { + image = &img; + } + + if(!image) { + error("unable to load image'%s'!", file.c_str()); + } + } else { + image = image2mem(file.c_str()); + if(!image) { + error("'%s' is no valid image!", file.c_str()); + return; + } } putMess(image,pos); // destroy the image-data - delete image; + if(image != &img) + delete image; } ///////////////////////////////////////////////////////// @@ -307,8 +349,12 @@ void pix_buffer :: saveMess(std::string filename, int pos) if(img && img->data) { std::string fullname=gem::files::getFullpath(filename); - if(m_handle) { - m_handle->save(*img, fullname, std::string(), m_writeprops); + if(m_pimpl->saver) { + m_writeprops.erase("_backends"); + if(!m_pimpl->savebackends.empty()) { + m_writeprops.set("_backends", m_pimpl->savebackends); + } + m_pimpl->saver->save(*img, fullname, std::string(), m_writeprops); } else { mem2image(img, fullname.c_str(), 0); } @@ -343,8 +389,8 @@ void pix_buffer :: enumProperties(void) gem::Properties props; props.set("quality", 100); - if(m_handle) { - m_handle->getWriteCapabilities(mimetypes, props); + if(m_pimpl->saver) { + m_pimpl->saver->getWriteCapabilities(mimetypes, props); } std::vectordata; @@ -355,20 +401,20 @@ void pix_buffer :: enumProperties(void) /* mimetypes */ data.push_back(std::string("numwrite")); data.push_back(mimetypes.size()); - m_outlet->send("mimelist", data); + m_pimpl->outlet.send("mimelist", data); for(i=0; isend("mimelist", data); + m_pimpl->outlet.send("mimelist", data); } /* write properties */ data.clear(); data.push_back(std::string("numwrite")); data.push_back(keys.size()); - m_outlet->send("proplist", data); + m_pimpl->outlet.send("proplist", data); for(i=0; isend("proplist", data); + m_pimpl->outlet.send("proplist", data); } } void pix_buffer :: clearProperties(void) @@ -411,9 +457,75 @@ void pix_buffer :: clearProperties(void) } void pix_buffer :: setProperties(t_symbol*s, int argc, t_atom*argv) { - addProperties(this, m_writeprops, argc, argv); + m_pimpl->addProperties(m_writeprops, argc, argv); +} +///////////////////////////////////////////////////////// +// backendMess +// +///////////////////////////////////////////////////////// +void pix_buffer :: backendMess(t_symbol*s, int argc, t_atom*argv) +{ + const std::string sel = s->s_name; + bool saver; + if(sel == "loadbackend") + saver = false; + else if (sel == "savebackend") + saver = true; + else { + error("Use 'loadbackend' to set/get image-loading backends, and 'savebackend' to set/get image-saving backends"); + return; + } + + if(argc) { + std::vector&backends = saver?m_pimpl->savebackends:m_pimpl->loadbackends; + backends.clear(); + for(int i=0; ia_type) { + t_symbol* b=atom_getsymbol(argv+i); + backends.push_back(b->s_name); + } else { + error("%s must be symbolic", s->s_name); + } + } + } else { + /* no backend requested, just enumerate them */ + + if((saver && m_pimpl->saver) || (!saver && m_pimpl->loader)) { + std::vectoratoms; + gem::any value; + gem::Properties props; + std::vector backends; + props.set("_backends", value); + if(saver) { + std::vector mimetypes; + m_pimpl->saver->getWriteCapabilities(mimetypes, props); + } else { + gem::plugins::imageloader::getProperties(m_pimpl->loader, props); + } + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); + } + atoms.clear(); + atoms.push_back(value=(int)(backends.size())); + m_pimpl->outlet.send(sel+"s", atoms); + if(!backends.empty()) { + for(int i=0; ioutlet.send(sel, atoms); + } + } else { + if(saver) { + post("no image saving backends found!"); + } else { + post("no image loading backends found!"); + } + } + } + } } + ///////////////////////////////////////////////////////// // static member function // @@ -436,6 +548,10 @@ void pix_buffer :: obj_setupCallback(t_class *classPtr) CPPEXTERN_MSG0(classPtr, "clearProps", clearProperties); CPPEXTERN_MSG (classPtr, "setProp", setProperties); CPPEXTERN_MSG (classPtr, "setProps", setProperties); + + CPPEXTERN_MSG (classPtr, "backend", backendMess); + CPPEXTERN_MSG (classPtr, "loadbackend", backendMess); + CPPEXTERN_MSG (classPtr, "savebackend", backendMess); } void pix_buffer :: allocateMess(t_symbol*s, int argc, t_atom*argv) { diff --git a/src/Pixes/pix_buffer.h b/src/Pixes/pix_buffer.h index 9bcd89c54..2e76c0370 100644 --- a/src/Pixes/pix_buffer.h +++ b/src/Pixes/pix_buffer.h @@ -81,6 +81,10 @@ class GEM_EXTERN pix_buffer : public CPPExtern virtual void clearProperties( void ); virtual void setProperties( t_symbol*, int, t_atom*); + ////////// + // Set backend to use + virtual void backendMess(t_symbol*s, int argc, t_atom*argv); + protected: imageStruct *m_buffer; unsigned int m_numframes; @@ -88,8 +92,9 @@ class GEM_EXTERN pix_buffer : public CPPExtern gem::Properties m_writeprops; - gem::plugins::imagesaver*m_handle; - gem::RTE::Outlet*m_outlet; + private: + class PIMPL; + PIMPL*m_pimpl; }; #endif // for header file diff --git a/src/Pixes/pix_colorreduce.cpp b/src/Pixes/pix_colorreduce.cpp index ae1e2cbd9..12888acee 100644 --- a/src/Pixes/pix_colorreduce.cpp +++ b/src/Pixes/pix_colorreduce.cpp @@ -52,7 +52,7 @@ pix_colorreduce :: pix_colorreduce(t_floatarg fcount) : tempImage.xsize=0; tempImage.ysize=0; - tempImage.setCsizeByFormat(GEM_RGBA); + tempImage.setFormat(GEM_RGBA); } ///////////////////////////////////////////////////////// @@ -108,7 +108,7 @@ void pix_colorreduce :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = reinterpret_cast(myImage.data); diff --git a/src/Pixes/pix_convert.cpp b/src/Pixes/pix_convert.cpp index d1c32f4ce..ec3d02714 100644 --- a/src/Pixes/pix_convert.cpp +++ b/src/Pixes/pix_convert.cpp @@ -34,7 +34,7 @@ pix_convert :: pix_convert(t_symbol*s) m_image.xsize=128; m_image.ysize=128; int fmt = getPixFormat(s->s_name); - m_image.setCsizeByFormat(fmt?fmt:GEM_RGBA); + m_image.setFormat(fmt?fmt:GEM_RGBA); m_image.reallocate(); } @@ -56,7 +56,7 @@ void pix_convert :: processImage(imageStruct &image) if (image.format==m_image.format) { return; } - m_image.setCsizeByFormat(); + m_image.setFormat(); if(!m_image.convertFrom(&image)) { post("no method for this format !!!"); post("if you know how to convert this format (0x%X) to (0x%X),\n" @@ -66,7 +66,7 @@ void pix_convert :: processImage(imageStruct &image) } image.data = m_image.data; image.not_owned = true; - image.setCsizeByFormat(m_image.format); + image.setFormat(m_image.format); } @@ -82,7 +82,7 @@ void pix_convert :: colorMess(t_symbol*s) { int fo = getPixFormat(s->s_name); if(fo) { - m_image.setCsizeByFormat(fo); + m_image.setFormat(fo); } setPixModified(); } diff --git a/src/Pixes/pix_deinterlace.cpp b/src/Pixes/pix_deinterlace.cpp index da5c80592..dc179fceb 100644 --- a/src/Pixes/pix_deinterlace.cpp +++ b/src/Pixes/pix_deinterlace.cpp @@ -25,7 +25,7 @@ pix_deinterlace :: pix_deinterlace() : { m_savedImage.xsize=320; m_savedImage.ysize=240; - m_savedImage.setCsizeByFormat(GEM_RGBA); + m_savedImage.setFormat(GEM_RGBA); m_savedImage.reallocate(); m_savedImage.setBlack(); } @@ -49,7 +49,7 @@ void pix_deinterlace :: processRGBAImage(imageStruct &image) || (m_savedImage.ysize != image.ysize)) { m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); } // if(saved!=m_savedImage.data)m_savedImage.setBlack();saved=m_savedImage.data; diff --git a/src/Pixes/pix_delay.cpp b/src/Pixes/pix_delay.cpp index 6eedaf9e8..c7d99641c 100644 --- a/src/Pixes/pix_delay.cpp +++ b/src/Pixes/pix_delay.cpp @@ -75,7 +75,7 @@ void pix_delay :: processImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); dest = myImage.data+m_curframe*dataSize; diff --git a/src/Pixes/pix_dot.cpp b/src/Pixes/pix_dot.cpp index 5a298dd17..928977a15 100644 --- a/src/Pixes/pix_dot.cpp +++ b/src/Pixes/pix_dot.cpp @@ -370,7 +370,7 @@ void pix_dot :: processRGBAImage(imageStruct &image) } myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); if(!alreadyInit) { @@ -435,7 +435,7 @@ void pix_dot :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); if(!alreadyInit) { @@ -502,7 +502,7 @@ void pix_dot :: processGrayImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); if(!alreadyInit) { diff --git a/src/Pixes/pix_dump.cpp b/src/Pixes/pix_dump.cpp index 1ce9a8c4b..5a153e342 100644 --- a/src/Pixes/pix_dump.cpp +++ b/src/Pixes/pix_dump.cpp @@ -97,7 +97,7 @@ namespace { for(size_t i=0; i<4; i++) { int ch = channels[i]; if(ch<0)continue; - t_float v = static_cast(src[channels[ch]]) * scale; + t_float v = static_cast(src[ch]) * scale; SETFLOAT(dest, v); dest++; count++; @@ -108,6 +108,23 @@ namespace { } template static inline + size_t data3_to_atoms(t_atom*dest, const T*src, size_t n, t_float scale, const int channels[3]) { + size_t count = 0; + while(n--) { + for(size_t i=0; i<3; i++) { + int ch = channels[i]; + //if(ch<0)continue; + t_float v = static_cast(src[ch]) * scale; + SETFLOAT(dest, v); + dest++; + count++; + } + src+=3; + } + return count; + } + template + static inline size_t data_to_atoms(t_atom*dest, const T*src, size_t N, t_float scale) { size_t count = 0; for(size_t n=0; n width || (y0 > height)) return 0; @@ -156,10 +174,9 @@ namespace { } break; case GEM_RGB: - /* TODO: honor chRed,chGreen/chBlue */ for(size_t r=y0; rgetProperties(props); - if(props.get("backends", m_ids)) { + if(props.get("_backends", m_ids)) { // } } @@ -343,9 +343,9 @@ void pix_film :: openMess(std::string filename, int format, // FIXXME: check whether using vector works on all platforms std::vectorbackends; backends.push_back(backend); - wantProps.set("backends", backends); + wantProps.set("_backends", backends); } else if (!m_backends.empty()) { - wantProps.set("backends", m_backends); + wantProps.set("_backends", m_backends); } if(!m_handle->open(fname, wantProps)) { @@ -627,8 +627,8 @@ void pix_film :: autoMess(double speed) void pix_film :: backendMess(t_symbol*s, int argc, t_atom*argv) { int i; - if(gensym("loader") != s) { - error("'%s' is deprecated; please use '%s' instead", s->s_name, "loader"); + if(gensym("backend") != s) { + error("'%s' is deprecated; please use '%s' instead", s->s_name, "backend"); } m_backends.clear(); if(argc) { @@ -650,25 +650,29 @@ void pix_film :: backendMess(t_symbol*s, int argc, t_atom*argv) } else { /* no backend requested, just enumerate them */ if(m_handle) { + const std::string selector = (s==gensym("backend"))?"backend":"loader"; + t_symbol*sel=gensym(selector.c_str()); + t_symbol*sels=gensym((selector+"s").c_str()); + t_atom at; t_atom*ap=&at; gem::Properties props; gem::any value; std::vector backends; value=m_ids; - props.set("backends", value); + props.set("_backends", value); m_handle->getProperties(props); - if(props.type("backends")!=gem::Properties::UNSET) { - props.get("backends", backends); + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); } SETFLOAT(ap+0, backends.size()); - outlet_anything(m_outEnd, gensym("loaders"), 1, ap); + outlet_anything(m_outEnd, sels, 1, ap); if(!backends.empty()) { for(i=0; i(create_pix_film)==zgetfn(&pd_objectmaker, gensym("pix_filmQT"))) { - ::verbose(2, "not registering [pix_filmQT] again..."); + ::logpost(0, 2+3, "not registering [pix_filmQT] again..."); } else { class_addcreator(reinterpret_cast(create_pix_film), gensym("pix_filmQT"), A_GIMME, A_NULL); @@ -720,6 +724,7 @@ void pix_film :: obj_setupCallback(t_class *classPtr) CPPEXTERN_MSG1(classPtr, "auto", autoMess, t_float); CPPEXTERN_MSG1(classPtr, "colorspace", csMess, t_symbol*); CPPEXTERN_MSG1(classPtr, "thread", threadMess, bool); + CPPEXTERN_MSG (classPtr, "backend", backendMess); CPPEXTERN_MSG (classPtr, "loader", backendMess); CPPEXTERN_MSG (classPtr, "driver", backendMess); CPPEXTERN_MSG0(classPtr, "bang", bangMess); diff --git a/src/Pixes/pix_freeframe.cpp b/src/Pixes/pix_freeframe.cpp index 184ce5b58..6c48fbcfb 100644 --- a/src/Pixes/pix_freeframe.cpp +++ b/src/Pixes/pix_freeframe.cpp @@ -917,7 +917,7 @@ pix_freeframe :: pix_freeframe(t_symbol*s) const char *pluginname = s->s_name; m_plugin = new FFPlugin(pluginname, getCanvas()); - m_image.setCsizeByFormat(m_plugin->GLformat()); + m_image.setFormat(m_plugin->GLformat()); unsigned int numparams = m_plugin->getNumParameters(); char tempVt[5]; @@ -1010,7 +1010,7 @@ void pix_freeframe :: processImage(imageStruct &image) } // convert the current image into a format that suits the FreeFrame-plugin - m_image.setCsizeByFormat(); + m_image.setFormat(); if(image.format != m_image.format) { if(m_image.convertFrom(&image)) { m_plugin->processFrame(m_image); @@ -1068,11 +1068,11 @@ static const int offset_pix_=strlen("pix_"); static void*freeframe_loader_new(t_symbol*s, int argc, t_atom*argv) { if(!s) { - ::verbose(2, "freeframe_loader: no name given"); + ::logpost(0, 3+2, "freeframe_loader: no name given"); return 0; } - ::verbose(2, "freeframe_loader: %s",s->s_name); + ::logpost(0, 3+2, "freeframe_loader: %s",s->s_name); try { \ const char*realname=s->s_name+offset_pix_; /* strip of the leading 'pix_' */ @@ -1084,7 +1084,7 @@ static void*freeframe_loader_new(t_symbol*s, int argc, t_atom*argv) proxy.setObject(new pix_freeframe(gensym(realname))); return proxy.initialize(); } catch (GemException&e) { - ::verbose(2, "freeframe_loader: failed! (%s)", e.what()); + ::logpost(0, 3+2, "freeframe_loader: failed! (%s)", e.what()); return 0; } return 0; diff --git a/src/Pixes/pix_frei0r.cpp b/src/Pixes/pix_frei0r.cpp index c4baec325..893c53145 100644 --- a/src/Pixes/pix_frei0r.cpp +++ b/src/Pixes/pix_frei0r.cpp @@ -440,8 +440,8 @@ pix_frei0r :: pix_frei0r(t_symbol*s) { // throw(GemException("Gem has been compiled without Frei0r-support!")); int can_rgba=0; - m_image.setCsizeByFormat(GEM_RGBA); - m_converterImage.setCsizeByFormat(GEM_RGBA); + m_image.setFormat(GEM_RGBA); + m_converterImage.setFormat(GEM_RGBA); if(!s || s==&s_) { m_canopen=true; @@ -592,7 +592,7 @@ void pix_frei0r :: processRGBAImage(imageStruct &image) swapBytes(image); } image.not_owned = true; - image.setCsizeByFormat(m_image.format); + image.setFormat(m_image.format); } void pix_frei0r :: parmMess(const std::string&key, int argc, t_atom *argv) @@ -694,10 +694,10 @@ static const int offset_pix_=strlen("pix_"); static void*frei0r_loader_new(t_symbol*s, int argc, t_atom*argv) { if(!s) { - ::verbose(2, "frei0r_loader: no name given"); + ::logpost(0, 3+2, "frei0r_loader: no name given"); return 0; } - ::verbose(2, "frei0r_loader: %s",s->s_name); + ::logpost(0, 3+2, "frei0r_loader: %s",s->s_name); try { const char*realname=s->s_name+offset_pix_; /* strip of the leading 'pix_' */ const int typespecs[] = {}; @@ -708,7 +708,7 @@ static void*frei0r_loader_new(t_symbol*s, int argc, t_atom*argv) proxy.setObject(new pix_frei0r(gensym(realname))); return proxy.initialize(); } catch (GemException&e) { - ::verbose(2, "frei0r_loader: failed! (%s)", e.what()); + ::logpost(0, 3+2, "frei0r_loader: failed! (%s)", e.what()); return 0; } return 0; @@ -745,7 +745,7 @@ bool pix_frei0r :: loader(const t_canvas*canvas, try { plugin=new F0RPlugin(filename); } catch (GemException&e) { - ::verbose(2, "frei0r_loader: failed!! (%s)", e.what()); + ::logpost(0, 3+2, "frei0r_loader: failed!! (%s)", e.what()); return false; } diff --git a/src/Pixes/pix_grey.cpp b/src/Pixes/pix_grey.cpp index 70e399246..eda784cad 100644 --- a/src/Pixes/pix_grey.cpp +++ b/src/Pixes/pix_grey.cpp @@ -31,7 +31,7 @@ CPPEXTERN_NEW(pix_grey); ///////////////////////////////////////////////////////// pix_grey :: pix_grey() { - m_image.setCsizeByFormat(GEM_GRAY); + m_image.setFormat(GEM_GRAY); } ///////////////////////////////////////////////////////// diff --git a/src/Pixes/pix_halftone.cpp b/src/Pixes/pix_halftone.cpp index 4f7e5584e..a13186238 100644 --- a/src/Pixes/pix_halftone.cpp +++ b/src/Pixes/pix_halftone.cpp @@ -67,7 +67,7 @@ void pix_halftone :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); U32*pOutput = reinterpret_cast(myImage.data); @@ -254,7 +254,7 @@ void pix_halftone :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); U32*pOutput = reinterpret_cast(myImage.data); @@ -460,7 +460,7 @@ void pix_halftone :: processGrayImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); unsigned char* pOutput = myImage.data; diff --git a/src/Pixes/pix_kaleidoscope.cpp b/src/Pixes/pix_kaleidoscope.cpp index 7c2209e5f..c18eeb38f 100644 --- a/src/Pixes/pix_kaleidoscope.cpp +++ b/src/Pixes/pix_kaleidoscope.cpp @@ -119,7 +119,7 @@ void pix_kaleidoscope :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = reinterpret_cast(myImage.data); @@ -574,7 +574,7 @@ void pix_kaleidoscope :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = reinterpret_cast(myImage.data); @@ -1026,7 +1026,7 @@ void pix_kaleidoscope :: processGrayImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); unsigned char*pOutputP=myImage.data; pOutput = reinterpret_cast(pOutputP); diff --git a/src/Pixes/pix_levels.cpp b/src/Pixes/pix_levels.cpp index ac90d673e..bf7f92a66 100644 --- a/src/Pixes/pix_levels.cpp +++ b/src/Pixes/pix_levels.cpp @@ -95,7 +95,7 @@ void pix_levels :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = reinterpret_cast(myImage.data); @@ -121,7 +121,7 @@ void pix_levels :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = reinterpret_cast(myImage.data); diff --git a/src/Pixes/pix_lumaoffset.cpp b/src/Pixes/pix_lumaoffset.cpp index a311f58c7..ee8fc7e9e 100644 --- a/src/Pixes/pix_lumaoffset.cpp +++ b/src/Pixes/pix_lumaoffset.cpp @@ -63,7 +63,7 @@ void pix_lumaoffset :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); U32*pOutput = reinterpret_cast(myImage.data); @@ -269,7 +269,7 @@ void pix_lumaoffset :: processGrayImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); U8* pOutput = static_cast(myImage.data); @@ -448,7 +448,7 @@ void pix_lumaoffset :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); myImage.setBlack(); U32*pOutput = reinterpret_cast(myImage.data); diff --git a/src/Pixes/pix_metaimage.cpp b/src/Pixes/pix_metaimage.cpp index a2648e865..bee9ddbed 100644 --- a/src/Pixes/pix_metaimage.cpp +++ b/src/Pixes/pix_metaimage.cpp @@ -64,7 +64,7 @@ void pix_metaimage :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = reinterpret_cast(myImage.data); @@ -116,7 +116,7 @@ void pix_metaimage :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); // myImage.setBlack(); pOutput = reinterpret_cast(myImage.data); @@ -168,7 +168,7 @@ void pix_metaimage :: processGrayImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); // myImage.setBlack(); pOutput = reinterpret_cast(myImage.data); diff --git a/src/Pixes/pix_motionblur.cpp b/src/Pixes/pix_motionblur.cpp index da0644bc2..dcbf1a2f2 100644 --- a/src/Pixes/pix_motionblur.cpp +++ b/src/Pixes/pix_motionblur.cpp @@ -33,7 +33,7 @@ pix_motionblur :: pix_motionblur(int argc, t_atom*argv) : m_savedImage.xsize=320; m_savedImage.ysize=240; - m_savedImage.setCsizeByFormat(GEM_RGBA); + m_savedImage.setFormat(GEM_RGBA); m_savedImage.reallocate(); m_savedImage.setBlack(); if(argc) { @@ -63,7 +63,7 @@ void pix_motionblur :: processRGBAImage(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if(saved!=m_savedImage.data) { m_savedImage.setBlack(); @@ -116,7 +116,7 @@ void pix_motionblur :: processGrayImage(imageStruct &image) unsigned char *saved = m_savedImage.data; m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if(saved!=m_savedImage.data) { m_savedImage.setBlack(); @@ -155,7 +155,7 @@ void pix_motionblur :: processYUVImage(imageStruct &image) m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if(saved!=m_savedImage.data) { m_savedImage.setBlack(); @@ -256,7 +256,7 @@ void pix_motionblur :: processMMX(imageStruct &image) { m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); int pixsize=image.ysize*image.xsize*image.csize; @@ -318,7 +318,7 @@ void pix_motionblur :: processYUVAltivec(imageStruct &image) unsigned char *saved = m_savedImage.data; m_savedImage.xsize=image.xsize; m_savedImage.ysize=image.ysize; - m_savedImage.setCsizeByFormat(image.format); + m_savedImage.setFormat(image.format); m_savedImage.reallocate(); if(saved!=m_savedImage.data) { m_savedImage.setBlack(); diff --git a/src/Pixes/pix_movement.cpp b/src/Pixes/pix_movement.cpp index 558b2ab30..8843e303e 100644 --- a/src/Pixes/pix_movement.cpp +++ b/src/Pixes/pix_movement.cpp @@ -40,10 +40,10 @@ CPPEXTERN_NEW_WITH_ONE_ARG(pix_movement,t_floatarg, A_DEFFLOAT); pix_movement :: pix_movement(t_floatarg f) { buffer.xsize = buffer.ysize = 64; - buffer.setCsizeByFormat(GEM_GRAY); + buffer.setFormat(GEM_GRAY); buffer.reallocate(); buffer2.xsize = buffer2.ysize = 64; - buffer2.setCsizeByFormat(GEM_GRAY); + buffer2.setFormat(GEM_GRAY); buffer2.reallocate(); if(f<=0.) { diff --git a/src/Pixes/pix_movement2.cpp b/src/Pixes/pix_movement2.cpp index 7e1c74933..c8962c99e 100644 --- a/src/Pixes/pix_movement2.cpp +++ b/src/Pixes/pix_movement2.cpp @@ -34,22 +34,22 @@ pix_movement2 :: pix_movement2(t_float lothresh, t_float hithresh): while(i--) { m_frame[i].xsize=0; m_frame[i].ysize=0; - m_frame[i].setCsizeByFormat(GEM_GRAY); + m_frame[i].setFormat(GEM_GRAY); m_frame[i].reallocate(); } m_output.xsize=0; m_output.ysize=0; - m_output.setCsizeByFormat(GEM_GRAY); + m_output.setFormat(GEM_GRAY); m_output.reallocate(); m_background.xsize=0; m_background.ysize=0; - m_background.setCsizeByFormat(GEM_GRAY); + m_background.setFormat(GEM_GRAY); m_background.reallocate(); m_threshold.xsize=0; m_threshold.ysize=0; - m_threshold.setCsizeByFormat(GEM_GRAY); + m_threshold.setFormat(GEM_GRAY); m_threshold.reallocate(); m_lowthresh=CLAMP(255.f*MIN(lothresh, hithresh)); @@ -125,7 +125,7 @@ void pix_movement2 :: processImage(imageStruct &image) } // 1. store the current frame as gray-image in the appropriate buffer - m_frame[m_frameIndex].setCsizeByFormat(); + m_frame[m_frameIndex].setFormat(); if(!m_frame[m_frameIndex].convertFrom(&image)) { error("no method for this kind of color"); return; diff --git a/src/Pixes/pix_multiblob.cpp b/src/Pixes/pix_multiblob.cpp index ae15c166d..3edc95542 100644 --- a/src/Pixes/pix_multiblob.cpp +++ b/src/Pixes/pix_multiblob.cpp @@ -121,7 +121,7 @@ pix_multiblob :: pix_multiblob(t_floatarg f) : // initialize image m_image.xsize=320; m_image.ysize=240; - m_image.setCsizeByFormat(GEM_GRAY); + m_image.setFormat(GEM_GRAY); m_image.allocate(); // outlets @@ -132,7 +132,6 @@ pix_multiblob :: pix_multiblob(t_floatarg f) : m_blobNumber = 6; } numBlobsMess(m_blobNumber); - } /*------------------------------------------------------------ @@ -174,8 +173,7 @@ void pix_multiblob :: makeBlob(Blob *pb, int x_ini, int y_ini) assert(cp); pb->area++; - t_float grey=(static_cast(m_image.GetPixel(cp->y, cp->x, - chGray))/255.0); + t_float grey=static_cast(m_image.data[cp->y * m_image.xsize + cp->x])/255.; double x = static_cast(cp->x); double y = static_cast(cp->y); pb->m_xaccum += grey*x; @@ -198,7 +196,7 @@ void pix_multiblob :: makeBlob(Blob *pb, int x_ini, int y_ini) pb->ymax(cp->y); } - m_image.SetPixel(cp->y,cp->x,chGray,0); + m_image.data[m_image.xsize * cp->y + cp->x] = 0; for(int i = -1; i<= 1; i++) { for(int j = -1; j <= 1; j++) { np.x = cp->x + j; @@ -206,7 +204,7 @@ void pix_multiblob :: makeBlob(Blob *pb, int x_ini, int y_ini) if(np.x >= 0 && np.y >= 0 && np.x < m_image.xsize && np.y < m_image.ysize && - m_image.GetPixel(np.y, np.x, chGray) > m_threshold ) { + m_image.data[m_image.xsize * np.y + np.x] > m_threshold ) { ptpush(¤t, &np); } } @@ -258,7 +256,7 @@ void pix_multiblob :: doProcessing(void) // detect blobs and add them to the currentBlobs-array for(int y = 0; y < m_image.ysize; y++) { for(int x = 0; x < m_image.xsize; x++) { - if (m_image.GetPixel(y,x,0) > 0) { + if (m_image.data[y * m_image.xsize + x] > 0) { Blob *blob = new Blob(); if(0 == blob) { continue; @@ -323,7 +321,7 @@ void pix_multiblob :: processImage(imageStruct &image) { // store the image in greyscale // since the algorithm is destructive we do it in a sandbox... - m_image.setCsizeByFormat(); + m_image.setFormat(); m_image.convertFrom(&image); doProcessing(); } diff --git a/src/Pixes/pix_multiimage.h b/src/Pixes/pix_multiimage.h index 455a3b32e..3b85b27f2 100644 --- a/src/Pixes/pix_multiimage.h +++ b/src/Pixes/pix_multiimage.h @@ -68,7 +68,7 @@ class GEM_EXTERN pix_multiimage : public GemBase int refCount; multiImageCache *next; imageStruct **images; - unsigned int *textBind; + unsigned int *textBind; int numImages; char *imageName; int baseImage; diff --git a/src/Pixes/pix_noise.cpp b/src/Pixes/pix_noise.cpp index 8965eab30..ede305024 100644 --- a/src/Pixes/pix_noise.cpp +++ b/src/Pixes/pix_noise.cpp @@ -57,7 +57,7 @@ pix_noise :: pix_noise(t_floatarg xsize, t_floatarg ysize) : // m_pixBlock.image = m_imageStruct; m_pixBlock.image.xsize = (int)xsize; m_pixBlock.image.ysize = (int)ysize; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.allocate(); generateNoise(); @@ -241,7 +241,7 @@ void pix_noise :: SETMess(int xsize, int ysize) m_pixBlock.image.clear(); m_pixBlock.image.xsize = (int)xsize; m_pixBlock.image.ysize = (int)ysize; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); generateNoise(); diff --git a/src/Pixes/pix_puzzle.cpp b/src/Pixes/pix_puzzle.cpp index 281592f20..fe56175ba 100644 --- a/src/Pixes/pix_puzzle.cpp +++ b/src/Pixes/pix_puzzle.cpp @@ -44,7 +44,7 @@ pix_puzzle :: pix_puzzle() : m_game(false) { myImage.xsize=myImage.ysize=512; - myImage.setCsizeByFormat(GEM_RGBA); + myImage.setFormat(GEM_RGBA); myImage.allocate(); } @@ -214,7 +214,7 @@ void pix_puzzle :: processImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); @@ -224,7 +224,7 @@ void pix_puzzle :: processImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); dest = myImage.data; @@ -296,7 +296,7 @@ void pix_puzzle :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); makePuzzleBlocks(image.xsize, image.ysize, image.csize); @@ -305,7 +305,7 @@ void pix_puzzle :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); dest = myImage.data; diff --git a/src/Pixes/pix_rds.cpp b/src/Pixes/pix_rds.cpp index 76d37356e..18b498ef8 100644 --- a/src/Pixes/pix_rds.cpp +++ b/src/Pixes/pix_rds.cpp @@ -39,7 +39,7 @@ pix_rds :: pix_rds(t_floatarg f) : static int count = 0; fastrand_val=count++; myImage.xsize=myImage.ysize=512; - myImage.setCsizeByFormat(GEM_RGBA); + myImage.setFormat(GEM_RGBA); myImage.allocate(); inlet_new(this->x_obj, &this->x_obj->ob_pd, gensym("float"), @@ -71,7 +71,7 @@ void pix_rds :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.upsidedown = image.upsidedown; myImage.reallocate(); @@ -180,7 +180,7 @@ void pix_rds :: processGrayImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(GEM_GRAY); + myImage.setFormat(GEM_GRAY); myImage.upsidedown = image.upsidedown; myImage.reallocate(); @@ -291,7 +291,7 @@ void pix_rds :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(GEM_GRAY); + myImage.setFormat(GEM_GRAY); myImage.upsidedown = image.upsidedown; myImage.reallocate(); diff --git a/src/Pixes/pix_record.cpp b/src/Pixes/pix_record.cpp index 1bb8c9d74..ec3ebf1cd 100644 --- a/src/Pixes/pix_record.cpp +++ b/src/Pixes/pix_record.cpp @@ -15,36 +15,16 @@ CPPEXTERN_NEW_WITH_GIMME(pix_record); -class pix_record :: PIMPL +struct pix_record :: PIMPL { -public: - PIMPL(void) {}; - ~PIMPL(void) {}; - - struct codechandle { - codechandle(gem::plugins::record*h, const std::string&c):handle(h), - codec(c) {} + CPPExtern*parent; - gem::plugins::record*handle; - std::string codec; - }; - std::map >m_codechandle; - std::vectorm_codecs; + PIMPL(CPPExtern*_parent) + : parent(_parent) + {}; + ~PIMPL(void) {}; - void addCodecHandle(gem::plugins::record*handle, const std::string&codec) - { -#ifdef __GNUC__ -# warning better handling of duplicate codecs -#endif - /* FIXME: we should generate a unique codec-ID, e.g. ":" */ - m_codechandle[codec].push_back(codechandle(handle, codec)); - m_codecs.push_back(codec); - } - void clearCodecHandle(void) - { - m_codecs.clear(); - m_codechandle.clear(); - } + std::vector backends; static gem::any atom2any(t_atom*ap) { @@ -63,14 +43,14 @@ class pix_record :: PIMPL } return result; } - static void addProperties(CPPExtern*obj, gem::Properties&props, int argc, t_atom*argv) + void addProperties(gem::Properties&props, int argc, t_atom*argv) { if(!argc) { return; } if(argv->a_type != A_SYMBOL) { - pd_error(obj, "no key given..."); + pd_error(parent, "no key given..."); return; } std::string key=std::string(atom_getsymbol(argv)->s_name); @@ -105,23 +85,20 @@ class pix_record :: PIMPL // Constructor // ///////////////////////////////////////////////////////// -pix_record :: pix_record(int argc, t_atom *argv): +pix_record :: pix_record(int argc, t_atom *argv) : m_banged(false), m_automatic(true), - m_outNumFrames(NULL), m_outInfo(NULL), + m_framesOut(gem::RTE::Outlet(this)), m_infoOut(gem::RTE::Outlet(this)), m_currentFrame(-1), m_maxFrames(0), m_recording(false), m_handle(NULL), - m_pimpl(new PIMPL()) + m_pimpl(new PIMPL(this)) { if (argc != 0) { error("ignoring arguments"); } - m_outNumFrames = outlet_new(this->x_obj, 0); - m_outInfo = outlet_new(this->x_obj, 0); - - m_handle=gem::plugins::record::getInstance(); + m_handle = gem::plugins::record::getInstance(); getCodecList(); } @@ -134,70 +111,11 @@ pix_record :: ~pix_record() if(m_handle) { delete m_handle; } - outlet_free(m_outNumFrames); - outlet_free(m_outInfo); - if(m_pimpl) { delete m_pimpl; } } - -///////////////////////////////////////////////////////// -// add backends -// -///////////////////////////////////////////////////////// -bool pix_record :: addHandle( std::vectoravailable, - std::string ID) -{ - unsigned int i=0; - int count=0; - - std::vectorid; - if(!ID.empty()) { - // if requested 'cid' is in 'available' add it to the list of 'id's - if(std::find(available.begin(), available.end(), ID)!=available.end()) { - id.push_back(ID); - } else { - // request for an unavailable ID - verbose(2, "backend '%s' unavailable", ID.c_str()); - return false; - } - } else { - // no 'ID' given: add all available IDs - id=available; - } - - for(i=0; i::getInstance(key); - } catch (GemException&ex) { - startpost("(%s) ", ex.what()); - handle=NULL; - } - if(NULL==handle) { - post("<--- DISABLED"); - break; - } - endpost(); - - m_ids.push_back(key); - m_allhandles.push_back(handle); - count++; - verbose(2, "added backend#%d '%s' @ %p", m_allhandles.size()-1, - key.c_str(), handle); - } - } - - return (count>0); -} - // // stops recording into the movie // @@ -213,12 +131,17 @@ void pix_record :: startRecording() } // find a handle for the current settings (filename, codec, props) - /* const std::string codec=m_codec; */ stopRecording(); - m_currentFrame = 0; + // do not re-set the codec, if there is no need... /* m_handle->setCodec(codec); */ + + m_props.erase("_backends"); + if(!m_pimpl->backends.empty()) { + m_props.set("_backends", m_pimpl->backends); + } + if(m_handle->start(m_filename, m_props)) { m_filename=std::string(""); m_recording=true; @@ -239,7 +162,7 @@ void pix_record :: stopRecording() if(m_recording) { m_handle->stop(); m_currentFrame = 0; - outlet_float(m_outNumFrames,m_currentFrame); + m_framesOut.send(m_currentFrame); verbose(1, "movie written"); } @@ -275,7 +198,7 @@ void pix_record :: render(GemState *state) if(success) { m_currentFrame++; - outlet_float(m_outNumFrames,m_currentFrame); + m_framesOut.send(m_currentFrame); } else { stopRecording(); } @@ -297,50 +220,50 @@ void pix_record :: enumPropertiesMess() return; } - t_atom ap[3]; + std::vectordata; + gem::any value; std::vectorkeys=props.keys(); + data.clear(); + data.push_back(value=(int)keys.size()); + m_infoOut.send("numprops", data); - SETFLOAT(ap+0, keys.size()); - outlet_anything(m_outInfo, gensym("numprops"), 1, ap); - unsigned int i=0; - for(i=0; iaddProperties(m_props, argc, argv); } void pix_record :: clearPropertiesMess() @@ -389,18 +312,19 @@ void pix_record :: getCodecList() std::vectorcodecs=m_handle->getCodecs(); - unsigned int i; - for(i=0; igetCodecDescription(codecname); + std::vectordata; + gem::any value; t_atom ap[3]; verbose(2, "codec%d: '%s': %s", i, codecname.c_str(), (descr.empty()?"":descr.c_str())); - SETFLOAT (ap+0, static_cast(i)); - SETSYMBOL(ap+1, gensym(codecname.c_str())); - SETSYMBOL(ap+2, gensym(descr.c_str())); - outlet_anything(m_outInfo, gensym("codec"), 3, ap); + data.push_back(value=i); + data.push_back(value=codecname); + data.push_back(value=descr); + m_infoOut.send("codec", data); } } @@ -466,6 +390,52 @@ void pix_record :: fileMess(t_symbol*s, int argc, t_atom *argv) } } +///////////////////////////////////////////////////////// +// backendMess +// +///////////////////////////////////////////////////////// +void pix_record :: backendMess(t_symbol*s, int argc, t_atom*argv) +{ + m_pimpl->backends.clear(); + if(argc) { + for(int i=0; ia_type) { + t_symbol* b=atom_getsymbol(argv+i); + m_pimpl->backends.push_back(b->s_name); + } else { + error("%s must be symbolic", s->s_name); + } + } + } else { + /* no backend requested, just enumerate them */ + if(m_handle) { + const std::string sel = s->s_name; + std::vectoratoms; + gem::any value; + gem::Properties props; + std::vector backends; + props.set("_backends", value); + m_handle->getProperties(props); + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); + } + atoms.clear(); + atoms.push_back(value=(int)(backends.size())); + m_infoOut.send(sel+"s", atoms); + if(!backends.empty()) { + for(int i=0; i(&pix_record::codecMessCallback), gensym("codec"), A_GIMME, A_NULL); + CPPEXTERN_MSG0(classPtr, "dialog", dialogMess); CPPEXTERN_MSG0(classPtr, "proplist", enumPropertiesMess); CPPEXTERN_MSG0(classPtr, "enumProps", enumPropertiesMess); CPPEXTERN_MSG (classPtr, "set", setPropertiesMess); diff --git a/src/Pixes/pix_record.h b/src/Pixes/pix_record.h index f35a9bea6..babbba742 100644 --- a/src/Pixes/pix_record.h +++ b/src/Pixes/pix_record.h @@ -21,6 +21,7 @@ #include "Base/GemBase.h" #include "Gem/Image.h" +#include "RTE/Outlet.h" #include "plugins/record.h" @@ -73,6 +74,10 @@ class GEM_EXTERN pix_record : public GemBase std::string m_filename; virtual void fileMess(t_symbol*s,int argc, t_atom *argv); + ////////// + // Set backend to use + virtual void backendMess(t_symbol*s, int argc, t_atom*argv); + ////////// // turn recording on/off virtual void recordMess(bool on); @@ -95,9 +100,9 @@ class GEM_EXTERN pix_record : public GemBase ////////// // a outlet for information like #frames - t_outlet *m_outNumFrames; + gem::RTE::Outlet m_framesOut; // another outlet for extra information (like list of codecs...) - t_outlet *m_outInfo; + gem::RTE::Outlet m_infoOut; int m_currentFrame; //keep track of the number of frames @@ -113,11 +118,6 @@ class GEM_EXTERN pix_record : public GemBase private: bool m_recording; gem::plugins::record *m_handle; - std::vectorm_ids; - std::vectorm_handles; - std::vectorm_allhandles; - virtual bool addHandle(std::vectoravailable_ids, - std::string id=std::string("")); ////////// // static member functions void autoMess(bool on); diff --git a/src/Pixes/pix_refraction.cpp b/src/Pixes/pix_refraction.cpp index 7813abcfb..e4fb00ac5 100644 --- a/src/Pixes/pix_refraction.cpp +++ b/src/Pixes/pix_refraction.cpp @@ -60,7 +60,7 @@ void pix_refraction :: processRGBAImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = (U32*)myImage.data; @@ -148,7 +148,7 @@ void pix_refraction :: processYUVImage(imageStruct &image) myImage.xsize = image.xsize; myImage.ysize = image.ysize; - myImage.setCsizeByFormat(image.format); + myImage.setFormat(image.format); myImage.reallocate(); pOutput = (U32*)myImage.data; diff --git a/src/Pixes/pix_resize.cpp b/src/Pixes/pix_resize.cpp index 1a4c272b5..fe6fcab33 100644 --- a/src/Pixes/pix_resize.cpp +++ b/src/Pixes/pix_resize.cpp @@ -58,7 +58,7 @@ void pix_resize :: processImage(imageStruct &image) if (wN != image.xsize || hN != image.ysize) { m_image.xsize=wN; m_image.ysize=hN; - m_image.setCsizeByFormat(image.format); + m_image.setFormat(image.format); m_image.reallocate(); // just for safety: it seems like gluScaleImage needs more memory then just the x*y*c diff --git a/src/Pixes/pix_rgba.cpp b/src/Pixes/pix_rgba.cpp index 6be0a4bf4..1237d8a34 100644 --- a/src/Pixes/pix_rgba.cpp +++ b/src/Pixes/pix_rgba.cpp @@ -31,7 +31,7 @@ CPPEXTERN_NEW(pix_rgba); ///////////////////////////////////////////////////////// pix_rgba :: pix_rgba() { - m_image.setCsizeByFormat(GEM_RGBA); + m_image.setFormat(GEM_RGBA); } ///////////////////////////////////////////////////////// @@ -50,7 +50,7 @@ void pix_rgba :: processImage(imageStruct &image) // note: [pix_yuv] and [pix_grey] inherit this function from [pix_rgba] // thus you shouldn't undefine anything below for performance reasons - m_image.setCsizeByFormat(); + m_image.setFormat(); if (image.format==m_image.format) { return; // we don't need to convert as we are already there } @@ -64,7 +64,7 @@ void pix_rgba :: processImage(imageStruct &image) image.data = m_image.data; image.not_owned = true; - image.setCsizeByFormat(m_image.format); + image.setFormat(m_image.format); } ///////////////////////////////////////////////////////// diff --git a/src/Pixes/pix_rtx.cpp b/src/Pixes/pix_rtx.cpp index 8cff528f3..a0752ecfc 100644 --- a/src/Pixes/pix_rtx.cpp +++ b/src/Pixes/pix_rtx.cpp @@ -47,7 +47,7 @@ bool refresh_buffer(const imageStruct&reference, imageStruct&buffer) // only 1 channel !!, to keep data-size handy unsigned char*data = buffer.data; size_t imagesize = reference.xsize * reference.ysize * reference.csize * sizeof(unsigned char); - size_t dataSize = imagesize * reference.ysize; + size_t dataSize = imagesize * reference.xsize; bool refresh= (reference.xsize != buffer.xsize) || (reference.ysize != buffer.ysize) || @@ -55,7 +55,7 @@ bool refresh_buffer(const imageStruct&reference, imageStruct&buffer) buffer.xsize = reference.xsize; buffer.ysize = reference.ysize; - buffer.setCsizeByFormat(reference.format); + buffer.setFormat(reference.format); if(data!=buffer.reallocate( dataSize ) || refresh) { buffer.setBlack(); @@ -80,7 +80,7 @@ pix_rtx :: pix_rtx() imageStruct image; image.xsize = image.ysize = 64; - image.setCsizeByFormat(GEM_RGBA); + image.setFormat(GEM_RGBA); refresh_buffer(image, buffer); diff --git a/src/Pixes/pix_set.cpp b/src/Pixes/pix_set.cpp index 9ba932ec0..b09caae0c 100644 --- a/src/Pixes/pix_set.cpp +++ b/src/Pixes/pix_set.cpp @@ -106,7 +106,7 @@ void pix_set :: startRendering() void pix_set :: postrender(GemState *state) { m_pixBlock.newimage = false; - state->set(GemState::_PIX,&m_pixels); + state->set(GemState::_PIX, m_pixels); } @@ -269,7 +269,7 @@ void pix_set :: SETMess(int xsize, int ysize) m_pixBlock.image.clear(); m_pixBlock.image.xsize = (int)xsize; m_pixBlock.image.ysize = (int)ysize; - m_pixBlock.image.setCsizeByFormat(GEM_RGBA); + m_pixBlock.image.setFormat(GEM_RGBA); m_pixBlock.image.reallocate(); m_pixBlock.image.setBlack(); } diff --git a/src/Pixes/pix_share_read.cpp b/src/Pixes/pix_share_read.cpp index a8055be85..14ae66734 100644 --- a/src/Pixes/pix_share_read.cpp +++ b/src/Pixes/pix_share_read.cpp @@ -37,7 +37,7 @@ void pix_share_read :: render(GemState *state) if (shm_addr) { t_pixshare_header *h=(t_pixshare_header *)shm_addr; unsigned char* data=shm_addr+sizeof(t_pixshare_header); - int csize=pix.image.setCsizeByFormat(h->format); + int csize=pix.image.setFormat(h->format); int imgsize=csize*h->xsize*h->ysize; if(imgsize) { pix.image.xsize=h->xsize; diff --git a/src/Pixes/pix_share_write.cpp b/src/Pixes/pix_share_write.cpp index d689c0ce8..278adafb0 100644 --- a/src/Pixes/pix_share_write.cpp +++ b/src/Pixes/pix_share_write.cpp @@ -270,7 +270,7 @@ int pix_share_write :: getShm(int argc,t_atom*argv) } imageStruct dummy; - dummy.setCsizeByFormat(color); + dummy.setFormat(color); m_size = (size)?(size):(xsize * ysize * dummy.csize); diff --git a/src/Pixes/pix_sig2pix~.cpp b/src/Pixes/pix_sig2pix~.cpp index de3a9f130..a6fce555b 100644 --- a/src/Pixes/pix_sig2pix~.cpp +++ b/src/Pixes/pix_sig2pix~.cpp @@ -77,10 +77,10 @@ void pix_sig2pix :: dimenMess(int width, int height) m_pixBlock.image.xsize =(GLint) width; m_pixBlock.image.ysize =(GLint) height; - m_pixBlock.image.setCsizeByFormat(m_reqFormat); + m_pixBlock.image.setFormat(m_reqFormat); if(m_reqType) { if(GEM_RGBA == m_reqFormat) - m_pixBlock.image.setCsizeByFormat(GL_RGBA); + m_pixBlock.image.setFormat(GL_RGBA); m_pixBlock.image.type = m_reqType; } diff --git a/src/Pixes/pix_snap.cpp b/src/Pixes/pix_snap.cpp index bef1a3a5b..4e752c8cb 100644 --- a/src/Pixes/pix_snap.cpp +++ b/src/Pixes/pix_snap.cpp @@ -137,7 +137,7 @@ void pix_snap :: snapMess(void) m_originalImage = new imageStruct; m_originalImage->xsize = m_width; m_originalImage->ysize = m_height; - m_originalImage->setCsizeByFormat(GEM_RGBA); + m_originalImage->setFormat(GEM_RGBA); if(m_reqType) m_originalImage->type = m_reqType; m_reqType = m_originalImage->type; diff --git a/src/Pixes/pix_snap2tex.cpp b/src/Pixes/pix_snap2tex.cpp index 943371713..fce45772e 100644 --- a/src/Pixes/pix_snap2tex.cpp +++ b/src/Pixes/pix_snap2tex.cpp @@ -157,6 +157,8 @@ void pix_snap2tex :: snapMess(void) if(!GLEW_VERSION_1_1 && !GLEW_EXT_texture_object) { return; } + if (!m_textureObj) + return; int width = m_width; int height = m_height; diff --git a/src/Pixes/pix_tIIR.cpp b/src/Pixes/pix_tIIR.cpp index 61d519aa5..ddf3bd689 100644 --- a/src/Pixes/pix_tIIR.cpp +++ b/src/Pixes/pix_tIIR.cpp @@ -80,7 +80,7 @@ pix_tIIR :: pix_tIIR(t_floatarg fb_numf, t_floatarg ff_numf) : m_buffer.xsize=64; m_buffer.ysize=64; - m_buffer.setCsizeByFormat(GEM_RGBA); + m_buffer.setFormat(GEM_RGBA); m_buffer.allocate(m_buffer.xsize*m_buffer.ysize*m_buffer.csize*m_bufnum); } @@ -225,7 +225,7 @@ void pix_tIIR :: processRGBAMMX(imageStruct &image) || m_buffer.format!=image.format) { m_buffer.xsize=image.xsize; m_buffer.ysize=image.ysize; - m_buffer.setCsizeByFormat(image.format); + m_buffer.setFormat(image.format); set=true; set_zero=true; diff --git a/src/Pixes/pix_tIIRf.cpp b/src/Pixes/pix_tIIRf.cpp index e1eb02be4..57feabddb 100644 --- a/src/Pixes/pix_tIIRf.cpp +++ b/src/Pixes/pix_tIIRf.cpp @@ -73,7 +73,7 @@ pix_tIIRf :: pix_tIIRf(t_floatarg fb_numf, t_floatarg ff_numf) m_image.xsize=0; m_image.ysize=0; - m_image.setCsizeByFormat(GEM_RGBA); + m_image.setFormat(GEM_RGBA); } ///////////////////////////////////////////////////////// @@ -129,7 +129,7 @@ void pix_tIIRf ::allocate(imageStruct&img) m_image.xsize=img.xsize; m_image.ysize=img.ysize; - m_image.setCsizeByFormat(img.format); + m_image.setFormat(img.format); m_image.reallocate(); m_image.setBlack(); diff --git a/src/Pixes/pix_test.cpp b/src/Pixes/pix_test.cpp index 00b9890ae..45553e04f 100644 --- a/src/Pixes/pix_test.cpp +++ b/src/Pixes/pix_test.cpp @@ -50,17 +50,35 @@ static volatile unsigned char getRandom(void) return (random_nextseed % 0xFF); } -static void makeSMPTE_RGBA(unsigned int rows, unsigned int cols, - unsigned char*DATA, float scale) +static unsigned int getLastRow(int rows, int stage, bool noise) { + if(noise) { + switch(stage) { + case 0: return rows*2/3; /* SMPTE */ + case 1: return rows*3/4; /* black-white */ + case 2: return rows*5/6; /* white-black */ + default: break; + } + } else { + switch(stage) { + case 0: return rows*3/4; /* SMPTE */ + case 1: return rows*7/8; /* black-white */ + case 2: return rows; /* white-black */ + default: break; + } + } + return rows; +} + +static void makeSMPTE_RGBA(unsigned int cols, unsigned int rows, + unsigned char*DATA, float scale, bool noise) { unsigned char*data=DATA; - unsigned int r,c; + unsigned int r=0; unsigned int row0, row1; - row0=0; - row1=rows*2/3; - for(r=row0; r>1; - row0=0; - row1=rows*2/3; - for(r=row0; ra_type && ((int)atom_getfloat(argv))>0) { - m_pix.image.xsize=m_pix.image.ysize=atom_getfloat(argv); + m_pixBlock.image.xsize=m_pixBlock.image.ysize=atom_getfloat(argv); } else { error("usage: pix_test ]"); } @@ -266,11 +274,11 @@ pix_test :: pix_test(int argc, t_atom*argv) if(A_FLOAT == argv[0].a_type && A_FLOAT == argv[1].a_type) { int i = atom_getfloat(argv); if(i>0) { - m_pix.image.xsize = i; + m_pixBlock.image.xsize = i; } i = atom_getfloat(argv+1); if(i>0) { - m_pix.image.ysize = i; + m_pixBlock.image.ysize = i; } } else { error("usage: pix_test [ ]"); @@ -281,14 +289,14 @@ pix_test :: pix_test(int argc, t_atom*argv) break; } - m_pix.image.setCsizeByFormat(GEM_RGBA); - m_pix.image.reallocate(); + m_pixBlock.image.setFormat(GEM_RGBA); + m_pixBlock.image.reallocate(); } pix_test :: pix_test() { - m_pix.image.xsize=m_pix.image.ysize=128; - m_pix.image.setCsizeByFormat(GEM_RGBA); - m_pix.image.reallocate(); + m_pixBlock.image.xsize=m_pixBlock.image.ysize=128; + m_pixBlock.image.setFormat(GEM_RGBA); + m_pixBlock.image.reallocate(); } ///////////////////////////////////////////////////////// @@ -304,43 +312,36 @@ pix_test :: ~pix_test() ///////////////////////////////////////////////////////// void pix_test :: render(GemState*state) { + bool noise = m_noise; float scale=1.; - int rows=m_pix.image.xsize; - int cols=m_pix.image.ysize; + int rows=m_pixBlock.image.xsize; + int cols=m_pixBlock.image.ysize; int datasize; - unsigned char* data=m_pix.image.data; - switch (m_pix.image.format) { + unsigned char* data=m_pixBlock.image.data; + switch (m_pixBlock.image.format) { case GEM_RGBA: - makeSMPTE_RGBA(m_pix.image.ysize, m_pix.image.ysize, m_pix.image.data, - scale); + makeSMPTE_RGBA(m_pixBlock.image.xsize, m_pixBlock.image.ysize, m_pixBlock.image.data, + scale, noise); break; case GEM_RGB: - makeSMPTE_RGB(m_pix.image.ysize, m_pix.image.ysize, m_pix.image.data, - scale); + makeSMPTE_RGB(m_pixBlock.image.xsize, m_pixBlock.image.ysize, m_pixBlock.image.data, + scale, noise); break; case GEM_YUV: - makeSMPTE_YUV(m_pix.image.ysize, m_pix.image.ysize, m_pix.image.data, - scale); + makeSMPTE_YUV(m_pixBlock.image.xsize, m_pixBlock.image.ysize, m_pixBlock.image.data, + scale, noise); break; case GEM_GRAY: - makeSMPTE_Grey(m_pix.image.ysize, m_pix.image.ysize, m_pix.image.data, - scale); + makeSMPTE_Grey(m_pixBlock.image.xsize, m_pixBlock.image.ysize, m_pixBlock.image.data, + scale, noise); break; } - //post("image=%d\tfilm=%d", m_pix.newimage,m_pix.newfilm); - m_pix.newimage=true; - state->set(GemState::_PIX, &m_pix); + //post("image=%d\tfilm=%d", m_pixBlock.newimage,m_pixBlock.newfilm); + m_pixBlock.newimage=true; + state->set(GemState::_PIX, &m_pixBlock); } -///////////////////////////////////////////////////////// -// static member function -// -///////////////////////////////////////////////////////// -void pix_test :: obj_setupCallback(t_class *classPtr) -{ - CPPEXTERN_MSG2(classPtr, "dimen", dimenMess, unsigned int, unsigned int); - CPPEXTERN_MSG1(classPtr, "colorspace", csMess, std::string); -} + void pix_test :: csMess(std::string cs) { std::string color; @@ -356,6 +357,7 @@ void pix_test :: csMess(std::string cs) for(i=0; iset(GemState::_PIX, static_cast(0)); } void pix_test :: dimenMess(unsigned int w, unsigned int h) { - m_pix.image.xsize=w; - m_pix.image.ysize=h; - m_pix.image.reallocate(); - m_pix.newfilm=true; + m_pixBlock.image.xsize=w; + m_pixBlock.image.ysize=h; + if(GEM_YUV == m_pixBlock.image.format && m_pixBlock.image.xsize%2) + m_pixBlock.image.xsize+=1; + m_pixBlock.image.reallocate(); + m_pixBlock.newfilm=true; +} +void pix_test :: noiseMess(bool noise) { + m_noise = noise; +} + +///////////////////////////////////////////////////////// +// static member function +// +///////////////////////////////////////////////////////// +void pix_test :: obj_setupCallback(t_class *classPtr) +{ + CPPEXTERN_MSG2(classPtr, "dimen", dimenMess, unsigned int, unsigned int); + CPPEXTERN_MSG1(classPtr, "colorspace", csMess, std::string); + CPPEXTERN_MSG1(classPtr, "noise", noiseMess, bool); } diff --git a/src/Pixes/pix_test.h b/src/Pixes/pix_test.h index 5fd45b5a5..5254ece50 100644 --- a/src/Pixes/pix_test.h +++ b/src/Pixes/pix_test.h @@ -57,10 +57,13 @@ class GEM_EXTERN pix_test : public GemPixObj virtual void render(GemState*); virtual void postrender(GemState*); - pixBlock m_pix; + pixBlock m_pixBlock; void dimenMess(unsigned int, unsigned int); void csMess(std::string); + void noiseMess(bool); + + bool m_noise; }; #endif // for header file diff --git a/src/Pixes/pix_texture.cpp b/src/Pixes/pix_texture.cpp index 9d5adf598..7ed517c71 100644 --- a/src/Pixes/pix_texture.cpp +++ b/src/Pixes/pix_texture.cpp @@ -430,7 +430,7 @@ void pix_texture :: render(GemState *state) //(skip Alpha since it isn't used) const bool do_yuv = m_yuv && GLEW_APPLE_ycbcr_422; if (!do_yuv && m_imagebuf.format == GEM_YUV) { - m_imagebuf.setCsizeByFormat(GL_RGB); + m_imagebuf.setFormat(GL_RGB); m_imagebuf.reallocate(); if(img) { m_imagebuf.fromYUV422(img->image.data); diff --git a/src/Pixes/pix_video.cpp b/src/Pixes/pix_video.cpp index 007d16733..177fc3e31 100644 --- a/src/Pixes/pix_video.cpp +++ b/src/Pixes/pix_video.cpp @@ -329,13 +329,12 @@ bool pix_video :: driverMess(t_symbol*s, int argc, t_atom*argv) { switch(argc) { case 0: - driverMess(); + enumDrivers(s->s_name); return true; case 1: break; default: - error("'driver' takes a single numeric or symbolic driver ID"); - return false; + goto oops; } switch(argv->a_type) { @@ -345,25 +344,30 @@ bool pix_video :: driverMess(t_symbol*s, int argc, t_atom*argv) return driverMess(atom_getsymbol(argv)->s_name); default: break; } - error("'driver' takes a single numeric or symbolic driver ID"); + oops: + error("'%s' takes a single numeric or symbolic driver ID", s->s_name); return false; } -void pix_video :: driverMess() +void pix_video :: enumDrivers(const char*selector) { // a little bit of info t_atom at; t_atom*ap=&at; + const std::string sel = selector; + const std::string sel0 = std::string("current") + sel; + const std::string sels = sel+"s"; + if(m_videoHandle) { post("current driver: '%s'", m_videoHandle->getName().c_str()); SETSYMBOL(ap+0, gensym(m_videoHandle->getName().c_str())); - outlet_anything(m_infoOut, gensym("currentdriver"), 1, ap); + outlet_anything(m_infoOut, gensym(sel0.c_str()), 1, ap); } if(m_videoHandles.size()>0) { unsigned int i=0; SETFLOAT(ap+0, m_videoHandles.size()); - outlet_anything(m_infoOut, gensym("drivers"), 1, ap); + outlet_anything(m_infoOut, gensym(sels.c_str()), 1, ap); post("available drivers:"); for(i=0; ixsize=m_width; m_originalImage->ysize=m_height; - m_originalImage->setCsizeByFormat(m_color); + m_originalImage->setFormat(m_color); m_originalImage->allocate(); } @@ -123,6 +123,22 @@ void pix_write :: doWrite(void) int width = m_width; int height = m_height; + int format = GEM_RGBA; + switch(m_color) { + case 1: + format = GEM_GRAY; + break; + case 3: + format = GEM_RGB; + break; + case 4: + format = GEM_RGBA; + break; + default: + error("unknown format 0x%X", format); + return; + } + GemMan::getDimen(((m_width >0)?NULL:&width ), ((m_height>0)?NULL:&height)); @@ -130,9 +146,9 @@ void pix_write :: doWrite(void) m_originalImage->ysize = height; #ifndef __APPLE__ - m_originalImage->setCsizeByFormat(m_color); + m_originalImage->setFormat(format); #else - m_originalImage->setCsizeByFormat(GEM_RGBA); + m_originalImage->setFormat(GEM_RGBA); #endif /* APPLE */ m_originalImage->reallocate(); diff --git a/src/Pixes/pix_yuv.cpp b/src/Pixes/pix_yuv.cpp index 538d9e152..6c1bf85c2 100644 --- a/src/Pixes/pix_yuv.cpp +++ b/src/Pixes/pix_yuv.cpp @@ -31,7 +31,7 @@ CPPEXTERN_NEW(pix_yuv); ///////////////////////////////////////////////////////// pix_yuv :: pix_yuv() { - m_image.setCsizeByFormat(GEM_YUV); + m_image.setFormat(GEM_YUV); } ///////////////////////////////////////////////////////// diff --git a/src/RTE/Array.cpp b/src/RTE/Array.cpp index 41414cb69..0751bb442 100644 --- a/src/RTE/Array.cpp +++ b/src/RTE/Array.cpp @@ -144,7 +144,19 @@ bool gem::RTE::Array :: resize(const size_t newsize) if(rte_resize) { rte_resize(m_pimpl->A, newsize); } else { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif defined _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4996 ) +#endif garray_resize(m_pimpl->A, newsize); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#elif defined _MSC_VER +#pragma warning( pop ) +#endif } return (size()==newsize); diff --git a/src/RTE/Makefile.am b/src/RTE/Makefile.am index 2a7e36112..13e88a994 100644 --- a/src/RTE/Makefile.am +++ b/src/RTE/Makefile.am @@ -23,6 +23,7 @@ libRTE_la_includedir = $(includedir)/Gem/RTE libRTE_la_include_HEADERS = \ RTE.h \ Array.h \ + Atom.h \ MessageCallbacks.h diff --git a/src/RTE/Outlet.cpp b/src/RTE/Outlet.cpp index 84988233e..49e1cac78 100644 --- a/src/RTE/Outlet.cpp +++ b/src/RTE/Outlet.cpp @@ -39,7 +39,7 @@ class gem::RTE::Outlet::PIMPL parent_=NULL; } } - static bool any2atom(const gem::any value, t_atom&atom) + bool any2atom(const gem::any value, t_atom&atom) { double d=0; std::string s=std::string(); @@ -73,7 +73,7 @@ class gem::RTE::Outlet::PIMPL } else if(ISTYPE(unsigned int)) { atype=A_FLOAT; d=any_cast(value); -#if 0 +#if 1 /* "long"s cannot be stored in "double"s without losing precision... */ } else if(ISTYPE(long)) { atype=A_FLOAT; @@ -104,6 +104,13 @@ class gem::RTE::Outlet::PIMPL } else if(ISTYPE(void*)) { atype=A_POINTER; p=any_cast(value); + } else { + if(parent_) + parent_->error("cannot convert gem::any of unknown type '%s' to t_atom", + value.get_type().name()); + else + pd_error(0, "cannot convert gem::any of unknown type '%s' to t_atom", + value.get_type().name()); } switch(atype) { diff --git a/src/Utils/GLUtil.cpp b/src/Utils/GLUtil.cpp index 880cc6d5e..5119784e3 100644 --- a/src/Utils/GLUtil.cpp +++ b/src/Utils/GLUtil.cpp @@ -20,6 +20,7 @@ #include #include "Gem/RTE.h" #include "Gem/ContextData.h" +#include "Base/CPPExtern.h" #include @@ -36,53 +37,64 @@ namespace { static const char* _gemglErrorString(GLenum err) { switch(err) { default: break; - case GL_NO_ERROR: return "no error"; - case GL_INVALID_ENUM: return "invalid enumerant"; - case GL_INVALID_VALUE: return "invalid value"; - case GL_INVALID_OPERATION: return "invalid operation"; - case GL_STACK_OVERFLOW: return "stack overflow"; - case GL_STACK_UNDERFLOW: return "stack underflow"; - case GL_OUT_OF_MEMORY: return "out of memory"; - case GL_TABLE_TOO_LARGE: return "table too large"; - case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid framebuffer operation"; + case GL_NO_ERROR: return "no error (GL)"; + case GL_INVALID_ENUM: return "invalid enumerant (GL)"; + case GL_INVALID_VALUE: return "invalid value (GL)"; + case GL_INVALID_OPERATION: return "invalid operation (GL)"; + case GL_STACK_OVERFLOW: return "stack overflow (GL)"; + case GL_STACK_UNDERFLOW: return "stack underflow (GL)"; + case GL_OUT_OF_MEMORY: return "out of memory (GL)"; + case GL_TABLE_TOO_LARGE: return "table too large (GL)"; + case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid framebuffer operation (GL)"; //case GL_INVALID_FRAMEBUFFER_OPERATION_EXT: return "invalid framebuffer operation"; - case GL_CONTEXT_LOST: return "context lost"; - case GL_RELATIVE_LINE_TO_NV: return "relative line to nv"; + case GL_CONTEXT_LOST: return "context lost (GL)"; + case GL_RELATIVE_LINE_TO_NV: return "relative line to nv (GL)"; /* GLU */ #ifdef GLU_INVALID_ENUM - case GLU_INVALID_ENUM: return "invalid enumerant"; + case GLU_INVALID_ENUM: return "invalid enumerant (GLU)"; #endif #ifdef GLU_INVALID_VALUE - case GLU_INVALID_VALUE: return "invalid value"; + case GLU_INVALID_VALUE: return "invalid value (GLU)"; #endif #ifdef GLU_OUT_OF_MEMORY - case GLU_OUT_OF_MEMORY: return "out of memory"; + case GLU_OUT_OF_MEMORY: return "out of memory (GLU)"; #endif #ifdef GLU_INCOMPATIBLE_GL_VERSION - case GLU_INCOMPATIBLE_GL_VERSION: return "incompatible gl version"; + case GLU_INCOMPATIBLE_GL_VERSION: return "incompatible gl version (GLU)"; #endif #ifdef GLU_INVALID_OPERATION - case GLU_INVALID_OPERATION: return "invalid operation"; + case GLU_INVALID_OPERATION: return "invalid operation (GLU)"; #endif /* GLU */ } return "unknown error"; } }; +const char* gem::utils::gl::glErrorString(GLenum err) { +#ifdef GEM_HAVE_GLU + return (const char*)gluErrorString(err); +#else + return _gemglErrorString(err)); +#endif +} + + +const char* gem::utils::gl::glErrorString(void) { + GLenum err = glGetError(); + if(err != GL_NO_ERROR) + return gem::utils::gl::glErrorString(err); + return 0; +} // if error dump gl errors to debugger string, return error GLenum gem::utils::gl::glReportError (bool verbose) { GLenum err = glGetError(); if (verbose && GL_NO_ERROR != err) { -#ifdef GEM_HAVE_GLU - post("GL[0x%X]: %s", err, (char*)gluErrorString(err)); -#else - post("GL[0x%X]: %s", err, _gemglErrorString(err)); -#endif - + const char *errStr = gem::utils::gl::glErrorString(err); + post("GL[0x%X]: %s", err, errStr); } // ensure we are returning an OSStatus noErr if no error condition if (err == GL_NO_ERROR) { @@ -92,6 +104,23 @@ GLenum gem::utils::gl::glReportError (bool verbose) } } +GLenum gem::utils::gl::glReportError (struct CPPExtern*parent, const char*prefix) +{ + GLenum errNum, finalErrNum=0; + if (!parent) + return glReportError(true); + + while ((errNum = glGetError()) != GL_NO_ERROR) { + finalErrNum = errNum; + const char*errStr = glErrorString(errNum); + if(errStr) + parent->error("%s%s [%d]", prefix?prefix:"", errStr, errNum); + else + parent->error("%sopenGL error 0x%X", prefix?prefix:"", errNum); + } + + return finalErrNum; +} #warning TODO: use gem::ContextData diff --git a/src/Utils/GLUtil.h b/src/Utils/GLUtil.h index ae63fe66b..fa681bf83 100644 --- a/src/Utils/GLUtil.h +++ b/src/Utils/GLUtil.h @@ -29,14 +29,24 @@ struct _symbol; #include "Gem/GemGL.h" #include "Gem/Exception.h" - +struct CPPExtern; namespace gem { namespace utils { namespace gl { + /* returns a string representation for the given error. + * no error (GL_NO_ERROR) might return a string saying so + */ + GEM_EXTERN const char* glErrorString(GLenum err); + /* checks if there's a pending openGL error, and returns the error description if fo + * returns NULL if there's no error + */ + GEM_EXTERN const char* glErrorString(void); GEM_EXTERN extern GLenum glReportError (bool verbose=true); + GEM_EXTERN extern GLenum glReportError (struct CPPExtern*, const char*prefix=0); + GEM_EXTERN extern int getGLdefine(const char *name); GEM_EXTERN extern int getGLdefine(const struct _symbol *name); GEM_EXTERN extern int getGLdefine(const struct _atom *name); diff --git a/src/Utils/SIMD.cpp b/src/Utils/SIMD.cpp index b999d6da1..0778d5d6a 100644 --- a/src/Utils/SIMD.cpp +++ b/src/Utils/SIMD.cpp @@ -42,7 +42,7 @@ GemSIMD :: GemSIMD(void) #endif if(compiledarchs>0) { - verbose(-1, "GEM: compiled for %s architecture", compiledstr.c_str()); + logpost(0, 3-1, "GEM: compiled for %s architecture", compiledstr.c_str()); } if(cpuid) { @@ -69,8 +69,8 @@ GemSIMD :: GemSIMD(void) case 0: /* this should never happen but is here for compilers who hate to "switch" with only one "case" */ usingstr="invalid"; } - verbose(-1, "GEM: using %s optimization", usingstr.c_str()); - verbose(-1, "GEM: detected %d CPUs", gem::thread::getCPUCount()); + logpost(0, 3-1, "GEM: using %s optimization", usingstr.c_str()); + logpost(0, 3-1, "GEM: detected %d CPUs", gem::thread::getCPUCount()); } } diff --git a/src/openGL/GEMglPatchParameteri.cpp b/src/openGL/GEMglPatchParameteri.cpp new file mode 100644 index 000000000..3e88916bb --- /dev/null +++ b/src/openGL/GEMglPatchParameteri.cpp @@ -0,0 +1,84 @@ +//////////////////////////////////////////////////////// +// +// GEM - Graphics Environment for Multimedia +// +// Implementation file +// +// Copyright (c) 2002-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at +// zmoelnig@iem.at +// For information on usage and redistribution, and for a DISCLAIMER +// * OF ALL WARRANTIES, see the file, "GEM.LICENSE.TERMS" +// +// this file has been generated... +//////////////////////////////////////////////////////// + +#include "GEMglPatchParameteri.h" + +CPPEXTERN_NEW_WITH_ONE_ARG ( GEMglPatchParameteri, t_floatarg, A_DEFFLOAT); + +///////////////////////////////////////////////////////// +// +// GEMglViewport +// +///////////////////////////////////////////////////////// +// Constructor +// +GEMglPatchParameteri :: GEMglPatchParameteri (t_floatarg arg0) : + param(static_cast(arg0)) +{ + m_inlet[0] = inlet_new(this->x_obj, &this->x_obj->ob_pd, &s_float, + gensym("param")); +} +///////////////////////////////////////////////////////// +// Destructor +// +GEMglPatchParameteri :: ~GEMglPatchParameteri () +{ + inlet_free(m_inlet[0]); +} + +////////////////// +// extension check +bool GEMglPatchParameteri :: isRunnable(void) +{ + if(GLEW_VERSION_1_1) { // TODO : put the correct version + return true; + } + error("your system does not support OpenGL-1.1"); + return false; +} + +///////////////////////////////////////////////////////// +// Render +// +void GEMglPatchParameteri :: render(GemState *state) +{ + glPatchParameteri (GL_PATCH_VERTICES, param); +} + +///////////////////////////////////////////////////////// +// Variables +// + +void GEMglPatchParameteri :: paramMess (t_float arg0) // FUN +{ + param = static_cast(arg0); + setModified(); +} + + +///////////////////////////////////////////////////////// +// static member functions +// + +void GEMglPatchParameteri :: obj_setupCallback(t_class *classPtr) +{ + class_addmethod(classPtr, + reinterpret_cast(&GEMglPatchParameteri::paramMessCallback), + gensym("param"), A_DEFFLOAT, A_NULL); +} + +void GEMglPatchParameteri :: paramMessCallback (void* data, t_float arg0) +{ + GetMyClass(data)->paramMess ( static_cast(arg0)); +} diff --git a/src/openGL/GEMglPatchParameteri.h b/src/openGL/GEMglPatchParameteri.h new file mode 100644 index 000000000..86155b0ac --- /dev/null +++ b/src/openGL/GEMglPatchParameteri.h @@ -0,0 +1,58 @@ +/* ------------------------------------------------------------------ + * GEM - Graphics Environment for Multimedia + * + * Copyright (c) 2002-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at + * zmoelnig@iem.at + * For information on usage and redistribution, and for a DISCLAIMER + * OF ALL WARRANTIES, see the file, "GEM.LICENSE.TERMS" + * + * this file has been generated... + * ------------------------------------------------------------------ + */ + +#ifndef _INCLUDE__GEM_OPENGL_GEMGLPATCHPARAMETERI_H_ +#define _INCLUDE__GEM_OPENGL_GEMGLPATCHPARAMETERI_H_ + +#include "Base/GemGLBase.h" + +/* + CLASS + GEMglPatchParameteri + KEYWORDS + openGL 0 + DESCRIPTION + wrapper for the openGL-function + "glPatchParameteri(GLint param)" + */ + +class GEM_EXTERN GEMglPatchParameteri : public GemGLBase +{ + CPPEXTERN_HEADER(GEMglPatchParameteri, GemGLBase); + +public: + // Constructor + GEMglPatchParameteri (t_float); // CON + +protected: + // Destructor + virtual ~GEMglPatchParameteri (); + // check extensions + virtual bool isRunnable(void); + + // Do the rendering + virtual void render (GemState *state); + + // variables + GLint param; // VAR + virtual void paramMess(t_float); // FUN + + +private: + + // we need some inlets + t_inlet *m_inlet[1]; + + // static member functions + static void paramMessCallback (void*, t_float); +}; +#endif // for header file diff --git a/src/openGL/GEMglReportError.cpp b/src/openGL/GEMglReportError.cpp index 115261375..25aa1995c 100644 --- a/src/openGL/GEMglReportError.cpp +++ b/src/openGL/GEMglReportError.cpp @@ -43,8 +43,14 @@ GEMglReportError :: ~GEMglReportError () // void GEMglReportError :: render(GemState *state) { - GLenum err=glReportError(); - outlet_float(m_outlet, static_cast(err)); + GLenum result=0, err; + while ((err = glReportError(false))) { + const char*errStr = glErrorString(err); + error("GL[0x%X]: %s", err, errStr?errStr:"generic error"); + if (err) + result = err; + } + outlet_float(m_outlet, static_cast(result)); } diff --git a/src/openGL/Makefile.am b/src/openGL/Makefile.am index 7217fb444..37bd63b40 100644 --- a/src/openGL/Makefile.am +++ b/src/openGL/Makefile.am @@ -626,5 +626,7 @@ libopenGL_la_SOURCES= \ GEMglViewport.cpp \ GEMglViewport.h \ GLdefine.cpp \ - GLdefine.h + GLdefine.h \ + GEMglPatchParameteri.cpp \ + GEMglPatchParameteri.h diff --git a/src/plugins/film.cpp b/src/plugins/film.cpp index 491878a4a..131aada0c 100644 --- a/src/plugins/film.cpp +++ b/src/plugins/film.cpp @@ -54,6 +54,11 @@ class filmIMAGE : public gem::plugins::film const gem::Properties&requestprops) { gem::Properties props=requestprops; + if(props.type("_backends")!=gem::Properties::UNSET) { + /* backends might be 'image' (which is a valid for film, + * but not for imageloader), so remove it */ + props.erase("_backends"); + } m_image.newfilm=true; return m_handle->load(name, m_image.image, props); } @@ -91,8 +96,7 @@ class filmIMAGE : public gem::plugins::film virtual void getProperties(gem::Properties&props) { std::vectorkeys=props.keys(); - unsigned int i=0; - for(i=0; i::getInstance(key); } catch(GemException&x) { handle=NULL; - verbose(1, "cannot use film plugin '%s': %s", key.c_str(), x.what()); + logpost(0, 3+1, "cannot use film plugin '%s': %s", key.c_str(), x.what()); } if(NULL==handle) { continue; @@ -163,7 +166,7 @@ class filmMeta : public gem::plugins::film m_ids.push_back(key); m_handles.push_back(handle); count++; - verbose(2, "added backend#%d '%s'", (int)(m_handles.size()-1), + logpost(0, 3+2, "added backend#%d '%s'", (int)(m_handles.size()-1), key.c_str()); } } @@ -191,8 +194,7 @@ class filmMeta : public gem::plugins::film addPlugin(ids, "MPEG1"); addPlugin(ids); - unsigned int i; - for(i=0; iisThreadable()) { m_canThread=false; break; @@ -209,11 +211,10 @@ class filmMeta : public gem::plugins::film } static bool firsttime=true; - if(firsttime && ids.size()>0) { + if(firsttime && m_ids.size()>0) { startpost("GEM: film loading plugins:"); - unsigned int i; - for(i=0; i backends; - if(requestprops.type("backends")!=gem::Properties::UNSET) { - requestprops.get("backends", backends); + if(requestprops.type("_backends")!=gem::Properties::UNSET) { + requestprops.get("_backends", backends); } - // requestprops.erase("backends"); bool tried=false; if(!backends.empty()) { - unsigned int i, j; - for(j=0; !m_handle && jopen(name, requestprops)) { + if(id==m_ids[i] + && (tried=true) + && m_handles[i]->open(name, requestprops) + ) { m_handle=m_handles[i]; break; } @@ -259,10 +259,9 @@ class filmMeta : public gem::plugins::film } if(!tried) { if(!backends.empty() && !m_handles.empty()) { - verbose(2, "no available backend selected, fall back to valid ones"); + logpost(0, 3+2, "no available backend selected, fall back to valid ones"); } - unsigned int i=0; - for(i=0; iopen(name, requestprops)) { m_handle=m_handles[i]; break; @@ -336,13 +335,12 @@ class filmMeta : public gem::plugins::film virtual void getProperties(gem::Properties&props) { std::vector ids; - if(props.type("backends")!=gem::Properties::UNSET) { - unsigned int i; - for(i=0; igetProperties(props); @@ -351,7 +349,7 @@ class filmMeta : public gem::plugins::film } if(!ids.empty()) { - props.set("backends", ids); + props.set("_backends", ids); } } }; diff --git a/src/plugins/imageloader.cpp b/src/plugins/imageloader.cpp index c44d0d592..c5d23ec13 100644 --- a/src/plugins/imageloader.cpp +++ b/src/plugins/imageloader.cpp @@ -29,14 +29,14 @@ namespace gem { namespace plugins { -class imageloaderMeta : public gem::plugins::imageloader +struct imageloaderMeta : public gem::plugins::imageloader { -private: +public: static imageloaderMeta*s_instance; std::vectorm_loaders; std::vectorm_ids; bool m_canThread; -public: + imageloaderMeta(void) : m_canThread(true) { gem::PluginFactory::loadPlugins("image"); @@ -49,8 +49,7 @@ class imageloaderMeta : public gem::plugins::imageloader static bool firsttime=true; if(firsttime && m_ids.size()>0) { startpost("GEM: image loading plugins:"); - unsigned int i; - for(i=0; iisThreadable()) { m_canThread=false; break; @@ -78,7 +77,7 @@ class imageloaderMeta : public gem::plugins::imageloader id.push_back(ID); } else { // request for an unavailable ID - verbose(2, "backend '%s' unavailable", ID.c_str()); + logpost(0, 3+2, "backend '%s' unavailable", ID.c_str()); return false; } } else { @@ -86,10 +85,9 @@ class imageloaderMeta : public gem::plugins::imageloader id=available; } - unsigned int i=0; - for(i=0; i::getInstance(key); } catch(GemException&x) { loader=NULL; - verbose(1, "cannot use image loader plugin '%s': %s", key.c_str(), + logpost(0, 3+1, "cannot use image loader plugin '%s': %s", key.c_str(), x.what()); } if(NULL==loader) { @@ -106,18 +104,16 @@ class imageloaderMeta : public gem::plugins::imageloader m_ids.push_back(key); m_loaders.push_back(loader); count++; - verbose(2, "added backend#%d '%s' @ %p", (int)(m_loaders.size()-1), + logpost(0, 3+2, "added backend#%d '%s' @ %p", (int)(m_loaders.size()-1), key.c_str(), loader); } } return (count>0); } -public: virtual ~imageloaderMeta(void) { - unsigned int i; - for(i=0; iload(filename, result, props)) { - return true; + std::vector backends; + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); + } + if(!backends.empty()) { + /* if the user requested some backends, use these */ + for(unsigned int j=0; jload(filename, result, props)) { + return true; + } + } + } + } else { + for(unsigned int i=0; iload(filename, result, props)) { + return true; + } } } return false; @@ -139,6 +152,21 @@ class imageloaderMeta : public gem::plugins::imageloader { return m_canThread; } + + void getProperties(gem::Properties&props) { + std::vector ids; + if(props.type("_backends")!=gem::Properties::UNSET) { + for(unsigned int i=0; i(loader); + if (meta != nullptr) { + meta->getProperties(props); + } else { + pd_error(0, "Unable to get properties from generic gem::plugins::imageloader (only meta-loader is supported)"); + } +} diff --git a/src/plugins/imageloader.h b/src/plugins/imageloader.h index 22bc5a7d8..5f91ee8b9 100644 --- a/src/plugins/imageloader.h +++ b/src/plugins/imageloader.h @@ -61,6 +61,12 @@ class GEM_EXTERN imageloader /* returns TRUE if this object can be used from within a thread */ virtual bool isThreadable(void) = 0; + + /** + * get the current value of the given properties from the loader + * not really used, except for controlling the meta-loader + */ + static void getProperties(imageloader*loader, gem::Properties&props); }; }; diff --git a/src/plugins/imagesaver.cpp b/src/plugins/imagesaver.cpp index 6362ff94d..8023d00f3 100644 --- a/src/plugins/imagesaver.cpp +++ b/src/plugins/imagesaver.cpp @@ -183,17 +183,14 @@ class imagesaverMeta : public imagesaver static bool firsttime=true; if(firsttime && m_ids.size()>0) { startpost("GEM: image saving plugins:"); - unsigned int i; - for(i=0; iisThreadable()) { m_threadable=false; break; @@ -212,7 +209,7 @@ class imagesaverMeta : public imagesaver id.push_back(ID); } else { // request for an unavailable ID - verbose(2, "backend '%s' unavailable", ID.c_str()); + logpost(0, 3+2, "backend '%s' unavailable", ID.c_str()); return false; } } else { @@ -220,10 +217,9 @@ class imagesaverMeta : public imagesaver id=available; } - unsigned int i=0; - for(i=0; i::getInstance(key); } catch(GemException&x) { saver=NULL; - verbose(1, "cannot use image loader plugin '%s': %s", key.c_str(), + logpost(0, 3+1, "cannot use image loader plugin '%s': %s", key.c_str(), x.what()); } if(NULL==saver) { @@ -240,7 +236,7 @@ class imagesaverMeta : public imagesaver m_ids.push_back(key); m_savers.push_back(saver); count++; - verbose(2, "added backend#%d '%s' @ %p", (int)(m_savers.size()-1), + logpost(0, 3+2, "added backend#%d '%s' @ %p", (int)(m_savers.size()-1), key.c_str(), saver); } } @@ -249,8 +245,7 @@ class imagesaverMeta : public imagesaver virtual ~imagesaverMeta(void) { - unsigned int i; - for(i=0; ipriorities; std::multimap::reverse_iterator rit; - unsigned int i; std::string mimetype=(mimetype_c.empty())?imgName2Mime( filename):mimetype_c; - for(i=0; iestimateSave(img, filename, mimetype, props); - priorities.insert( std::multimap::value_type(prio, i)); + std::vector backends; + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); } + if(!backends.empty()) { + /* if the user requested some backends, prioritize these */ + for(unsigned int j=0; jsave(img, filename, mimetype, props)) { + return true; + } + } + } + } else { + /* otherwise get the best saver (based on their own estimate */ + for(unsigned int i=0; iestimateSave(img, filename, mimetype, props); + priorities.insert( std::multimap::value_type(prio, i)); + } - for(rit=priorities.rbegin(); rit != priorities.rend(); ++rit) { - float prio=rit->first; - int index=rit->second; - verbose(2, "trying saver[%d]=%s / %f", index, m_ids[index].c_str(), prio); - if(m_savers[index]->save(img, filename, mimetype, props)) { - return true; + for(rit=priorities.rbegin(); rit != priorities.rend(); ++rit) { + float prio=rit->first; + int index=rit->second; + logpost(0, 3+2, "trying saver[%d]=%s / %f", index, m_ids[index].c_str(), prio); + if(m_savers[index]->save(img, filename, mimetype, props)) { + return true; + } } } @@ -292,18 +306,21 @@ class imagesaverMeta : public imagesaver virtual void getWriteCapabilities(std::vector&mimetypes, gem::Properties&props) { + std::vector ids; + if(props.type("_backends")!=gem::Properties::UNSET) { + for(unsigned int i=0; imimetypes_; gem::Properties props_; m_savers[i]->getWriteCapabilities(mimetypes_, props_); - for(j=0; jkeys=props_.keys(); - for(j=0; j::getInstance(key); } catch(GemException&x) { handle=NULL; - verbose(1, "cannot use modelloader plugin '%s': %s", key.c_str(), + logpost(0, 3+1, "cannot use modelloader plugin '%s': %s", key.c_str(), x.what()); } if(NULL==handle) { @@ -87,7 +86,7 @@ class modelloaderMeta : public gem::plugins::modelloader m_ids.push_back(key); m_handles.push_back(handle); count++; - verbose(2, "added backend#%d '%s'", (int)(m_handles.size()-1), + logpost(0, 3+2, "added backend#%d '%s'", (int)(m_handles.size()-1), key.c_str()); } } @@ -106,8 +105,7 @@ class modelloaderMeta : public gem::plugins::modelloader //addPlugin(ids, "MPEG1"); addPlugin(ids); - unsigned int i; - for(i=0; iisThreadable()) { m_canThread=false; break; @@ -117,8 +115,7 @@ class modelloaderMeta : public gem::plugins::modelloader static bool firsttime=true; if(firsttime && ids.size()>0) { startpost("GEM: model loading plugins:"); - unsigned int i; - for(i=0; i backends; - if(requestprops.type("backends")!=gem::Properties::UNSET) { - requestprops.get("backends", backends); + if(requestprops.type("_backends")!=gem::Properties::UNSET) { + requestprops.get("_backends", backends); } - // requestprops.erase("backends"); bool tried=false; if(!backends.empty()) { - unsigned int i, j; - for(j=0; !m_handle && jopen(name, requestprops)) { m_handle=m_handles[i]; @@ -164,10 +158,9 @@ class modelloaderMeta : public gem::plugins::modelloader } if(!m_handle && !tried) { if(!backends.empty() && !m_handles.empty()) { - verbose(2, "no available loader selected, falling back to valid ones"); + logpost(0, 3+2, "no available loader selected, falling back to valid ones"); } - unsigned int i=0; - for(i=0; iopen(name, requestprops)) { m_handle=m_handles[i]; break; @@ -242,13 +235,12 @@ class modelloaderMeta : public gem::plugins::modelloader virtual void getProperties(gem::Properties&props) { std::vector ids; - if(props.type("backends")!=gem::Properties::UNSET) { - unsigned int i; - for(i=0; igetProperties(props); @@ -257,7 +249,7 @@ class modelloaderMeta : public gem::plugins::modelloader } if(!ids.empty()) { - props.set("backends", ids); + props.set("_backends", ids); } } }; diff --git a/src/plugins/record.cpp b/src/plugins/record.cpp index 8afdfa747..b026aa2e2 100644 --- a/src/plugins/record.cpp +++ b/src/plugins/record.cpp @@ -36,7 +36,7 @@ class recordMeta : public gem::plugins::record { private: static recordMeta*s_instance; - std::vectorm_allHandles, // all available handles + std::vectorm_handles, // all available handles m_selectedHandles; // handles with the currently selected codec gem::plugins::record*m_handle; // currently opened handle (or NULL) std::vectorm_ids; // list of handle names @@ -87,9 +87,8 @@ class recordMeta : public gem::plugins::record # warning isThreadable #endif #if 0 - unsigned int i; - for(i=0; iisThreadable()) { + for(unsigned int i=0; iisThreadable()) { if(1) { m_canThread=false; break; @@ -100,8 +99,7 @@ class recordMeta : public gem::plugins::record static bool firsttime=true; if(firsttime && m_ids.size()>0) { startpost("GEM: video record plugins:"); - unsigned int i; - for(i=0; i::getInstance(key); } catch(GemException&x) { handle=NULL; - verbose(1, "cannot use record plugin '%s': %s", key.c_str(), x.what()); + logpost(0, 3+1, "cannot use record plugin '%s': %s", key.c_str(), x.what()); } if(NULL==handle) { continue; } m_ids.push_back(key); - m_allHandles.push_back(handle); + m_handles.push_back(handle); count++; - verbose(2, "added backend#%d '%s'", (int)(m_allHandles.size()-1), + logpost(0, 3+2, "added backend#%d '%s'", (int)(m_handles.size()-1), key.c_str()); } } @@ -157,22 +154,19 @@ class recordMeta : public gem::plugins::record public: virtual ~recordMeta(void) { - unsigned int i; - for(i=0; igetCodecs(void) { clearCodecHandle(); - unsigned int i; - for(i=0; ic=m_allHandles[i]->getCodecs(); - unsigned int j; - for(j=0; jc=m_handles[i]->getCodecs(); + for(unsigned int j=0; jsetCodec(codec)) { @@ -221,7 +214,7 @@ class recordMeta : public gem::plugins::record bool checkSelectedHandles(void) { if(m_selectedHandles.size()==0 && m_codec.empty()) { - m_selectedHandles=m_allHandles; + m_selectedHandles=m_handles; } return (m_selectedHandles.size()>0); } @@ -234,9 +227,8 @@ class recordMeta : public gem::plugins::record } checkSelectedHandles(); - unsigned int i; gem::plugins::record*handle=NULL; - for(i=0; idialog()) { break; @@ -261,8 +253,7 @@ class recordMeta : public gem::plugins::record return false; } - unsigned int i; - for(i=0; ienumProperties(props)) { return true; @@ -272,6 +263,28 @@ class recordMeta : public gem::plugins::record return false; } + virtual void getProperties(gem::Properties&props) + { + std::vector ids; + if(props.type("_backends")!=gem::Properties::UNSET) { + for(unsigned int i=0; igetProperties(props); + } else { + props.clear(); + } + + if(!ids.empty()) { + props.set("_backends", ids); + } + } + + ////////// // start recording // @@ -280,19 +293,43 @@ class recordMeta : public gem::plugins::record virtual bool start(const std::string&filename, gem::Properties&props) { stop(); + if(!checkSelectedHandles()) { return false; // no selected codec available } - unsigned int i; - for(i=0; istart(filename, props)) { - m_handle=m_selectedHandles[i]; - return true; + /* if the user requested some backends, prioritize these */ + std::vector backends; + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); + } + + bool tried=false; + if(!backends.empty()) { + for(unsigned int j=0; !m_handle && jstart(filename, props)) { + m_handle=m_selectedHandles[i]; + break; + } + } } } - m_handle=NULL; - return false; + if(!tried) { + if(!backends.empty() && !m_selectedHandles.empty()) { + logpost(0, 3+2, "no available backend selected, fall back to valid ones"); + } + for(unsigned int i=0; istart(filename, props)) { + m_handle=m_selectedHandles[i]; + break; + } + } + } + return (NULL != m_handle); } ////////// diff --git a/src/plugins/record.h b/src/plugins/record.h index 08e408f06..014d4865c 100644 --- a/src/plugins/record.h +++ b/src/plugins/record.h @@ -70,8 +70,12 @@ class GEM_EXTERN record */ virtual bool enumProperties(gem::Properties&props) = 0; + /** get the given properties from the currently selected codec + */ + virtual void getProperties(gem::Properties&props) = 0; + ////////// - // popup a dialog to set the codec interactively (interesting on os-x and w32) + // popup a dialog to set the codec interactively (interesting on OSX and w32) // just return FALSE if you don't support dialogs virtual bool dialog(void) = 0; diff --git a/src/plugins/video.cpp b/src/plugins/video.cpp index ac59a485f..506a97f54 100644 --- a/src/plugins/video.cpp +++ b/src/plugins/video.cpp @@ -33,8 +33,7 @@ class videoMeta : public gem::plugins::video { private: static videoMeta*s_instance; - std::vectorm_allHandles, // all available handles - m_selectedHandles; // handles with the currently selected codec + std::vectorm_handles; // all available handles gem::plugins::video*m_handle; // currently opened handle (or NULL) std::vectorm_ids; // list of handle names std::string m_codec; // currently selected codec @@ -72,7 +71,7 @@ class videoMeta : public gem::plugins::video id.push_back(ID); } else { // request for an unavailable ID - verbose(2, "Gem::video: backend '%s' unavailable", ID.c_str()); + logpost(0, 3+2, "Gem::video: backend '%s' unavailable", ID.c_str()); return false; } } else { @@ -80,10 +79,9 @@ class videoMeta : public gem::plugins::video id=available; } - unsigned int i=0; - for(i=0; i::getInstance(key); } catch(GemException&x) { handle=NULL; - verbose(1, "Gem::video: cannot use video plugin '%s': %s", key.c_str(), + logpost(0, 3+1, "Gem::video: cannot use video plugin '%s': %s", key.c_str(), x.what()); } if(NULL==handle) { continue; } m_ids.push_back(key); - m_allHandles.push_back(handle); + m_handles.push_back(handle); count++; - verbose(2, "Gem::video: added backend#%d '%s'", - (int)(m_allHandles.size()-1), key.c_str()); + logpost(0, 3+2, "Gem::video: added backend#%d '%s'", + (int)(m_handles.size()-1), key.c_str()); } } return (count>0); @@ -126,8 +124,8 @@ class videoMeta : public gem::plugins::video addPlugin(ids, "dv4l"); addPlugin(ids); - for(unsigned int i=0; iisThreadable()) { + for(unsigned int i=0; iisThreadable()) { m_canThread=false; break; } @@ -136,8 +134,7 @@ class videoMeta : public gem::plugins::video static bool firsttime=true; if(firsttime && ids.size()>0) { startpost("GEM: video capture plugins:"); - unsigned int i; - for(i=0; ienumerate(void) @@ -162,8 +158,8 @@ class videoMeta : public gem::plugins::video * "devicename:backend" with ':' being some special character unlikely to be found in devicenames */ std::vectorresult; - for(unsigned int i=0; ires=m_allHandles[i]->enumerate(); + for(unsigned int i=0; ires=m_handles[i]->enumerate(); for(unsigned int j=0; jsetDevice(ID)) { + for(unsigned int i=0; isetDevice(ID)) { result=true; } } @@ -185,8 +181,8 @@ class videoMeta : public gem::plugins::video { // compat bool result=false; - for(unsigned int i=0; isetDevice(ID)) { + for(unsigned int i=0; isetDevice(ID)) { result=true; } } @@ -201,13 +197,38 @@ class videoMeta : public gem::plugins::video if(m_handle) { close(); } - for(unsigned int i=0; iopen(props)) { - m_handle=m_allHandles[i]; - return true; + + std::vector backends; + if(props.type("_backends")!=gem::Properties::UNSET) { + props.get("_backends", backends); + } + + bool tried=false; + if(!backends.empty()) { + for(unsigned int j=0; !m_handle && jopen(props)) { + m_handle=m_handles[i]; + break; + } + } } } - return false; + if(!tried) { + if(!backends.empty() && !m_handles.empty()) { + logpost(0, 3+2, "no available backend selected, fall back to valid ones"); + } + for(unsigned int i=0; iopen(props)) { + m_handle=m_handles[i]; + break; + } + } + } + return (NULL != m_handle); } virtual bool start(void) { @@ -256,8 +277,8 @@ class videoMeta : public gem::plugins::video } bool result=false; - for(unsigned int i=0; ireset()) { + for(unsigned int i=0; ireset()) { result=true; } } @@ -281,9 +302,22 @@ class videoMeta : public gem::plugins::video } virtual void getProperties(gem::Properties&props) { - // OK + std::vector ids; + if(props.type("_backends")!=gem::Properties::UNSET) { + for(unsigned int i=0; igetProperties(props); + } else { + props.clear(); + } + + if(!ids.empty()) { + props.set("_backends", ids); } } virtual bool dialog(std::vectornames) @@ -308,8 +342,8 @@ class videoMeta : public gem::plugins::video } std::vectorresult; - for(unsigned int i=0; ires=m_allHandles[i]->dialogs(); + for(unsigned int i=0; ires=m_handles[i]->dialogs(); for(unsigned int j=0; jsetColor(color)) { + for(unsigned int i=0; isetColor(color)) { result=false; } } @@ -350,8 +384,8 @@ class videoMeta : public gem::plugins::video virtual bool provides(const std::string&ID) { // OK - for(unsigned int i=0; iprovides(ID)) { + for(unsigned int i=0; iprovides(ID)) { return true; } } @@ -362,8 +396,8 @@ class videoMeta : public gem::plugins::video // OK // LATER: remove dupes std::vectorresult; - for(unsigned int i=0; ires=m_allHandles[i]->provides(); + for(unsigned int i=0; ires=m_handles[i]->provides(); for(unsigned int j=0; j0) { numlocks=locks_; locks=new pthread_mutex_t*[numlocks]; - unsigned int i=0; - for(i=0; im_providers.size(); i++) + for(unsigned int i=0; im_providers.size(); i++) if(name == m_pimpl->m_providers[i]) { return true; } @@ -581,8 +577,7 @@ std::vectorvideoBase :: provides() { std::vectorresult; if(m_pimpl) { - unsigned int i; - for(i=0; im_providers.size(); i++) { + for(unsigned int i=0; im_providers.size(); i++) { result.push_back(m_pimpl->m_providers[i]); } } @@ -615,8 +610,7 @@ void videoBase :: setProperties(gem::Properties&props) // nada std::vector keys=props.keys(); - unsigned int i=0; - for(i=0; ikeys=props.keys(); - unsigned int i=0; - for(i=0; i