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:12] resonance |
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 41: | Ligne 246: | ||
* OpenFrameworks est une boîte à outil en C + + avec un langage, sous la forme d'un dossier à télécharger. Pour ouvrir, compiler et exécuter les projets il faut installer un logiciel que l'on nomme environnement de développement intégré (IDE en anglais) comme Code:: | * OpenFrameworks est une boîte à outil en C + + avec un langage, sous la forme d'un dossier à télécharger. Pour ouvrir, compiler et exécuter les projets il faut installer un logiciel que l'on nomme environnement de développement intégré (IDE en anglais) comme Code:: | ||
- | * 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 179: | Ligne 396: | ||
* l' | * l' | ||
+ | {{: | ||
+ | {{: | ||
- | + | ===== OpenGL / GLSL ===== | |
- | {{: | + | |
- | {{: | + | |
- | \\ | + | |
- | {{: | + | |
- | + | ||
- | + | ||
* Le **triangle** est la figure élémentaire pour fabriquer des scènes 3D ou 2D. Presque tout est triangle. | * Le **triangle** est la figure élémentaire pour fabriquer des scènes 3D ou 2D. Presque tout est triangle. | ||
* **Pipeline OpenGL** : | * **Pipeline OpenGL** : | ||
Ligne 195: | Ligne 407: | ||
- Fragmentés en pixels, on parle de **rasterization** | - Fragmentés en pixels, on parle de **rasterization** | ||
- Et finalement, une couleur est assignée à chaque pixel | - 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:// |