Herramientas de usuario

Herramientas del sitio


wiki2:cpp:libraries:openframeworks

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
wiki2:cpp:libraries:openframeworks [2015/10/09 14:32]
alfred
wiki2:cpp:libraries:openframeworks [2020/05/09 09:25] (actual)
Línea 10: Línea 10:
   * **To add an addon after having created the project** you just need to include its name in the ''​addons.make''​ file.   * **To add an addon after having created the project** you just need to include its name in the ''​addons.make''​ file.
   * To compile with **C++11** you need to go to ''​libs/​openFrameworksCompiled/​project/​makefileCommon''​ path and edit the main makefile which is ''​compile.project.mk''​. You need to search for the rule that does the compilation and add: ''​-std=c++0x''​.   * To compile with **C++11** you need to go to ''​libs/​openFrameworksCompiled/​project/​makefileCommon''​ path and edit the main makefile which is ''​compile.project.mk''​. You need to search for the rule that does the compilation and add: ''​-std=c++0x''​.
-===== Obtain information ​=====+<code cpp> 
 +$(OF_PROJECT_OBJ_OUPUT_PATH)%.o:​ $(PROJECT_ROOT)/​%.cpp 
 + @echo "​Compiling"​ $< 
 + @mkdir -p $(@D) 
 + $(CXX) -c $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS) -std=c++0x -MMD -MP -MF $(OF_PROJECT_OBJ_OUPUT_PATH)$*.d -MT $(OF_PROJECT_OBJ_OUPUT_PATH)$*.o -o $@ -c $< 
 +</​code>​ 
 +  * Muy probablemente quieras usar otras libs, las tendrías que añadir también en el makefile: 
 +<code cpp> 
 +$(TARGET): $(OF_PROJECT_OBJS) $(OF_PROJECT_ADDONS_OBJS) $(OF_PROJECT_LIBS) $(TARGET_LIBS) 
 + @echo '​Linking $(TARGET) for $(ABI_LIB_SUBPATH)'​ 
 + @mkdir -p $(@D) 
 + $(CXX) -o $@ $(OF_PROJECT_OBJS) $(OF_PROJECT_ADDONS_OBJS) $(TARGET_LIBS) $(OF_PROJECT_LIBS) $(LDFLAGS) $(OF_CORE_LIBS) ​ -lboost_system -lboost_timer -lboost_thread  
 +</​code>​ 
 +===== Useful data ===== 
 +==== Obtain information ====
  
   * Ventana   * Ventana
     * ofGetWidth(),​ ofGetHeight()     * ofGetWidth(),​ ofGetHeight()
 +  * Programa
 +    * ofGetElapsedTimef(),​ ofGetElapsedTimeMicros(),​ ofGetElapsedTimeMillis()
  
 +==== Useful constants ====
  
 +  * TWO_PI 
 +  * DEG_TO_RAD (any number we multiply by DEG_TO_RAD will be converted to radians)
 ===== Graphics ===== ===== Graphics =====
  
Línea 27: Línea 45:
 Crear un listener de UDP: Crear un listener de UDP:
 <code cpp> <code cpp>
 +#include "​ofxNetwork.h"​
 +
 ofxUDPManager udpConnection;​ ofxUDPManager udpConnection;​
  
Línea 41: Línea 61:
   * https://​github.com/​jefftimesten/​ofxJSON   * https://​github.com/​jefftimesten/​ofxJSON
 <code cpp> <code cpp>
 +#include "​ofxJSON.h"​
 +...
 ofxJSONElement result; ofxJSONElement result;
 std::string url = "​http://​127.0.0.1:​5000/​sketch/​1";​ std::string url = "​http://​127.0.0.1:​5000/​sketch/​1";​
wiki2/cpp/libraries/openframeworks.1444401161.txt.gz · Última modificación: 2020/05/09 09:25 (editor externo)