LoginSignup
58
60

More than 5 years have passed since last update.

openFrameworks for iOS のサンプル一覧

Last updated at Posted at 2013-12-04

openFrameworks(以下 oF)には大量のサンプルプロジェクトが同梱されています。「UIKitのビューと oF のビューを一緒に使いたいけどどうやるんだろう」みたいなときにそういうサンプルがあるのがわかってると話がはやいので、ここにサンプルの一覧をまとめていこうと思います。

実行時のスクリーンショットと、ソースで どういった処理が実装がされているか (何の機能のサンプルなのか)も書いていきます。

(※随時更新していきます。ストックしておくと、更新通知が飛んでくるので便利です。)

PrimitivesExample

(v0.9.8)

IMG_1673.PNG

ofSpherePrimitiveofCylinderPrimitive といったクラスを使って3D図形を描画するサンプル。

CoreLocationExample

ImagePickerExample

KeyboardExample

MapKitExample

TouchAndAccelExample

advancedEventsExample

advancedGraphics

assimpExample

audioInputExample

audioOutputExample

dirListExample

emptyExample

eventsExample

fontShapesExample

fontsExample

graphicsExample

iPhoneGuiExample

imageLoaderExample

iosCustomSizeExample

iosES2ShaderExample

iosExternalDisplayExample

iosNativeExample

iosOrientationExample

moviePlayerExample

ofxGuiExample

ビルドして実行すると、nibをロードするあたりでクラッシュするため、プロジェクトにいくつかの修正が必要。

  • MyGuiView.xib の File's Owner の Custom Class が "MyMusicView" となっているので、"MyGuiView" に直す
  • MyGuiView.xibを、Copy Bundle Resourcesに追加する

UIKit の UISwitch と UISlider で、 oF によって描画されている図形が変化します。

UIKit と oF を同居させる 貴重なサンプル。

opencvExample

アドオン ofxOpenCv を使ったサンプル。

  • 動画を再生(ofVideoPlayer::play)しつつ、
  • 背景(動画再生開始時のフレームを背景とする。以後、タップするとその瞬間のフレームを背景とする)を差し引き(ofxCvGrayscaleImage::absDiff)、
  • 指の輪郭を検出する(ofxCvContourFinder::findContours

サンプルです。

opencvFaceExample

oscReceiverExample

oscSenderExample

タッチの情報をReceiver側に送る。

polygonExample

soundPlayerExample

textureExample

vboExample

ofVbo を使用するサンプル。

VBOというのは Vertex Buffer Object の略で、『頂点データを格納するGPU側のメモリに置かれたバッファ』とのこと。

参考:OpenGL - VBO - PukiWiki for PBCG Lab

videoGrabberExample

ofVideoGrabber を使用して、 iPhoneのカメラからの入力(動画)をリアルタイム処理 するサンプル。

xmlSettingsExample

ビルドエラー修正メモ

  • oF v0.9.8 / Xcode 8.3 にて "library not found for -lcrt1.3.1.o" というエラー

→ プロジェクトのTarget iOSバージョンを上げる (参考

58
60
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
58
60