Skip to content

Instantly share code, notes, and snippets.

@neon-izm
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neon-izm/ad5ab467028095235630 to your computer and use it in GitHub Desktop.
Save neon-izm/ad5ab467028095235630 to your computer and use it in GitHub Desktop.
openFrameworksとC++/CLIのフォームを同時使用するサンプル
//構成プロパティ →全般→共通言語ランタイムサポート→ /clr
//
int main(){
FrmMain^ mf = gcnew FrmMain();
mf->StartPosition=System::Windows::Forms::FormStartPosition::Manual;
mf->Left = 100; mf->Top = 100;
//this line shoud Show()
// NOT ShowDialog();
mf->Show();
ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment