This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ofPBO.h | |
* | |
* Created on: 08/04/2012 | |
* Author: arturo | |
*/ | |
#pragma once | |
#include "ofConstants.h" | |
#include "ofTexture.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ofPBO.cpp | |
* | |
* Created on: 08/04/2012 | |
* Author: arturo | |
*/ | |
#include "ofPBO.h" | |
#ifndef TARGET_OPENGLES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DEFAULT_GOAL=Release | |
# define the OF_SHARED_MAKEFILES location | |
OF_SHARED_MAKEFILES_PATH=$(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon | |
include $(OF_SHARED_MAKEFILES_PATH)/config.shared.mk | |
# if APPNAME is not defined, set it to the project dir name | |
ifndef APPNAME | |
APPNAME = $(shell basename `pwd`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .h | |
ofPath path; | |
// setup | |
path.rectangle(0,0,ofGetWidth(),ofGetHeight()); | |
path.circle(ofGetWidth()*.5,ofGetHeight()*.5,100); | |
path.setFilled(true); | |
path.setFillColor(color); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TEST 0.8 | |
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup() { | |
ofBackground(0, 0, 0); | |
bricksHigh = 0; | |
bricksWide = 0; | |
totalBricks = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spawn(proc(){ | |
let (port,chan): (comm::Port<Message>, comm::Chan<Message>) = comm::Chan::new(); | |
let mut chan = ~chan; | |
set_c_callback(c_callback, cast::transmute(&mut *chan)); | |
loop{ | |
//... | |
} | |
}); | |
extern "C" fn c_callback (data: *c_void){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fatal runtime error: assertion failed: !ptr.is_null() | |
Program received signal SIGILL, Illegal instruction. | |
[Switching to Thread 0x7fffd7fff700 (LWP 28971)] | |
0x0000000000483d4b in rt::util::abort::h66e24f48938afe6eMim::v0.10.pre () | |
(gdb) bt | |
#0 0x0000000000483d4b in rt::util::abort::h66e24f48938afe6eMim::v0.10.pre () | |
#1 0x00000000007b73d1 in rt::local_ptr::compiled::take::he8a5e3f0ec45f53amAs::v0.1 () | |
#2 0x00000000007c7778 in comm::Chan$LT$T$GT$::send::hfedc51b572bd5818fot::v0.1 () | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables which can be used inside of strings. | |
// ${workspaceRoot}: the root folder of the team | |
// ${file}: the current opened file | |
// ${fileBasename}: the current opened file's basename | |
// ${fileDirname}: the current opened file's dirname | |
// ${fileExtname}: the current opened file's extension | |
// ${cwd}: the current working directory of the spawned process | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <vector> | |
#include <functional> | |
#include <mutex> | |
#include <thread> | |
template<typename T> | |
class ofEvent{ | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EGLContext context = eglGetCurrentContext(); | |
EGLDisplay eglDisplay = eglGetCurrentDisplay(); | |
glBindTexture(GL_TEXTURE_2D, 0); | |
EGLint imageAttributes[] = { | |
EGL_GL_TEXTURE_LEVEL_KHR, 0, // mip map level to reference | |
EGL_IMAGE_PRESERVED_KHR, EGL_FALSE, | |
EGL_NONE | |
}; | |
EGLImageKHR (*eglCreateImageKHR)(EGLDisplay,EGLContext,int,EGLClientBuffer,EGLint*); |
OlderNewer