Quantcast
Channel: beginners - openFrameworks
Viewing all 4929 articles
Browse latest View live

compilingOF.sh "variable was not declared in this scope" issue

$
0
0

@kovicic wrote:

Hi everyone!, I have oF 0.8.4 installed, but I want to try the 0.9.2 in Ubuntu 12.04 64 bits, which it seems to work.
If Irun the compilingOF.sh script, I get the following error related to the 'GL_TEXTURE_SWIZZLE_ variables:
I mean to GL_TEXTURE_SWIZZLE_R, GL_TEXTURE_SWIZZLE_G, GL_TEXTURE_SWIZZLE_B, etc.

/home/kovicic/of9/libs/openFrameworks/gl/ofTexture.cpp:500:44: error: 'GL_TEXTURE_SWIZZLE_R' was not declared in this scope
glTexParameteri(texData.textureTarget, GL_TEXTURE_SWIZZLE_R, GL_RED);

oF 0.8.4.2 is working fine.

Thanks.

Kovi

Posts: 8

Participants: 3

Read full topic


Eclipse not compiling on Linux/RPI

$
0
0

@steeley wrote:

Followed the instructions Eclipse and OF installed, OF runs/compiles from CLi ok.

When i make a new project and try to compile I get: this error:

make -j4 Debug OF_ROOT=/home/pi/openFrameworks/apps/myApps
Makefile:13: /home/pi/openFrameworks/apps/myApps/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk: No such file or directory
make: *** No rule to make target '/home/pi/openFrameworks/apps/myApps/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk'. Stop.

What am I missing?

TIA.

Posts: 1

Participants: 1

Read full topic

Mac vs windows code differences

$
0
0

@fresla wrote:

I have a strange simple problem. I have a project that is pretty simple, just sending messages and drawing some interface to the screen. I need to make this app cross platform (well just windows and mac. I started to make this on mac, as it was what was close at hand.

I have a very simple setup with a class that has a draw loop, it has a font in it, but the font only draws on mac (I am using the exact same files on each platform synced with dropbox). The font loads fine, i dont get errors in either program, and the fonts example works fine on both platforms. However, in the context of my class, the font will only draw on mac. The code looks fine to me and I dont understand why it does not draw.

I am using OF master branch from git.

Here is the relevant code from my videoItem class:

class VideoItems: public ofxMSAInteractiveObject  {
public:

ofColor idleColor, overColor, downColor;


string artist, title, year, duration, udpCommand;

int width, height;

int localX, localY;

ofImage thumbnail;

ofTrueTypeFont font;

bool usesProjector1, usesProjector2, usesProjector3;
int videoId;

	void setup() {

    ofLogVerbose()<<"MyTestObject::setup() - hello!\n"<< endl;
    font.load("frabk.ttf", 18,true, true);
    enableMouseEvents();
    enableKeyEvents();
	}


	void exit() {
		ofLogVerbose()<<"MyTestObject::exit() - goodbye!\n"<< endl;
	}


	void update() {

	}


	void draw(int incomingX, int incomingY) {

    //just update the x positions as the buttons are dynamic
    localX=incomingX;
    localY=incomingY;

    //this is the background rectangle
    ofSetColor(0);
    ofDrawRectRounded(localX, localY, width, height,10);

    //here is the thumbnail
     ofSetColor(255);
    thumbnail.draw((localX+width)-320,localY+20, 284,160);

    //here is the info for each video
    ofSetColor(255, 255, 255);
    font.drawString("Artist: " + artist, localX + 40, localY + 65);
    font.drawString("Title: " + title, localX + 40, localY + 95);
    font.drawString("Year: " + year, localX + 40, localY + 125);
    font.drawString("Duration: " + duration, localX + 40, localY + 155);

    //this section just draws a semi-transparent rectangle over the top of each item if there is a roll-over or touch down event
    if(isMousePressed()){ ofSetColor(downColor);

        ofDrawRectRounded(localX, localY, width, height,10);
    }
    else if(isMouseOver()){ ofSetColor(overColor);
        ofDrawRectRounded(localX, localY, width, height,10);
    }

    else {
        ofSetColor(idleColor);
    }

	}
};

This is drawn by another class, that is in the ofApp.h.

I also have some other differences between mac and PC for this project that surprise me, I think they are my own fault, but if anyone is aware of big differences (maybe it is also compiler interpretation, I am using Xcode and VS).

It would be great to get some experiences from someone else on this (differences between mac and windows on the master branch).

Posts: 1

Participants: 1

Read full topic

Strange ofxXmlSettings behaviour

$
0
0

@autr wrote:

Hi, I'm doing this ...

ofLog() << "Creating preset ... ";
presets.addTag("preset");
presets.pushTag("preset");
for (auto &element : ui->elements) {
    if (element->getType() == MY_ELEMENT) {

        presets.addTag("element");
        presets.pushTag("element");

        presets.addValue("type", element->getSubType());
        presets.addValue("value", element->getValue());

        presets.popTag();
    }
}
presets.popTag();
presets.saveFile("presets.xml");

But I am getting back a structure that looks like this:

<preset>
    <element>
        <type>6</type>
        <type>4</type>
        <type>4</type>
        <type>4</type>
        <type>8</type>
        <value>0</value>
        <type>6</type>
        <type>11</type>
        <type>8</type>
        <value>0</value>
        <type>8</type>
        <value>1</value>
        <type>7</type>
        <value>120.000000000</value>
        <type>7</type>
        <value>3.000000000</value>
        <type>7</type>
        <value>-60.000000000</value>
        <type>7</type>
        <value>20.000000000</value>
        <type>6</type>
        <type>11</type>
        <type>5</type>
        <value>4</value>
        <type>4</type>
        <type>4</type>
        <type>4</type>
        <type>4</type>
        <type>6</type>
        <type>11</type>
        <type>7</type>
        <value>0.000000000</value>
        <type>7</type>
        <value>0.000000000</value>
        <type>7</type>
        <value>1.000000000</value>
        <type>7</type>
        <value>1.000000000</value>
        <type>7</type>
        <value>255.000000000</value>
        <type>7</type>
        <value>255.000000000</value>
        <type>6</type>
        <type>11</type>
        <type>8</type>
        <value>0</value>
        <type>8</type>
        <value>1</value>
        <type>8</type>
        <value>2</value>
    </element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
    <element></element>
</preset>

What am I missing? :sweat:

Posts: 2

Participants: 1

Read full topic

fboAlphaMask dark edges - examples/shader/07_fboAlphaMask

$
0
0

@AndreasRef wrote:

Hey

I'm running the example OpenFrameworks/of_v0.9.7_osx_release/examples/shader/07_fboAlphaMask and have a small issue with the brush making dark edges, and therefore not producing a very smooth blend.

For instance if both my backgroundImage and my foregroundImage is a grey picture, the round brush still produces dark edges. I have tried editing the brush in Photoshop without any luck.


Illustration of the darker edges between to identical images.

Any ideas how to fix this?

Posts: 4

Participants: 2

Read full topic

Particle trails on webcam

$
0
0

@Roflmagoo wrote:

Hello everyone! I have a little problem with my OF project, where I have one particle system that follows the centroid of my hand (capture with ofContourFinder). Now I want to leave a trace of the particle's trajectory on the screen: what should I use? I must use the FBO? And how?

Thanks!

Posts: 2

Participants: 2

Read full topic

Issue getting OpenCV examples up and running

$
0
0

@elty wrote:

Hi everyone, I'm pretty new to openFrameworks. I wanted to start using the OpenCV library (and specifically the ofxCV version (https://github.com/kylemcdonald/ofxCv/tree/stable). When I load this up in Xcode and open any example, I get an error "use of undeclared identifier glm," which is occurring several times in the ofxCV utilities file and a few other places.

This seems to be some reference (maybe to OpenGL?) to something that doesn't seem to exist in ofxCV; maybe I've installed it wrong or something.

Since I just cloned this straight from the link above right into my addons folder, I'm wondering if this is a common problem anyone using ofxCV has had? Is there something I've not downloaded? Or something broken?

Thanks!

Posts: 1

Participants: 1

Read full topic

Why ofPrimitiveMode doesn't have QUADS or POLYGON?

$
0
0

@sewonist wrote:

I know that mesh can have some different primitive mode.I just wonder why aren't there QUADS or POLYGONS? as below image. Do I have to use triangles, lines and points??

Posts: 1

Participants: 1

Read full topic


What' the difference between ofRectangle & ofDrawRectangle?

How to get a coordinate from a 3d scene?

$
0
0

@Annop_kobhirun wrote:

Hi, I came from the world of 2D Image processing and just coming into the world of 3D

So, I have play the example in 3d folder and I have a doubt,

In 2D image it easy to get a coordinate from something like cvmat or IplImage in opencv and then use that coordinate to calculate and processing go on.

My question,
If I want to get the cordinate X, Y, Z from the screen, How can I do that?
Please suggest and give me some clue.

thank you.

Posts: 2

Participants: 2

Read full topic

Saving file other folder than data

$
0
0

@aliva666 wrote:

Hi!

I'm trying to save a file in the dekstop but i get an error =
boost::filesystem::create_directories: Permission denied: "../../../../../../../../../../../base/Desktop"

this is the code

   ofSetDataPathRoot("/Users/base/Desktop/");
    texImage.save("Filter1231.jpg");

any ideas?

Posts: 1

Participants: 1

Read full topic

"fix/get around" for autocompletion in sublime text (Linux)

$
0
0

@udiskie wrote:

Hello, weeks ago i was struggling to set up openframeworks in sublime (linux), and in my opinion it's tricky and it never worked for me. Since you can create projects with projectGenerator, and compile them with make, i started think that (personal opinion) you just need a text editor that can handle the autocompletion for openframeworks, and that's it.

So i made the snippets for ofGraphics module, eventhough this may not be the most elegant solution, it worked for me at least. You can use the following script to generate the snippets of your module of choise.

Any kind of suggestions are wellcome

Here are the files + instructions:
https://github.com/Ivanriveraneumann/of_subl_autocomplete

ps:
1-eventually you can generate the snippets for all functions, but i don't know how it would work
2-i'm working on a script to generate other snippets, that might require a less brute logic, for instance class methods like ofCylinderPrimitive::getHeight()

Posts: 1

Participants: 1

Read full topic

2D scanner from projector

$
0
0

@guardabrazo wrote:

Hi, I'm working on a way to automate simple 2D projection mappings using openCV.

So far I've been able to use ofxCV to detect contours and quads in a given image/video and adjust the content to that quad. Everything happens on the screen, so far so good.

When I move to using a projector and a webcam I run into the camera-projector issue. I need an image of what the projector 'sees' so I can process it and feed it to the contour finder. Madmapper has the 'Spatial Scanner' feature that does this using a gray code pattern that is projected onto the target surfaces and then using a camera it processes the images to build an image of what the projector sees. You can see how it works HERE.

I've looked into ofxGraycode by @elliotwoods but the resulting image after decoding the gray code is a depth map and not what the projector 'sees'.

So...the workflow should look something like this:
- Set up webcam and projector.
- Project the gray code pattern.
- Decode the images that the webcam captures and get what the projector 'sees' ----> Here's where I need the help :slight_smile:
- Process the image that the projector 'sees' to get contours, quads, etc.
- Fit the content in the contours.

Any help will be appreciated...or maybe there's a different approach that I'm not aware of...check out this one for example...

Posts: 2

Participants: 2

Read full topic

From 2d silhouette to 3d shape

$
0
0

@rojele wrote:

Hi, everyone,
I'm pretty new to openframeworks. That's, in fact, my first project with it.
My goal is to generate a deformable irregular 3d shape from a 2d shape drawn in live. Actually this shape, or silhouette, is being drawn marking points and extending ofCurveVertexs along them.
Because my purpose is to do a 3d mapping of different rounded shapes in a wall, first of all I trace their silhouettes.
What I'm needing now is to extrude them in a rounded way. If I get it, I will start with the deformations and 3d lights. I'm not in any way a 3d magician but that's my purpose.
Does anyone know how should I try it? Which addon may help me? Any idea?
A lot of thanks in advance.
Rojele

Posts: 1

Participants: 1

Read full topic

Setup dialog? Exit an app from within itself?

$
0
0

@ErnstHot wrote:

I am trying to make a setup dialog for my app where the user can select the resolution, window mode, various graphics settings and so on, but it seems I need to create a new window to make OF run in fullscreen in a particular resolution - and I'd rather partition the setup dialog and the main app anyway.

As far as I can tell the easiest way would be first to run a setup app in it's own window and when that exits, pass the settings to a new app that can have it's own window in whatever setup it needs, but I can't figure out how to exit an app from within itself without also completely exiting the program.

Here's how I would do the main() function for that, sans the passing of parameters:

int main()
{
	ofGLWindowSettings glSetupWinSettings;
	glSetupWinSettings.width = 200;
	glSetupWinSettings.height = 400;
	glSetupWinSettings.windowMode = ofWindowMode::OF_WINDOW;
	glSetupWinSettings.setGLVersion(3, 3);
	ofCreateWindow(glSetupWinSettings);

	ofSetupApp* setupApp = new ofSetupApp();
	ofRunApp(setupApp);

	if (!setupApp->ShouldQuit())
	{
		ofGLWindowSettings glWindowSettings;
		glWindowSettings.width = 1280;
		glWindowSettings.height = 720;
		glWindowSettings.windowMode = ofWindowMode::OF_GAME_MODE;
		glWindowSettings.setGLVersion(3, 3);
		ofCreateWindow(glWindowSettings);

		ofRunApp(new ofApp());
	}
}

Which seems to work if I remove the conditional and manually close the first window...

Any help would be appreciated :slight_smile:

Posts: 1

Participants: 1

Read full topic


Tara Stereo Camera

Modified Empty Example not compiling - Raspberrypi3

$
0
0

@Adrien_Laveau wrote:

Hello Forum,

I am running Raspbian on Raspberry Pi3 and really new to all of this.
I installed Openframework recently and I am learning with the great ofBook.
In the Section "Oops!=Object oriented Programming + Classes" we have to copy the EmptyExample and add some modifications to draw a ball.

Important information --> "EmptyExample" compiles fine with "make"

When I want to compile the ofBook example I am getting lots of errors which don't seem linked to syntax error.

Could you give me a hand with this or give me a direction to look for.

Thanks a lot

side question : how can I format my post i a nice and readabe way ? I did not find any help on this.

HOST_OS=Linux
checking pkg-config libraries:   cairo zlib         gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0

Compiling OF library for Release
make[1]: Entering directory '/home/pi/openFrameworks/libs/openFrameworksCompiled/project'
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0
Done!
make[1]: Leaving directory '/home/pi/openFrameworks/libs/openFrameworksCompiled/project'

Compiling ball1 for Release
make[1]: Entering directory '/home/pi/openFrameworks/examples/OOP/ball1'
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0
Compiling /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.cpp
g++ -c -O3 -DNDEBUG -Wall -std=c++14 -DGCC_HAS_REGEX -march=armv6 -mfpu=vfp -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DOF_USING_GTK -DOF_USING_GTK -DTARGET_RASPBERRY_PI -DSTANDALONE -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -I/opt/vc/include -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -D_REENTRANT -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/AL -I/usr/include/alsa -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/home/pi/openFrameworks/libs/fmodex/include -I/home/pi/openFrameworks/libs/glfw/include -I/home/pi/openFrameworks/libs/glfw/include/GLFW -I/home/pi/openFrameworks/libs/kiss/include -I/home/pi/openFrameworks/libs/poco/include -I/home/pi/openFrameworks/libs/tess2/include -I/home/pi/openFrameworks/libs/utf8cpp/include -I/home/pi/openFrameworks/libs/utf8cpp/include/utf8 -I/home/pi/openFrameworks/libs/openFrameworks -I/home/pi/openFrameworks/libs/openFrameworks/app -I/home/pi/openFrameworks/libs/openFrameworks/types -I/home/pi/openFrameworks/libs/openFrameworks/utils -I/home/pi/openFrameworks/libs/openFrameworks/math -I/home/pi/openFrameworks/libs/openFrameworks/3d -I/home/pi/openFrameworks/libs/openFrameworks/video -I/home/pi/openFrameworks/libs/openFrameworks/gl -I/home/pi/openFrameworks/libs/openFrameworks/sound -I/home/pi/openFrameworks/libs/openFrameworks/communication -I/home/pi/openFrameworks/libs/openFrameworks/graphics -I/home/pi/openFrameworks/libs/openFrameworks/events -I/home/pi/openFrameworks/examples/OOP/ball1/src -MMD -MP -MF obj/linuxarmv6l/Release/src/Ball.d -MT obj/linuxarmv6l/Release/src/Ball.o -o obj/linuxarmv6l/Release/src/Ball.o -c /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.cpp
Compiling /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp
g++ -c -O3 -DNDEBUG -Wall -std=c++14 -DGCC_HAS_REGEX -march=armv6 -mfpu=vfp -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DOF_USING_GTK -DOF_USING_GTK -DTARGET_RASPBERRY_PI -DSTANDALONE -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -I/opt/vc/include -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -D_REENTRANT -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/AL -I/usr/include/alsa -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/home/pi/openFrameworks/libs/fmodex/include -I/home/pi/openFrameworks/libs/glfw/include -I/home/pi/openFrameworks/libs/glfw/include/GLFW -I/home/pi/openFrameworks/libs/kiss/include -I/home/pi/openFrameworks/libs/poco/include -I/home/pi/openFrameworks/libs/tess2/include -I/home/pi/openFrameworks/libs/utf8cpp/include -I/home/pi/openFrameworks/libs/utf8cpp/include/utf8 -I/home/pi/openFrameworks/libs/openFrameworks -I/home/pi/openFrameworks/libs/openFrameworks/app -I/home/pi/openFrameworks/libs/openFrameworks/types -I/home/pi/openFrameworks/libs/openFrameworks/utils -I/home/pi/openFrameworks/libs/openFrameworks/math -I/home/pi/openFrameworks/libs/openFrameworks/3d -I/home/pi/openFrameworks/libs/openFrameworks/video -I/home/pi/openFrameworks/libs/openFrameworks/gl -I/home/pi/openFrameworks/libs/openFrameworks/sound -I/home/pi/openFrameworks/libs/openFrameworks/communication -I/home/pi/openFrameworks/libs/openFrameworks/graphics -I/home/pi/openFrameworks/libs/openFrameworks/events -I/home/pi/openFrameworks/examples/OOP/ball1/src -MMD -MP -MF obj/linuxarmv6l/Release/src/ofApp.d -MT obj/linuxarmv6l/Release/src/ofApp.o -o obj/linuxarmv6l/Release/src/ofApp.o -c /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp
In file included from /usr/include/boost/mpl/if.hpp:19:0,
from /usr/include/boost/mpl/eval_if.hpp:17,
from /usr/include/boost/type_traits/decay.hpp:18,
from /usr/include/boost/filesystem/path_traits.hpp:22,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/if.hpp:131:1: error: invalid use of incomplete type ‘struct mpl_::int_<3>’
BOOST_MPL_AUX_NA_SPEC(3, if_)
^
In file included from /usr/include/boost/mpl/int.hpp:17:0,
from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10,
from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14,
from /usr/include/boost/type_traits/is_array.hpp:27,
from /usr/include/boost/filesystem/path_traits.hpp:21,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/int_fwd.hpp:22:52: error: declaration of ‘struct mpl_::int_<3>’
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
^
In file included from /usr/include/boost/mpl/if.hpp:19:0,
from /usr/include/boost/mpl/eval_if.hpp:17,
from /usr/include/boost/type_traits/decay.hpp:18,
from /usr/include/boost/filesystem/path_traits.hpp:22,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/if.hpp:131:1: error: invalid use of incomplete type ‘struct mpl_::int_<-1>’
BOOST_MPL_AUX_NA_SPEC(3, if_)
^
In file included from /usr/include/boost/mpl/int.hpp:17:0,
from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10,
from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14,
from /usr/include/boost/type_traits/is_array.hpp:27,
from /usr/include/boost/filesystem/path_traits.hpp:21,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/int_fwd.hpp:22:52: error: declaration of ‘struct mpl_::int_<-1>’
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
^
In file included from /usr/include/boost/mpl/if.hpp:19:0,
from /usr/include/boost/mpl/eval_if.hpp:17,
from /usr/include/boost/type_traits/decay.hpp:18,
from /usr/include/boost/filesystem/path_traits.hpp:22,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/eval_if.hpp:67:1: error: invalid use of incomplete type ‘struct mpl_::int_<3>’
BOOST_MPL_AUX_NA_SPEC(3, eval_if)
^
In file included from /usr/include/boost/mpl/int.hpp:17:0,
from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10,
from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14,
from /usr/include/boost/type_traits/is_array.hpp:27,
from /usr/include/boost/filesystem/path_traits.hpp:21,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/int_fwd.hpp:22:52: error: declaration of ‘struct mpl_::int_<3>’
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
^
In file included from /usr/include/boost/mpl/if.hpp:19:0,
from /usr/include/boost/mpl/eval_if.hpp:17,
from /usr/include/boost/type_traits/decay.hpp:18,
from /usr/include/boost/filesystem/path_traits.hpp:22,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/eval_if.hpp:67:1: error: invalid use of incomplete type ‘struct mpl_::int_<-1>’
BOOST_MPL_AUX_NA_SPEC(3, eval_if)
^
In file included from /usr/include/boost/mpl/int.hpp:17:0,
from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10,
from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14,
from /usr/include/boost/type_traits/is_array.hpp:27,
from /usr/include/boost/filesystem/path_traits.hpp:21,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/int_fwd.hpp:22:52: error: declaration of ‘struct mpl_::int_<-1>’
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
^
In file included from /usr/include/boost/mpl/int.hpp:17:0,
from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10,
from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14,
from /usr/include/boost/type_traits/is_array.hpp:27,
from /usr/include/boost/filesystem/path_traits.hpp:21,
from /usr/include/boost/filesystem/path.hpp:25,
from /usr/include/boost/filesystem.hpp:16,
from /home/pi/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:8,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:6,
from /home/pi/openFrameworks/examples/OOP/ball1/src/Ball.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.h:3,
from /home/pi/openFrameworks/examples/OOP/ball1/src/ofApp.cpp:1:
/usr/include/boost/mpl/int_fwd.hpp:22:52: error: declaration of ‘struct mpl_::int_<-1>’
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
^
/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:200: recipe for target 'obj/linuxarmv6l/Release/src/ofApp.o' failed
make[1]: *** [obj/linuxarmv6l/Release/src/ofApp.o] Error 1
make[1]: Leaving directory '/home/pi/openFrameworks/examples/OOP/ball1'
/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:125: recipe for target 'Release' failed
make: *** [Release] Error 2

Posts: 1

Participants: 1

Read full topic

Rendering exported .ply file (with uv texture) in Blender (tip)

$
0
0

@hamoid wrote:

If you want to render textured OF meshes in Blender, I realized two things need to be adjusted.

.ply files saved from OF include properties called "u" and "v", but Blender expects them to be called "s" and "t". To fix this, I edited the .ply file with a text editor and replaced

property float u
property float v

with

property float s
property float t

The second issue I had was that the texture was upside down. Since I use ofEnableNormalizedTexCoords(), I could flip the "v" coordinate ("t" in this case) in Blender like this:

In words: take the uv coordinate, split into xyz, replace y by (1-y), pack xyz back into a vector and use that vector with inverted y for the texture mapping. If I had a bunch of textures I could have flipped the images upside down on the command line.

Posts: 1

Participants: 1

Read full topic

Properly animating tree traversal

$
0
0

@aceslowman wrote:

Hi everyone,

Working on traversing a tree structure that I've built (Essentially, the nodes are a linked list with multiple children), I am wanting to simulate a kind of capillary movement. Currently the update function works, it properly walks through the structure and updates it's location, but this can't solve my problem with walking through and updating colors slowly, over time. Does anyone have any advice on how I might want to take this on? I've tried messing with threads, in a perfect world all I would really be doing is slowing down each recursive call to updateMesh.

The entire project with an example can be found here:

https://github.com/aceslowman/ofxGrowth

//--------------------------------------------------------------
void ofxGrowth::update(){
    b_step = false;

    current_mesh_id = 0;

    root->update();

    ofSetLineWidth(stroke_width);

    updateMesh(root, meshes[0].get(),0);
}

//--------------------------------------------------------------
void ofxGrowth::updateMesh(ofxGrowthNode * current_node, ofMesh * current_mesh, int mesh_node_id){
    current_mesh->setVertex(mesh_node_id, current_node->location);
    current_mesh->setColor(mesh_node_id, colorLevels(current_node->level));

    for(int i = 0; i < current_node->children.size(); i++){
        if(i > 0){
            current_mesh = meshes[current_mesh_id + 1].get();
            current_mesh_id = current_mesh_id + 1;
            mesh_node_id = 0;

            current_mesh->setVertex(mesh_node_id, current_node->location);
            current_mesh->setColor(mesh_node_id, colorLevels(current_node->level));

            mesh_node_id = 1;

            current_node = current_node->children[i].get();

            updateMesh(current_node, current_mesh, mesh_node_id);
        }else{
            mesh_node_id++;

            current_node = current_node->children[i].get();

            updateMesh(current_node, current_mesh, mesh_node_id);
        }
    }
}

Posts: 1

Participants: 1

Read full topic

Deprecation & replacements?

$
0
0

@Autofasurer wrote:

It's been some time since I've done anything with ofx, so after downloading the new version it appears that a lot of things are deprecated... This seems to also affect a number of addons.

Is there a way to find out what's been changed and to what...?

Posts: 3

Participants: 2

Read full topic

Viewing all 4929 articles
Browse latest View live