This file contains 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
#include "ofMain.h" | |
class ofApp : public ofBaseApp { | |
public: | |
void keyPressed(int key) { | |
ofLogNotice() << "key press : " << std::setw(3) << key; | |
}; |
This file contains 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
Generating code | |
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(512): warning C4799: function 'is_opaque' has no EMMS instruction | |
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(501): warning C4799: function 'is_equal' has no EMMS instruction | |
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(586): warning C4799: function 'expand_4xpacked565' has no EMMS instruction | |
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(284): warning C4799: function 'to_uint64' has no EMMS instruction | |
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(518): warning C4799: function 'is_zero' has no EMMS instruction | |
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(490): warning C4799: function 'store8888' has no EMMS |
This file contains 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
// ------------------------------------------------------------ | |
// Math | |
// ------------------------------------------------------------ | |
float map(in float val_, in float range_min_, in float range_max_, in float min_, in float max_){ | |
return ( min_ + ((max_ - min_)/(range_max_ - range_min_)) * clamp(val_, range_min_, range_max_)); | |
} | |
vec2 map(in vec2 val_, in vec2 range_min_, in vec2 range_max_, in vec2 min_, in vec2 max_){ | |
return ( min_ + ((max_ - min_)/(range_max_ - range_min_)) * clamp(val_, range_min_, range_max_)); |
This file contains 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
// | |
// main.cpp | |
// testTokenise | |
// | |
// Created by tgfrerer on 23/08/2015. | |
// Copyright © 2015 pal. All rights reserved. | |
// | |
#include <iostream> | |
#include <string> |
This file contains 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
construct: a | |
construct: b | |
destruct: a |
This file contains 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
ofPushMatrix(); | |
ofTranslate(x,y,z); | |
quad.getVertices()[0].set(px0,py0); | |
quad.getVertices()[1].set(px1,py0); | |
quad.getVertices()[3].set(px0,py1); // flipped | |
quad.getVertices()[2].set(px1,py1); // flipped | |
quad.getTexCoords()[0].set(tx0,ty0); | |
quad.getTexCoords()[1].set(tx1,ty0); |
This file contains 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
if(bUsingTexCoords) { | |
glBindBuffer(GL_ARRAY_BUFFER, texCoordId); | |
ofEnableTexCoords(); | |
if(ofGLIsFixedPipeline()){ | |
glTexCoordPointer(2, GL_FLOAT, texCoordStride, 0); | |
}else{ | |
glVertexAttribPointer(ofGetAttrLocationTexCoord(), 2, GL_FLOAT, GL_FALSE, texCoordStride, 0); | |
} | |
} |
This file contains 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
glEnableVertexAttribArray(2) | |
Error: GL_INVALID_OPERATION | |
Context: 0x058a5600 | |
Virtual Screen: 0/2 | |
kCGLCPCurrentRendererID: 16915206 (0x01021b06) | |
GL_RENDERER: AMD Radeon HD 6750M OpenGL Engine | |
GL_VENDOR: ATI Technologies Inc. | |
GL_VERSION: 3.2 ATI-1.6.37 | |
kCGLCPGPUFragmentProcessing: GL_TRUE | |
kCGLCPGPUVertexProcessing: GL_TRUE |
This file contains 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
=================== config.mk platform detection ================ | |
PLATFORM_ARCH=armv6l | |
PLATFORM_OS=Linux | |
PLATFORM_VARIANT=default | |
PLATFORM_LIB_SUBPATH=linuxarmv6l | |
=================== config.mk paths ============================= | |
OF_ADDONS_PATH=../../../addons | |
OF_EXPORT_PATH=../../../export | |
OF_EXAMPLES_PATH=../../../examples | |
OF_APPS_PATH=../../../apps |
This file contains 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
compiled using these flags: | |
# cmake ../ -DGLFW_USE_CHDIR=0 -DGLFW_USE_MENUBAR=1 -DBUILD_SHARED_LIBS=0 -DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0 -DGLFW_BUILD_UNIVERSAL=0 -DCMAKE_OSX_ARCHITECTURES=i386 -DCMAKE_{C,CXX}_FLAGS=-m32 | |
# make -j |