Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ofApp.h"
- //--------------------------------------------------------------
- void ofApp::setup(){
- shader.load("inkspread");
- image.load("paintedsky_large.jpg");
- }
- //--------------------------------------------------------------
- void ofApp::update(){
- }
- //--------------------------------------------------------------
- void ofApp::draw(){
- float mousePosition = ofMap(mouseX, 0.0, ofGetWidth(), 0.0, 2.0, true);
- shader.begin();
- image.draw(0,0);
- shader.setUniform1f("T", mousePosition);
- shader.end();
- ofSetColor(0,0,0);
- ofDrawBitmapString("T = "+ofToString(mousePosition),10,10);
- }
- //--------------------------------------------------------------
- void ofApp::keyPressed(int key){
- }
- //--------------------------------------------------------------
- void ofApp::keyReleased(int key){
- }
- //--------------------------------------------------------------
- void ofApp::mouseMoved(int x, int y ){
- }
- //--------------------------------------------------------------
- void ofApp::mouseDragged(int x, int y, int button){
- }
- //--------------------------------------------------------------
- void ofApp::mousePressed(int x, int y, int button){
- }
- //--------------------------------------------------------------
- void ofApp::mouseReleased(int x, int y, int button){
- }
- //--------------------------------------------------------------
- void ofApp::mouseEntered(int x, int y){
- }
- //--------------------------------------------------------------
- void ofApp::mouseExited(int x, int y){
- }
- //--------------------------------------------------------------
- void ofApp::windowResized(int w, int h){
- }
- //--------------------------------------------------------------
- void ofApp::gotMessage(ofMessage msg){
- }
- //--------------------------------------------------------------
- void ofApp::dragEvent(ofDragInfo dragInfo){
- }
Add Comment
Please, Sign In to add comment