openframeworks

Quite strange MinGW ld problem - “collect2: ld returned 1 exit status”

。_饼干妹妹 提交于 2021-02-11 18:07:45
问题 I'm building an application for data visualization and the framework I'm using is beautiful OpenFrameworks. On Linux, it compiles and works perfectly, but now it's time to port it to Windows and I'm facing some very strange problems. I can't find relevant information from google. When linking, I get this: mingw32-g++.exe -o bin\visualisation.exe ...blah.o, blah2.o... ...lib1 lib2 lib3... collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 3 seconds) 0 errors, 0

Quite strange MinGW ld problem - “collect2: ld returned 1 exit status”

匆匆过客 提交于 2021-02-11 18:06:06
问题 I'm building an application for data visualization and the framework I'm using is beautiful OpenFrameworks. On Linux, it compiles and works perfectly, but now it's time to port it to Windows and I'm facing some very strange problems. I can't find relevant information from google. When linking, I get this: mingw32-g++.exe -o bin\visualisation.exe ...blah.o, blah2.o... ...lib1 lib2 lib3... collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 3 seconds) 0 errors, 0

I want to run Libtorch (Pytorch C++ Frontend) in OpenFrameworks

╄→гoц情女王★ 提交于 2021-02-10 18:41:57
问题 All. I want to run Libtorch (Pytorch C++ Frontend) in OpenFrameworks. LibTorch Site: https://pytorch.org/tutorials/advanced/cpp_frontend.html If LibTorch runs in OpenFrameworks, it will be very powerful Deep Solution IDE (deep learning + GUI Production for OSX, Win10, & Linux). But I can’t include <torch/torch.h> in XCode. At CMake method, CMakeLists.txt is like this: cmake_minimum_required(VERSION 3.0 FATAL_ERROR) project(dcgan) find_package(Torch REQUIRED) add_executable(dcgan dcgan.cpp)

Object going through wall during collision

橙三吉。 提交于 2021-01-29 01:30:17
问题 I'm making a game which uses very simple collision detection. I'm not using box 2D because it's an overkill. Basically, it's a mix of Pong and fooseball. As the ball gains speed and has a very high velocity it ends up going through the wall it's supposed to collide with. The code works with slow and regular speeds, but not with very fast motion. This is a snipet of my code: pos.x is a vector which holds the x position of my ball. if (pos.x - radius < wallLeft) { pos.x = wallLeft + radius; vel

How to calculate the distance between ofColors in openframeworks

穿精又带淫゛_ 提交于 2020-02-26 03:44:20
问题 What I was thinking to do is to convert ofColor to l*a*b color space and measure the euclidean distance. But I don't know how should I do it in openframeworks? 回答1: I'm not very experienced with c++ but I ported this snippet over: //ported from http://cookbooks.adobe.com/post_Useful_color_equations__RGB_to_LAB_converter-14227.html struct Color{ float R,G,B,X,Y,Z,L,a,b; }; #define REF_X 95.047; // Observer= 2°, Illuminant= D65 #define REF_Y 100.000; #define REF_Z 108.883; Color rgb2xyz(int R

System::Drawing::Bitmap to unsigned char *

拈花ヽ惹草 提交于 2020-01-23 17:09:27
问题 I have a C# .NET library that grabs frames from a camera. I need to send those frames to a native application that takes images from an unsigned char* . I initially take the frames as System::Drawing::Bitmap . So far I can retrieve a byte[] from the Bitmap . My test is done with an image of resolution 400*234, I should be getting 400*234*3 bytes to get to the 24bpp a RGB image requires. However, I'm getting a byte[] of size 11948. This is how I convert from Bitmap to byte[] : private static

OpenFrameworks + Python

大憨熊 提交于 2020-01-15 09:35:40
问题 Is there any bindings to execute functions in OpenFrameworks (C++ toolkit) using Python 2.7? Or any alternative for this available? 回答1: Experiments on python 2.6 has been made, see @Babu answer. But not updates.. I don't know a lot about it but you can try to have a look at SIP (even i think it is an hard task to let it work completely): SIP is a tool for quickly writing Python modules that interface with C++ and C libraries. Its home page is at http://riverbankcomputing.co.uk/software/sip

How can I get past a “Library not loaded:” issue?

血红的双手。 提交于 2020-01-05 11:33:39
问题 I started playing with the Kinect and I would like to use skeleton tracking using OpenNI. Since my knowledge of c++ is limited, the easiest option is to use the ofxOpenNI addon for OpenFrameworks. I've downloaded the addon, and successfully compiled the example, but the application can't load a dylib: [Session started at 2011-02-24 11:46:27 +0000.] dyld: Library not loaded: @executable_path/./../../../data/openni/lib/libnimCodecs.dylib Referenced from: /Users/george/Downloads/FirefoxDownloads

How can I get past a “Library not loaded:” issue?

痴心易碎 提交于 2020-01-05 11:31:03
问题 I started playing with the Kinect and I would like to use skeleton tracking using OpenNI. Since my knowledge of c++ is limited, the easiest option is to use the ofxOpenNI addon for OpenFrameworks. I've downloaded the addon, and successfully compiled the example, but the application can't load a dylib: [Session started at 2011-02-24 11:46:27 +0000.] dyld: Library not loaded: @executable_path/./../../../data/openni/lib/libnimCodecs.dylib Referenced from: /Users/george/Downloads/FirefoxDownloads

Efficiently making a particle system without textures

会有一股神秘感。 提交于 2020-01-03 04:53:07
问题 I am trying to make a particle system where instead of a texture, a quad is rendered by a fragment shader such as below. uniform vec3 color; uniform float radius; uniform float edge; uniform vec2 position; uniform float alpha; void main() { float dist = distance(gl_FragCoord.xy, position); float intensity = smoothstep(dist-edge, dist+edge, radius); gl_FragColor = vec4(color, intensity*alpha); } Each particle is an object of a c++ class that wraps this shader and all the variables together and