Skip to content

Instantly share code, notes, and snippets.

View hiroMTB's full-sized avatar

Hiroshi Matoba hiroMTB

View GitHub Profile
@hiroMTB
hiroMTB / MyClass.h
Last active December 28, 2018 23:08
ofxGui, Panel in each class example
//
// MyClass.h
//
#pragma once
#include "ofxGui.h"
class MyClass{
@hiroMTB
hiroMTB / MyClass.h
Created December 28, 2018 21:55
ofxGui, Single Panel example
//
// MyClass.h
//
#pragma once
class MyClass{
public:
ofParameter<int> myInt{"MyInt", 0, 0, 100};
void update(ofEventArgs &e) {
weConnected = tcpClient.isConnected();
if (weConnected) {
string str = tcpClient.receive();
if (str.length() > 0) {
ofNotifyEvent(tcpMessageReceived, str, this);
}
}
#include "ofApp.h"
void ofApp::setup(){
ofBackground(0, 255);
ofTrueTypeFont::setGlobalDpi(72);
font.load("Gotham Bold.otf", 22, true, true);
font.setLetterSpacing(3);
}
void ofApp::draw(){
class ofApp{
public:
ofApp(){};
static ofApp& get(){
static ofApp app;
return app;
}
RPi 3.2 inch TFT setup
Device
https://www.conrad.de/de/raspberry-pi-display-modul-schwarz-rb-tft32-v2-raspberry-pi-a-b-b-raspberry-pi-1380381.html
English document
https://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B)
Chinese document
http://www.waveshare.net/wiki/3.2inch_RPi_LCD_(B)
@hiroMTB
hiroMTB / OF_with_visual_studio_code.md
Created July 12, 2017 05:00 — forked from vvzen/OF_with_visual_studio_code.md
A quick reminder on how to use openframeworks without XCode (macOS)

Using OpenFrameworks with Visual Studio Code (macOS)

  1. First, install the cpptools extension in studio code

  2. Then add the include paths in the c_cpp_properties.json file.

    If a small light bulb icon (💡) appears near the include statements on any of your source file, just click it in order to access the c_c_pp_properties.json file.

    If there's no 💡 icon, then in the project directory create a hidden folder called vscode:

// QuickTimeImplAvf.mm
// line 296
void MovieBase::seekToFrame( int frame )
{
if( ! mPlayer )
return;
//CMTime currentTime = [mPlayer currentTime];
//CMTime oneFrame = CMTimeMakeWithSeconds(1.0 / mFrameRate, currentTime.timescale); // ERROR, timescale=1
//
// class kaze::hacktion
//
function hacktion(int n){
int virus = 0;
for(int i=0; i<n; i++){
virus += 100;
}