openframeworks

Patched FTDIUSBSerialDriver kext has to be unloaded/reloaded after reboot (OSX 10.10). Any ideas?

懵懂的女人 提交于 2019-12-11 09:32:34
问题 I'm exchanging data between a bare-bone Arduino and openFrameworks via a serial UART FTDI connection. I'm using a patched FTDI driver to achieve higher BAUD rates on OSX. FTDIChip calls it "Aliasing VCP Baud Rates". See: http://spin.atomicobject.com/2013/06/23/baud-rates-ftdi-driver-mac/ https://github.com/arminbw/wiretouch/blob/v0.21/perl/modify-ftdi-driver-settings.pl This worked until recently. Since upgrading to OSX 10.10 I have to manually unload and reload the kext to make it work: sudo

Passing a void function as an argument to another function

╄→гoц情女王★ 提交于 2019-12-08 13:41:07
问题 I'm trying to pass a void function to another void function, unsuccessfully so far. So I created this function inside the class called ExitButton like this. ExitButton.h: class ExitButton{ void setup(void (*_setup)); }; Then I include that class into another class like this. ofApp.h: include "ExitButton.h" class ofApp : public ofBaseApp{ void update(); void setup(); StartButton *startButton; } So in my ofApp.cpp I want to call the update function like this: void ofApp::update(){ exitButton-

How to port corebluetooth from Objective C to Objective C++

China☆狼群 提交于 2019-12-08 12:15:47
问题 I was hoping to get some help with a project I'm working on. I'm currently trying to rework this code https://github.com/djwait/CoreBluetoothExample written in Objective -c into Openframeworks ios Objective c++. However I am a complete beginner to Objective -c and am feeling lost as to how to proceed. The aim is to get access to the variable uint16_t heartRate (from the original app) and use it in c++ code. More than anything I’m confused as to how the original code is creating an

Using the Parent constructor to initialize a child class

岁酱吖の 提交于 2019-12-07 15:14:25
I want to create a general class called Button that others inherit from, so that for example I can have StartButton, ContinueButton, etc. There are certain values regardless of the different properties that I want to start with the constructor since they will always be needed so I built my own Button Class like this: #pragma once #include "ofMain.h" class Button { public: Button(ofPoint _pos, string _text); virtual void setup(); virtual void update(); virtual void draw(); protected: ofTrueTypeFont buttonName; ofPoint pos; string text, fontName; bool isClicked; int buttonFader, buttonFaderVel;

how can I fix xcode compiling everything all the time?

一世执手 提交于 2019-12-07 05:02:37
问题 This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 10 years ago . I've started to use XCode and it seems to work, well, most of it. The annoying thing is it compiles all the source files, even those that didn't change, each and every time. I'm getting the grips with openframeworks and I waste time compiling the openframeworks source files every time although they don't change. Here are my IDE and machine details: XCode Version 3.1.2 Component

how can I fix xcode compiling everything all the time?

偶尔善良 提交于 2019-12-05 11:44:05
I've started to use XCode and it seems to work, well, most of it. The annoying thing is it compiles all the source files, even those that didn't change, each and every time. I'm getting the grips with openframeworks and I waste time compiling the openframeworks source files every time although they don't change. Here are my IDE and machine details: XCode Version 3.1.2 Component versions Xcode IDE: 1149.0 Xcode Core: 1148.0 ToolSupport: 1102.0 Mac OS X Version 10.5.6 Has any one experienced the same problem ? Any workarounds ? Many (most?) build systems use the last-modified date and time of

开源框架 openFrameworks

时间秒杀一切 提交于 2019-12-05 06:52:31
转自: https://www.cnblogs.com/lidabo/p/9134174.html 此处仅供学习,版权属原作者; 作为一个图形图像方向的研究生,我经常都在和 OpenGL 、OpenCV 等多种 C++ 库打交道。这些库遵循着不同的规则和用法;另外,为了让自己的程序具有更多的交互能力,编写界面也是一个家常便饭的工作。 然而,随着工程复杂性的增加,库的管理和界面的维护也变得越来越困难:一方面,库的增加和删除不仅会增加学习成本,也会对系统的逻辑层带来影响。而另一方面,如果要让自己的项目易于维护,就要尽可能地应用设计模式,让逻辑和界面分离。但对于科研,一味陷入设计模式的桎梏又会带来过早优化的问题,影响科研进度。 直到后来,我接触到了 openFrameworks ,简直有种相逢恨晚的感觉。openFrameworks 封装了常用的 C++ 库,在此基础上提供了一个直观统一的接口,也大幅简化了编写界面的流程,使得开发图形程序变得很轻松。 本文将为大家介绍这个让人着迷的开发框架 —— openFrameworks。 什么是 openFrameworks openFrameworks(以下简称 oF) 是一个开源的、跨平台的 C++ 工具包,它的设计目的为开发创造过程提供一个更加简单和直观的框架。 oF 的强大之处在于,它不仅是一个通用的胶水(glue)

Getting coordinates for glFrustum

馋奶兔 提交于 2019-12-05 02:05:03
问题 I just started reading about OpenGL topics, specifically about Viewing for my current needs. I am trying to understand glFrustum for a perspective projection of objects that I have drawn on the screen and as I understand glFrustum would make the farther objects smaller than the nearer objects. I am using openFrameworks here for drawing objects such as Image / Box etc. and here's a short example of what I am trying to do: openFrameworks draw method draw() { glMatrixMode(GL_PROJECTION);

Off-axis projection with glFrustum

╄→尐↘猪︶ㄣ 提交于 2019-12-04 23:41:26
问题 I am trying to do an off-axis projection of a scene with OpenGL and I gave a read to the document to Robert Kooima's off-axis projection and have a much better idea now of what actually has to be done but there are still some pieces which I am finding tricky here. I got to know of the off-axis projection code for OpenGL to be somewhat as follows: Code 1: glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(fNear*(-fFov * ratio + headX), fNear*(fFov * ratio + headX), fNear*(-fFov + headY),

problem saving openGL FBO larger than window

对着背影说爱祢 提交于 2019-12-04 18:25:11
问题 I'm rendering into an OpenGL offscreen framebuffer object and like to save it as an image. Note that the FBO is larger than the display size. I can render into the offscreen buffer and use it as texture, which works. I can "scroll" this larger texture through the display using an offset, which makes me confident, that I render into a larger context than the window. If I save the offscreen buffer to an image file it always gets cropped. The code fragment for saving is: void ofFBOTexture: