Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tado committed Dec 13, 2012
1 parent c9a450c commit 5d9dd0b
Show file tree
Hide file tree
Showing 358 changed files with 80,658 additions and 0 deletions.
816 changes: 816 additions & 0 deletions 2-10_A/TestProject.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions 2-10_A/openFrameworks-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.openFrameworks</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions 2-10_A/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "ofMain.h"
#include "testApp.h"
#include "ofAppGlutWindow.h"

//========================================================================
int main( ){

ofAppGlutWindow window;
ofSetupOpenGL(&window, 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 testApp());

}
55 changes: 55 additions & 0 deletions 2-10_A/src/testApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include "testApp.h"

//--------------------------------------------------------------
void testApp::setup(){
ofBackground(0, 0, 0); //背景色の設定
ofSetFrameRate(60); //フレームレートの設定
ofSetCircleResolution(64); //円の解像度設定
}

//--------------------------------------------------------------
void testApp::update(){

}

//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(31, 63, 255); //描画色の設定
ofCircle(mouseX, mouseY, 40); //マウスの現在位置を中心に円を描く
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){

}

//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){

}

23 changes: 23 additions & 0 deletions 2-10_A/src/testApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef _TEST_APP
#define _TEST_APP

#include "ofMain.h"

class testApp : public ofBaseApp{

public:
void setup();
void update();
void draw();

void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);

};

#endif
816 changes: 816 additions & 0 deletions 2-10_B/TestProject.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions 2-10_B/openFrameworks-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.openFrameworks</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions 2-10_B/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "ofMain.h"
#include "testApp.h"
#include "ofAppGlutWindow.h"

//========================================================================
int main( ){

ofAppGlutWindow window;
ofSetupOpenGL(&window, 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 testApp());

}
82 changes: 82 additions & 0 deletions 2-10_B/src/testApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#include "testApp.h"

float loc_x, loc_y;
int red, green, blue;

//--------------------------------------------------------------
void testApp::setup(){
ofBackground(0, 0, 0); //背景色の設定
ofSetFrameRate(60); //フレームレートの設定
ofSetCircleResolution(64); //円の解像度設定

//円の初期位置
loc_x = ofGetWidth() / 2;
loc_y = ofGetHeight() / 2;

//円の色、初期値
red = 31;
green = 63;
blue = 255;
}

//--------------------------------------------------------------
void testApp::update(){

}

//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(red, green, blue); //描画色の設定
ofCircle(loc_x, loc_y, 40); //マウスの現在位置を中心に円を描く
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){

}

//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y){
//円の色をグレーに
red = 127;
green = 127;
blue = 127;
}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
//円の中心位置をマウスの位置に
loc_x = x;
loc_y = y;
}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
//円の中心位置をマウスの位置に
loc_x = x;
loc_y = y;

//円の色を赤に
red = 255;
green = 63;
blue = 31;
}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
//円の色を青に
red = 31;
green = 63;
blue = 255;
}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){

}

23 changes: 23 additions & 0 deletions 2-10_B/src/testApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef _TEST_APP
#define _TEST_APP

#include "ofMain.h"

class testApp : public ofBaseApp{

public:
void setup();
void update();
void draw();

void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);

};

#endif
Loading

0 comments on commit 5d9dd0b

Please sign in to comment.