Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
logiciels:openframeworks:accueil [2015/03/15 18:00] resonance [Ressources] |
logiciels:openframeworks:accueil [2018/01/18 06:56] (Version actuelle) chenjianwei [2D et 3D PRIMITIVES] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== OpenFrameworks ====== | + | http:// |
- | OpenFrameworks est une boîte à outil (// | + | http:// |
- | http:// | + | http:// |
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== 2D et 3D PRIMITIVES | ||
+ | Cercle, carré, rectangle, sphère, cylindre, tore, cone, ... | ||
+ | |||
+ | {{.:primitives.png}} | ||
- | {{vimeo> | ||
===== Ressources ===== | ===== Ressources ===== | ||
- | * Un livre de la communauté (en cours de rédaction, mais déjà bien fourni) : [[https:// | + | * Un livre de la communauté (en cours de rédaction, mais déjà bien fourni) : [[https:// |
+ | / | ||
+ | * Le livre " | ||
* Tous les objets : http:// | * Tous les objets : http:// | ||
* Les tutoriels : http:// | * Les tutoriels : http:// | ||
Ligne 14: | Ligne 219: | ||
===== Atelier ===== | ===== Atelier ===== | ||
- | * [[.: | + | * [[.: |
===== Exemples ===== | ===== Exemples ===== | ||
Ligne 40: | Ligne 245: | ||
//Adapté du livre " | //Adapté du livre " | ||
- | * OpenFrameworks est une boîte à outil en C + + avec un langage, | + | * OpenFrameworks est une boîte à outil en C + + avec un langage, |
- | * OpenFrameworks est du pur C + +, Processing est un langage simplifié du Java (mais peut-être utilisé directement dans Java) | + | * OpenFrameworks est du pur C + +, Processing est un langage simplifié du Java (mais peut être utilisé directement dans Java) |
* Internet : plus simple avec Processing | * Internet : plus simple avec Processing | ||
* Beaucoup de 3D : OpenFrameworks (C + +) | * Beaucoup de 3D : OpenFrameworks (C + +) | ||
Ligne 54: | Ligne 259: | ||
- Télécharger [[http:// | - Télécharger [[http:// | ||
- Installer et configurer l' | - Installer et configurer l' | ||
- | - Pour Windows, télécharger aussi [[http:// | + | - Pour Windows, télécharger aussi [[http:// |
+ | - Pour Linux, il y a un dossier avec les scripts nécessaires à l' | ||
+ | - **cd your_oF_directory/ | ||
+ | - **sudo ./ | ||
+ | - **sudo ./ | ||
+ | - if you want to have support for mp3 and some video codecs: **sudo ./ | ||
===== Structure ===== | ===== Structure ===== | ||
* OpenFrameworks est un **dossier** | * OpenFrameworks est un **dossier** | ||
+ | |||
+ | * Un projet, c'est le dossier de votre projet associé aux accès vers toutes les fonctions et outils disponibles dans le Frameworks | ||
+ | {{: | ||
+ | |||
+ | * Trois fichiers pour commencer : main.cpp, ofApp.h, ofApp.cpp | ||
+ | {{: | ||
* Tous vos projets doivent être placés dans le dossier apps/myApps pour respecter la **hiérarchie**, | * Tous vos projets doivent être placés dans le dossier apps/myApps pour respecter la **hiérarchie**, | ||
Ligne 74: | Ligne 290: | ||
* Drawing in opengl is asynchronous, | * Drawing in opengl is asynchronous, | ||
* it’s useful for debugging. If you want to know why your code is running slow, now you can comment out the drawing and see if the visual representation that’s slow or the updating | * it’s useful for debugging. If you want to know why your code is running slow, now you can comment out the drawing and see if the visual representation that’s slow or the updating | ||
+ | |||
Ligne 177: | Ligne 394: | ||
Pour créer des objets en 3D, les manipuler, il faut essayer de comprendre deux champs : | Pour créer des objets en 3D, les manipuler, il faut essayer de comprendre deux champs : | ||
* les notions mathématiques utilisées ([[http:// | * les notions mathématiques utilisées ([[http:// | ||
- | * l' | + | * l' |
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | ===== OpenGL / GLSL ===== | ||
+ | * Le **triangle** est la figure élémentaire pour fabriquer des scènes 3D ou 2D. Presque tout est triangle. | ||
+ | * **Pipeline OpenGL** : | ||
+ | - Votre application OpenFrameworks remplit la mémoire avec un tableau de points 3D, appelés " | ||
+ | - Ces sommets sont **projetés** sur l' | ||
+ | - Assemblés en **triangles** | ||
+ | - Fragmentés en pixels, on parle de **rasterization** | ||
+ | - Et finalement, une couleur est assignée à chaque pixel | ||
+ | * **Vertex Shader** : les positions des sommets, peut aussi générer la couleur et les coordonnées de la texture pour la rasterisation. | ||
+ | * **Fragment Shader** : les couleurs des pixels | ||
+ | * **GLSL** : With GLSL, you can code short programs, called shaders, which are executed on the GPU. A shading language is a special programming language adapted to easily map on shader programming. It doesn' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{youtube> | ||
- | < | + | ==== Shader ==== |
- | {{: | + | === Version === |
- | {{: | + | Pour connaître la version OpenGL de votre carte graphique, il existe un exemple dans OpenFrameworks/ |
- | {{: | + | |
+ | {{: | ||
+ | < | ||
==== Ressources ==== | ==== Ressources ==== | ||
* On peut utiliser beaucoup de ressources de Processing, dont http:// | * On peut utiliser beaucoup de ressources de Processing, dont http:// |